Deploy Flagsmith

Feature flags and remote config for your Railway apps, with Postgres

Deploy Flagsmith

/var/lib/postgresql/data

Deploy and Host Flagsmith on Railway

Flagsmith is an open-source feature flag and remote config platform. You create flags and settings in its dashboard, target them by environment, identity or segment, and your apps read them through REST or one of its SDKs for 20+ languages. It lets you ship code dark, roll out gradually and change behaviour without a redeploy.

About Hosting Flagsmith

This template runs Flagsmith 2.291.0 (API and dashboard in one service, built from a GitHub repo that pins the official image by digest) with Railway's PostgreSQL on a volume. On start it waits for the database, applies migrations, and creates the first admin from ADMIN_EMAIL with a generated ADMIN_PASSWORD (read it in the Flagsmith service's Variables tab). It also creates a default organisation and project. Sign-up is invite-only and the URL-based admin claim is off, so nobody else can take over a fresh instance. E-mails go to the service log until you add SMTP settings. Health checks use /health/readiness/. Updates arrive as Railway update notices when the repo bumps its pin.

Common Use Cases

  • Turn features on and off for the apps already running in your Railway project, without redeploying them
  • Roll out a change to a percentage of users or a segment, and keep a kill switch ready
  • Keep remote config (limits, copy, URLs) in one place and change it at runtime

Dependencies for Flagsmith Hosting

  • PostgreSQL (included: Railway's Postgres, or point DATABASE_URL at one you already run)
  • A public domain for the dashboard (Railway generates one)

Deployment Dependencies

Implementation Details

Connect your other Railway services over the private network. Add these variables to the app that reads flags, with the server-side environment key from Flagsmith (Environment settings, Keys):

FLAGSMITH_API_URL=http://${{Flagsmith.RAILWAY_PRIVATE_DOMAIN}}:${{Flagsmith.PORT}}/api/v1/
FLAGSMITH_ENVIRONMENT_KEY=ser.YOUR-SERVER-KEY

Browser and mobile SDKs use the public URL https://YOUR-DOMAIN/api/v1/ with the client-side key. To reuse an existing database, set DATABASE_URL to ${{YOUR-POSTGRES.DATABASE_URL}} and remove the bundled Postgres. For e-mail invites, add EMAIL_HOST, EMAIL_HOST_USER, EMAIL_HOST_PASSWORD and SENDER_EMAIL. To let anyone sign up, set ALLOW_REGISTRATION_WITHOUT_INVITE=true.

Why Deploy Flagsmith on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Flagsmith on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
51
View Template
Foundry Virtual Tabletop
Self-hosted virtual tabletop for role-playing games (license required)

Lucas
71
View Template
NEW
Double Commander in your browser
The Double Commander file manager in the cloud, from any device

Nermin Sabanovic
0