Self-hosting
Run Pyxis on your own infrastructure.
Pyxis is a Next.js app with PostgreSQL. Web analytics needs a separate Umami instance.
Requirements
- Node.js 22 and npm
- PostgreSQL 17 or 18 (an embedded one is included for local work)
- Optional: an Umami instance for web analytics
Steps
Create the database and roles
Run migrations with the owner connection, then set the password of the non-owner runtime role:
ADMIN_DATABASE_URL=postgres://owner:...@host/pyxis npm run db:migrate
ADMIN_DATABASE_URL=postgres://owner:...@host/pyxis PYXIS_APP_PASSWORD=... npm run db:roleMigrations are checksummed. Editing an already-applied file aborts the run.
Configure the app
Point DATABASE_URL at the pyxis_app role, set OPERATOR_ACCOUNTS, and optionally the UMAMI_* variables. See Configuration.
Build and start
npm install --legacy-peer-deps
npm run build
npm startRailway
The repository includes a railway.json whose pre-deploy command is npm run db:migrate && npm run db:role. After the first deploy, verify that the migration ran; if it did not, run the same command inside the service.
Do not use the owner connection at runtime
The app must connect as pyxis_app. If it connects as the table owner, row-level security does not apply and tenant isolation is lost.