Deploy to Vercel

Vercel is the fastest way to host the Superinterface server because the runtime is already a Next.js application and the database driver targets Neon (the engine behind Vercel Postgres).
Deploy with Vercel
Use the 1-click button to clone the official template project, or follow the manual steps below if you want to host your own fork.

1. Prepare a repository

The template already ships with the required package.json, Next.js config, Prisma schema, and compiled .next output copied from the npm package. If you need to customize the server, fork the template (or the open-source repo) and keep these pieces in place so Vercel can run npm run build and npm run start successfully.

2. Create a Vercel project

    Import the template repository in the Vercel dashboard (no custom root directory required).
    Keep the defaults for Framework Preset (Next.js), Install Command (npm install), Build Command (npm run build), and Output Directory (.next).
    Add the Vercel Postgres integration (this automatically provisions DATABASE_URL and DIRECT_URL secrets for you).
    (Optional) Add the Upstash QStash integration if you plan to use scheduled tasks.

3. Configure environment variables

In the Vercel project settings add the following variables for each environment where you plan to run the server:
VariableValue
DATABASE_URLCopy from the Vercel Postgres integration.
DIRECT_URLAlso provided by Vercel Postgres.
NEXT_PUBLIC_SUPERINTERFACE_BASE_URLThe canonical URL for your deployment (for example https://api.yourdomain.com). Set different values for Preview and Production if needed.
DATABASE_ADAPTEROptional. Defaults to neon. Only set this if you use a different Postgres provider in non-production environments.
QSTASH_TOKEN(Optional) Copy from Upstash if you enabled scheduled tasks.
QSTASH_CURRENT_SIGNING_KEY(Optional) Upstash signing key for webhook verification.
COMMUNITY_TEST_GROQ_API_KEY(Optional) Fallback Groq key for demos.
Vercel exposes VERCEL_URL at runtime. You can use it in Preview environments by setting NEXT_PUBLIC_SUPERINTERFACE_BASE_URL=https://${VERCEL_URL} in the Preview environment configuration.
The deploy button pre-fills these variables with placeholder values—swap them for your actual credentials before completing the setup. Optional fields are left blank so you can wire them up later.

4. Deploy and run migrations

Trigger the first deployment from the Vercel dashboard. After the build succeeds you need to apply the Prisma migrations against the provisioned database:
# Run this locally with the same env values Vercel generated. DATABASE_URL="postgres://..." \ DIRECT_URL="postgres://..." \ npx @superinterface/server@latest prisma deploy
You can repeat the same pattern for staging and production. Because the command only touches the database, it is safe to run from your machine or a CI job.

5. Seed an organization and API key

Use the CLI with the same environment variables to create credentials for your applications:
DATABASE_URL="postgres://..." \ DIRECT_URL="postgres://..." \ npx @superinterface/server@latest organizations create DATABASE_URL="postgres://..." \ DIRECT_URL="postgres://..." \ npx @superinterface/server@latest organizations api-keys create
Or run the same commands inside a Vercel shell session using npm run cli -- organizations create.

6. Validate the deployment

Hit https://<your-domain>/api/workspaces with the API key in the Authorization: Bearer header.
Confirm task scheduling if you enabled QStash by creating a scheduled task from the dashboard and watching for callback logs.
Point your own applications at the new base URL and supply the organization API key you created.
Vercel handles TLS, automatic rollbacks, and scaling for you. Future updates are as simple as pushing a commit to the connected repository.