stellar-app-logo
Documentation

Deployment Guide: Docker, Railway, and Supabase

Deploy Stellar with the standalone Docker image or Railway, connect Supabase, run the pre-deploy job, and verify the workspace.

10 min readUpdated 18 November 2026

Before you start

You need a Supabase project for Postgres, Auth, and Storage, plus a container host. Railway is supported directly; any host that can run the Docker image and set the same environment variables works.

Plan for three credentials: the Postgres connection strings, the Supabase anon/service keys used by the app, and a bootstrap admin email and password.

Environment variables

Configuration is read from environment variables. At minimum, set the database URLs, Supabase URL and keys, the public app domain, and the bootstrap admin values. The template in the repository lists every variable the application reads.

Never commit a real .env file. On Railway, use dashboard variables. On your own host, use the host's secret manager or a restricted environment file.

  • DATABASE_URL and DIRECT_URL for Prisma
  • NEXT_PUBLIC_SUPABASE_URL and Supabase anon key
  • Supabase service role key for server-only operations
  • NEXT_PUBLIC_APP_DOMAIN set to the deployment origin
  • Bootstrap admin email and password

Deploy the image

Build the standalone image and run it on your host. The image serves the Next.js application; it does not include a database. Point it at your Supabase project and expose the port your host expects.

On Railway, create a service from the deployment repository, set the variables, and let the release step run. On Docker, run the container with the same variables and a health check against the app.

Run the pre-deploy job

The release step applies Prisma migrations, seeds RBAC roles, creates the bootstrap admin, and prepares public and private storage buckets. Run it before the first request so the app has the tables and roles it expects.

After the job finishes, sign in with the bootstrap admin. Create team accounts through the app-user module and assign roles.

Verify the workspace

Create a currency, a tax rate, and a payment mode. Add a product category and a product. Create a company and a customer. Build a quote, then an invoice, and record a payment. Generate a ledger or outstanding report.

If a step fails, check the container logs and the Supabase logs together. The most common causes are a missing environment variable, a database URL that points at the pooler instead of the direct connection, or a storage bucket that was not created.

Upgrades and backups

Upgrades are a new image plus the release step. Review migrations before applying them to production and take a database backup first.

Backups are your responsibility as the operator. Configure Supabase backups or an external dump schedule, and test a restore before you need it.

Frequently asked questions

Can I run Stellar without Supabase?

The application expects Supabase for Auth and Storage and a Postgres database for Prisma. Running a different auth or storage provider would require code changes.

Does the image include the database?

No. The image is the Next.js application. Postgres, Auth, and Storage live in your Supabase project.

Keep reading

Run the core on your own infrastructure

Deploy the free core, connect Supabase, and add AI agents with your own Google key when you are ready.

Free self-hosted core • BYOK or managed AI • stellarapp.site