---
title: "Deploy Flagsmith"
description: "Feature flags and remote config for your Railway apps, with Postgres"
category: "Other"
url: https://railway.com/deploy/flagsmith-1
---

# Deploy Flagsmith

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

**[Deploy Flagsmith on Railway](https://railway.com/template/flagsmith-1)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/flagsmith-1/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** Other

## Template content

### Flagsmith https://raw.githubusercontent.com/Flagsmith/flagsmith/v2.291.0/docs/static/img/square-icon.png

- **Source:** https://github.com/aalfath/flagsmith-railway-template
- **Health check:** /health/readiness/
- **Public domain:** Yes

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

## Documentation

# 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

* Flagsmith self-hosting docs: https://docs.flagsmith.com/deployment-self-hosting/hosting-guides/docker
* Flagsmith API settings: https://docs.flagsmith.com/deployment-self-hosting/core-configuration/environment-variables
* Release notes: https://github.com/Flagsmith/flagsmith/releases
* Template repo: https://github.com/aalfath/flagsmith-railway-template

### 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.



## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — Self-hosted virtual tabletop for role-playing games (license required)
- [Double Commander in your browser](https://railway.com/deploy/double-commander-in-your-browser) — The Double Commander file manager in the cloud, from any device

Open this page in a browser: https://railway.com/deploy/flagsmith-1
