Use Supabase with @superinterface/server

You can run the Superinterface server on top of Supabase’s managed Postgres. Supabase already includes connection pooling (pgBouncer), which lines up with the Prisma “direct” adapter we ship.

1. Create a Supabase project

    Sign in to Supabase and create a new project.
    Choose a strong database password—you’ll need it for both pooled and direct URLs.
    Wait for Supabase to finish provisioning (normally 1–2 minutes).
Supabase starts on Postgres 15 by default, which meets the server’s requirements.

2. Collect connection strings

Open Settings → Database → Connection String:
Pooled (pgBouncer) – select the JavaScript template and switch the port to 6543 if it isn’t already. Copy this URL for DATABASE_URL.
Direct – use the standard Postgres port 5432. Copy this URL for DIRECT_URL.
The pooled URL should include ?pgbouncer=true&connection_limit=1. If the helper doesn’t add it automatically, append it manually. Example:
postgresql://postgres:[email protected]:6543/postgres?pgbouncer=true&connection_limit=1

3. Configure environment variables

Add the URLs (and any optional tokens) to your deployment. For local development create an .env file:
DATABASE_URL="postgresql://postgres:[email protected]:6543/postgres?pgbouncer=true&connection_limit=1" DIRECT_URL="postgresql://postgres:[email protected]:5432/postgres" NEXT_PUBLIC_SUPERINTERFACE_BASE_URL="http://localhost:3000" DATABASE_ADAPTER="direct" # Optional: # QSTASH_TOKEN= # QSTASH_CURRENT_SIGNING_KEY= # COMMUNITY_TEST_GROQ_API_KEY=
Set DATABASE_ADAPTER=direct so the runtime uses Prisma’s built-in Postgres client instead of the Neon adapter.

4. Run migrations

Apply the schema once before starting the server:
npx @superinterface/server prisma deploy
If you’re running in Docker or CI, you can use the bundled container:
docker run \ --rm \ --env-file ./self-host.env \ superinterface/server:latest \ node ./bin/index.cjs prisma deploy

5. Start the server

Use whichever hosting option you prefer (local, Docker, Vercel, etc.). Examples:
npx @superinterface/server run server --port 3000
docker run \ --name superinterface \ -p 3000:3000 \ --env-file ./self-host.env \ superinterface/server:latest

6. Seed an organization and API key

Generate credentials with the CLI so your apps can authenticate:
npx @superinterface/server organizations create npx @superinterface/server organizations api-keys create
Save the API key in your application secrets and call the REST endpoints with it in the Authorization: Bearer header.

7. Optional Supabase tuning

Pooling limits – Supabase defaults to 50 connections for pgBouncer. The server uses a small number of concurrent connections, but you can raise or lower the limit in Settings → Database → Connection Pooling if needed.
Backups – enable automated backups in Settings → Database → Backups to protect your data.
Row Level Security – the server manages its own access, so leave RLS disabled for the default schema unless you customize the Prisma models.
You now have the Superinterface API running on Supabase. Plug the same environment variables into your deployment pipeline and repeat the migration step whenever you upgrade to a new server version.

Further reading