-
Notifications
You must be signed in to change notification settings - Fork 0
Supabase Sync Setup
Inventorinator keeps a local SQLite database. Supabase sync is optional and experimental. Export a backup before enabling it.
Inventorinator uses anonymous Supabase users as device identities; no email is required.
- Hosted Supabase: enable Allow anonymous sign-ins in the project's authentication settings.
-
Self-hosted Supabase: set
ENABLE_ANONYMOUS_USERS=truein the Supabase.env, then recreate the Auth service.
Use the instructions for the same version as the app. Version-specific files remain available so older working installations are not silently redirected to incompatible migrations.
For v0.1.0-alpha on Linux, macOS, or Windows through WSL/Git Bash, download the corrected schema bundle attached to the release:
curl -fLO \
https://github.com/DavidThePurple/Inventorinator/releases/download/v0.1.0-alpha/Inventorinator-v0.1.0-alpha-Supabase-schema15.tar.gz
tar -xzf Inventorinator-v0.1.0-alpha-Supabase-schema15.tar.gz
cd Inventorinator-v0.1.0-alpha-Supabase-schema15
./install-or-update.shChoose:
- Hosted: paste the PostgreSQL connection string from the Supabase project's Connect dialog. The script reads it silently and does not save it.
-
Self-hosted Docker: select the database container. The default is
supabase-db; if yours differs, run:
SUPABASE_DB_CONTAINER=my-database-container \
./install-or-update.sh --self-hostedThe script detects the installed schema, applies only missing migrations, and verifies the final version. Success ends with:
Inventorinator schema v15 is ready.
Run the same installer again after updating Inventorinator. Already-applied migrations are skipped.
For later versions, use the schema bundle attached to that release. This keeps the installer, connector, and migrations matched to the app. Follow [[How to Upgrade]] before replacing an existing installation.
v0.0.9-alpha requires its tagged schema 7 files and self-hosted connector. Use
the supabase directory from the
v0.0.9-alpha source
and run sh apply-migrations.sh. Keep its connector and migrations together.
Do not point a v0.0.9 client at schema 15, which blocks obsolete whole-snapshot
writes, and do not downgrade an upgraded database in place.
The installer requires either PostgreSQL psql or Docker. If psql is absent
for a hosted project, it automatically uses the official PostgreSQL Docker
image.
From the Supabase Connect dialog or Settings → API Keys, copy:
- the public Project/Supabase API URL;
- the client-safe Publishable key (
sb_publishable_...) or legacyanonkey.
Never enter a secret key, service_role key, database password, dashboard
password, or JWT secret into Inventorinator.
- Choose Supabase on first launch. If already running locally, open Sync devices → Advanced.
- Enter the Supabase API URL and publishable key.
- Select Verify and continue, then Create shared inventory on the device that should own it.
- On the owner device, open Sync devices → Add another device.
- On the new device, choose Join existing inventory—not Create.
- Scan the QR code or enter its one-use code within 10 minutes.
- Select Sync now to verify both devices.
- Schema/connector update required: rerun the installer.
- Anonymous sign-in failed: enable anonymous users, then restart Auth.
- Server does not respond: enter the Supabase API gateway URL, not the Studio dashboard or Inventorinator connector status port.
-
Unauthorized: use the publishable/legacy
anonkey. - Wrong shared inventory: disconnect and join again using a fresh pairing code from the owner.
- Locked out of owner access / recovery key rejected: see [[Owner Recovery]].
References: Supabase anonymous sign-ins, API keys, and self-hosting with Docker.
Planned Remote Sync reliability work is tracked on the Roadmap.