Railway

Deploy Unleash

Open-source feature flag platform — a LaunchDarkly alternative

Deploy Unleash

/var/lib/postgresql/data

Just deployed

Just deployed

/data

Unleash logo

Deploy and Host Unleash on Railway

Unleash is an open-source feature management platform that lets teams ship code continuously and decide separately when users see a feature. Instead of long-lived release branches, developers wrap new work in a feature flag, merge it, and control the rollout from a web UI — off for everyone, on for internal testers, on for 5% of traffic, or on everywhere. It is the LaunchDarkly alternative for teams who want progressive delivery without sending user data to a third-party SaaS.

Self-host Unleash on Railway with the full production shape wired up: the unleash server (admin UI, admin API and client API), a managed PostgreSQL database holding every flag, strategy, environment and user, an unleash-edge caching layer your SDKs connect to instead of the server, and a managed Redis that lets Edge restore its cache after a restart. Applications poll Edge over its public URL; Edge polls the server across Railway's private network; only Edge and the admin UI face the internet.

Unleash Railway architecture

Getting Started with Unleash on Railway

Open the unleash service's public URL and you will land on a sign-in page. The first administrator is created on first boot from UNLEASH_DEFAULT_ADMIN_USERNAME and UNLEASH_DEFAULT_ADMIN_PASSWORD — read the generated password from that service's Variables tab, sign in, and change it under your profile. Unleash Open Source has no public sign-up, so teammates are invited from Admin settings → Users.

Go to Projects → Default → New feature flag and create one named new-checkout-flow. The flag page shows a card per environment: pick production, click Add strategy → Gradual rollout, set a percentage, save, then switch the environment toggle on. To confirm the stack is live, call the client API through Edge with the backend token from your unleash variables:

curl -H "Authorization: $UNLEASH_BACKEND_TOKEN" \
  https:///api/client/features

A JSON body containing your flag and its flexibleRollout strategy means the server, database and Edge cache are all working. Point your SDK at https:///api with the same token, and use Playground to check how a user context resolves before rolling anything out.

Unleash project overview listing a feature flag per environment

Unleash feature flag enabled with a 50% gradual rollout in production

Unleash playground evaluating a flag for a user context

About Hosting Unleash

Unleash separates deployment from release. A flag is defined once, then configured per environment, so the same build can be dark in production while fully on in development. Evaluation happens inside your application through an SDK, so no user attribute leaves your infrastructure.

Key capabilities:

  • Activation strategies — percentage rollouts with sticky bucketing, user or IP lists, and constraint-based targeting on any context field.
  • Environmentsdevelopment and production ship enabled, each with its own strategies and tokens.
  • SDKs — Node.js, Java, Go, Rust, Ruby, Python, .NET, PHP, React, Next.js, Vue, iOS, Android and Flutter.
  • Playground — evaluate a flag against a hand-written context and see why it resolved true or false.
  • Metrics, audit log and REST API — per-flag usage from connected SDKs, every change recorded, and everything the UI does scriptable with an admin token.

How the services fit together: unleash owns all state and serves the admin UI; PostgreSQL is that state, so it is the only thing to back up; unleash-edge caches flag configuration in memory and answers SDK traffic in under a millisecond; Redis reloads that cache after a restart.

Why Deploy Unleash on Railway

Railway removes the infrastructure work around a four-service feature flag stack.

  • Managed PostgreSQL and Redis, provisioned and connected.
  • Private networking between Edge and the server, so only two surfaces are public.
  • HTTPS domains issued for the admin UI and the SDK endpoint.
  • Scale Edge up or out without touching the server.
  • Deploy logs, metrics and one-click rollbacks.

Common Use Cases

  • Trunk-based development — merge unfinished work behind a flag instead of maintaining release branches.
  • Progressive rollouts and kill switches — release a risky change to 1% of users, watch your error rate, then ramp to 100% or switch it off instantly, with no redeploy.
  • Per-customer and beta access — gate features to named accounts, internal staff or a beta segment using constraints on your context fields.
  • Migration cutovers — run old and new implementations side by side, shifting traffic from the UI.

