Self-hosted
Run instancez on a bare metal server or VPS with inz serve.
Download the binary
Section titled “Download the binary”curl -fsSL https://get.instancez.ai | shThis installs inz to ~/.local/bin. Verify the install:
inz versionAlternatively, download a release binary directly from GitHub Releases and place it on your PATH.
Configure
Section titled “Configure”Create a .production.env file next to instancez.yaml. inz serve loads this file automatically when the config source is a local file. Shell environment variables always take precedence over values in .production.env.
# .production.env — do not commit this file
INSTANCEZ_DATABASE_URL=postgres://postgres:password@localhost:5432/mydbINSTANCEZ_PUBLISHABLE_KEY=inz_publishable_your-keyINSTANCEZ_SECRET_KEY=inz_secret_your-keyRoles (instancez_owner, authenticator, anon, authenticated, service_role) are provisioned automatically by instancez on first startup.
See Environment Variables for the full list of available variables.
Validate config
Section titled “Validate config”Before deploying a config change, check it for errors:
inz validateThis runs a structural check on instancez.yaml without connecting to the database. Fix any reported errors before restarting the server.
inz serve --migrate--migrate applies pending schema migrations on startup. Drop it if you manage migrations separately. The server listens on port 8080 by default; set INSTANCEZ_PORT or --port to change it.
On startup, inz serve logs a JSON stream to stdout. The server is ready when you see "listening".
Health checks
Section titled “Health checks”| Endpoint | Behaviour |
|---|---|
GET /live | Returns 200 when the process is alive |
GET /health | Returns 200 when the app is initialized |
GET /ready | Returns 200 when Postgres is reachable; 503 otherwise |
Use /ready for load-balancer health checks. Configure Nginx to check it before routing traffic:
location /ready { proxy_pass http://127.0.0.1:8080/ready; access_log off;}