Skip to main content

Deploy to Railway

One-click deploy of the systemprompt.io gateway on Railway with a managed Postgres service.

Railway is the fastest hosted path: one click provisions the gateway and a managed Postgres, with DATABASE_URL wired between them automatically.

Pick Railway when you want a hosted deploy without managing a container host or your own database.

Deploy

Deploy on Railway

The published template (systempromptio-the-self-owned-ai-control) provisions:

  • A gateway service from ghcr.io/systempromptio/systemprompt-template:latest
  • A Postgres service, with DATABASE_URL wired into the gateway automatically
  • HOST=:: on the gateway, so it binds the IPv6 wildcard that Railway's IPv6-only private network requires

Steps:

  1. Click the button and sign in to Railway.
  2. Set at least one AI provider key when prompted (ANTHROPIC_API_KEY, OPENAI_API_KEY, or GEMINI_API_KEY).
  3. Deploy. First boot runs migrations and the publish pipeline, which takes a few minutes; the healthcheck allows up to 900 seconds before marking the deploy failed.

Custom domain

In Railway, open the service, then Settings, then Networking, and use Generate Domain or add your own.

Deploying from a fork instead

The one-click template is the supported path. If you deploy your own fork instead, deploy/railway/railway.json holds the build and deploy settings Railway reads from the repo (Dockerfile build, /api/v1/health healthcheck, restart policy). You still add a Postgres service yourself, reference its DATABASE_URL, and set HOST=:: plus a provider key, because a config-as-code file cannot declare sibling services.

Where to go next

For the full fork walkthrough and template details, see the full Railway recipe in the template repository. For Railway itself (services, variables, networking), see the Railway documentation.