Dependencies for Unleash

  • unleashorg/unleash-server — admin UI, admin API, client API and migrations, on port 4242.
  • unleashorg/unleash-edge — the SDK-facing cache, run with the edge command on port 3063.
  • PostgreSQL — flags, strategies, environments, projects, tokens, users and the event log.
  • Redis — persists Edge's feature and token cache, so a restart does not start cold.

Environment Variables Reference

VariableServicePurpose
DATABASE_URLunleashPostgreSQL connection string
UNLEASH_URLunleashPublic base URL used in generated links
UNLEASH_SECRETunleashSession and cookie signing key
UNLEASH_DEFAULT_ADMIN_PASSWORDunleashPassword of the first administrator
INIT_BACKEND_API_TOKENSunleashSeeded server-side SDK token
INIT_FRONTEND_API_TOKENSunleashSeeded browser/mobile SDK token
UPSTREAM_URLunleash-edgePrivate address of the server
TOKENSunleash-edgeToken Edge uses to fetch flags

Deployment Dependencies

Hardware Requirements for Self-Hosting Unleash

ResourceMinimumRecommended
CPU1 vCPU total2 vCPU
RAM1 GB total2 GB (1 GB server, 256 MB Edge, rest for PostgreSQL)
Storage1 GB PostgreSQL5 GB+, growing with the event log
RuntimeNode.js 22, Rust binary, PostgreSQL 13+PostgreSQL 18

Neither application service needs a volume — the server keeps everything in PostgreSQL, and Edge's cache lives in memory and Redis.

Self-Hosting Unleash with Docker

The smallest useful local setup is the server plus a database. The following is a docker-compose.yml:

services:
  unleash:
    image: unleashorg/unleash-server:latest
    ports: ["4242:4242"]
    environment:
      DATABASE_URL: "postgres://postgres:unleash@db/unleash"
      DATABASE_SSL: "false"
      UNLEASH_DEFAULT_ADMIN_PASSWORD: "change-me"
  db:
    image: postgres:18
    environment:
      POSTGRES_DB: "unleash"
      POSTGRES_PASSWORD: "unleash"

Add the caching layer once SDK traffic grows, pointing Edge at the server with a backend token:

docker run -p 3063:3063 \
  -e UPSTREAM_URL=http://unleash:4242 \
  -e TOKENS='*:production.' \
  unleashorg/unleash-edge:latest edge

How Much Does It Cost to Self-Host Unleash?

Unleash Open Source is free under AGPL-3.0, with no cap on flags, projects or seats. Unleash also sells an Enterprise edition adding SSO, SCIM, role-based access control and change requests; the OSS build covers everything described here. Self-hosting on Railway costs only the compute, database and bandwidth the four services use — and Edge absorbs the SDK polling that would otherwise reach the database.

FAQ

What is Unleash?

An open-source feature flag and feature management platform. It lets you deploy code with unfinished or risky features turned off, then release them to chosen users, percentages or environments from a web UI without another deployment.

What does this Railway template deploy?

Four services: the Unleash server with its admin UI and API, a managed PostgreSQL database, an Unleash Edge instance serving SDK traffic, and a managed Redis backing Edge's cache. Only the server and Edge are public.

Why does the template include Redis and Unleash Edge?

Edge is Unleash's official caching layer: it holds flag configuration in memory and answers SDK requests locally, so thousands of clients do not become thousands of database queries. Redis persists that cache, so a restarted Edge serves correct data immediately.

How do I connect an SDK to self-hosted Unleash on Railway?

Point the SDK at https:///api and pass an API token — a backend token for server-side SDKs, a frontend token for browser and mobile. Both are seeded on first boot and visible in the unleash service's variables; create more under Admin settings → API access.

Can I sign users up to my self-hosted Unleash instance?

No — Unleash Open Source has no public registration by design. The first administrator comes from environment variables and every other account is invited by an admin.

How do I back up my feature flags?

Everything lives in PostgreSQL, so a database backup is a complete backup. Flags can also be exported as JSON from a project's Overview page or the admin API — the usual way to copy configuration between instances.


Template Content

More templates in this category

View Template
Rocky Linux
[Jul'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
41
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
71
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
51