Self-host Flagsmith with Levelrail
A feature flag and remote config service with a dashboard, environments, segments and an SDK API. Runs the API and dashboard in one container with a bundled Postgres database. On first open, the sign-up page creates the first organisation and admin.
- AuthorFlagsmith
- LicenceBSD-3-Clause
- Memory768 MiB
- Archarm64
- Services2
How to self-host Flagsmith
-
Pull the images
2 images are pulled on your server.
Show images
postgres:16-alpineflagsmith/flagsmith:2.288.2
-
Create the app
2 services start in a single Compose app, with 1 named volume mount for your data, on port 8000.
-
Fill in the secrets
3 secrets are generated and stored encrypted, 8 settings are preset, you do not have to fill in anything.
-
Open it
Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.
After the first start
- Open the app and sign up. The first account becomes the organisation admin.
Flagsmith requirements
- Memory
- About 768 MiB
- Architectures
- amd64 image published, arm64 image published
- Ports
- 8000
- Domain
- Optional, an sslip.io address is used without one
- Settings
- none to fill in
- License
- BSD-3-Clause, permissive license
- Listed. It is in the catalog but not verified. Back up the data volume before changing an image tag.
Install Levelrail first
On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then Flagsmith. New to Levelrail? Install it on a fresh VPS first.
docker pull ghcr.io/glincker/levelrail:latest Then levelrail-cli login --device. See Getting started and the Flagsmith docs page.
Deploy Flagsmith your way
Every format below deploys the same pinned images. Pick the one that fits how you work.
Deploy Flagsmith from the CLI
levelrail-cli templates install flagsmith --name my-flagsmith Deploy Flagsmith with the API
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
https://levelrail.example.com/api/v1/service-templates/flagsmith/install \
-d '{
"name": "my-flagsmith"
}' Flagsmith configuration
Flagsmith services
| Service | Image | Ports | Volumes |
|---|---|---|---|
| db | postgres:16-alpine | none | pgdata -> /var/lib/postgresql/data |
| flagsmith | flagsmith/flagsmith:2.288.2 | 8000 | none |
Flagsmith environment variables
| Variable | Service | Value |
|---|---|---|
| POSTGRES_DB | db | Preset by the template |
| POSTGRES_PASSWORD | db | Generated at deploy |
| POSTGRES_USER | db | Preset by the template |
| DATABASE_URL | flagsmith | Generated at deploy |
| DISABLE_INFLUXDB_FEATURES | flagsmith | Preset by the template |
| DJANGO_ALLOWED_HOSTS | flagsmith | Preset by the template |
| DJANGO_SECRET_KEY | flagsmith | Generated at deploy |
| ENABLE_ADMIN_ACCESS_USER_PASS | flagsmith | Preset by the template |
Show all 11 variables
- FLAGSMITH_DOMAINflagsmithPreset by the template
- TZflagsmithPreset by the template
- USE_X_FORWARDED_HOSTflagsmithPreset by the template
Ports and volumes
- Ports
- 8000
- Volumes
- 1 named mount: pgdata -> /var/lib/postgresql/data
Flagsmith FAQ
How much memory does Flagsmith need?
The catalog lists about 768 MiB of memory for Flagsmith across its 2 services.
Does Flagsmith run on arm64?
For Flagsmith, an arm64 image is published; amd64 is image published.
What licence is Flagsmith under?
Flagsmith is licensed under BSD-3-Clause, which is permissive, with few conditions on reuse.
Does Flagsmith need configuration before it starts?
No. The template fills in its own defaults and generates secrets at deploy time.
Which database does Flagsmith bundle?
The template includes Postgres, running as its own service.
Which ports does Flagsmith use?
Flagsmith listens on port 8000 inside the stack.
Where does Flagsmith keep its data?
In a named volume: pgdata mounted at /var/lib/postgresql/data.
Can I deploy Flagsmith on Dokploy or Dokku?
The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id flagsmith for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image postgres:16-alpine, flagsmith/flagsmith:2.288.2 is what you deploy there.