Flagsmith 2.291: Self-Host Feature Flags and Remote Config with Docker Compose
Flagsmith is an open-source feature flag and remote config service. Here is a tested Docker Compose setup with a pinned version, the first-run wizard, a first flag and the catches I ran into.
Feature flags sound like something only big engineering teams need, until the first time you ship a half-finished change on a Friday and wish you could switch it off without redeploying. Flagsmith is an open-source feature flag and remote config service you can run yourself, and it has been picking up a lot of attention on GitHub lately. Version 2.291.0 came out on November 13, 2026, so this is a good moment to look at it.
This guide walks through a Docker Compose setup with a pinned version, the first-run wizard, and creating and toggling a first flag. I ran every step on a fresh Ubuntu 24.04 VM before writing this down, and I'll point out where things behaved differently from what I expected.
What is Flagsmith?
Flagsmith lets your application ask a central service "is this feature on for this user?" instead of baking the answer into the code. You flip a switch in the dashboard, and your app picks up the change on its next request or poll. No new build, no new deployment.
The core ideas are simple enough:
- Projects and environments. A project holds your flags. Each project has its own environments (a new project came with Development and Production), and a flag can be on in one and off in another.
- Feature flags and remote config. A flag is a boolean. Remote config attaches a value (text, JSON and similar) to the same flag, so you can change a setting without shipping code.
- Segments and identity overrides. You can target groups of users or single identities instead of flipping a flag for everyone.
- Scheduling, change requests and audit log. The environment sidebar has entries for scheduling and feature change requests, and the project has an audit log. Which of the more advanced workflow features are available without a paid license depends on the edition, see the limits section.
- SDKs and an API. Client and server SDKs exist for many languages, and the environment has its own SDK keys.
The repository is licensed under BSD 3-Clause. The project also sells a hosted version and an Enterprise Edition, so this is an open-core model.

What you need
Docker with the Compose plugin and a machine with a bit of headroom. In my test, the web container sat at about 520 MiB right after startup, the task processor at about 250 MiB and PostgreSQL at about 70 MiB (numbers from docker stats --no-stream a minute after the stack came up, so not a load test). A VM with 2 GB of RAM handled it, but I would not go much smaller.
For anything beyond a test, put it behind a reverse proxy with HTTPS. The examples below use flags.example.com.
Docker Compose setup
The project ships its own docker-compose.yml in the repository, but it uses the latest tag and placeholder secrets such as secret and password. I used it as a template and changed three things: the image tag is pinned, the secrets come from an .env file, and the allowed hosts are configurable.
Step 1: Create a project folder
mkdir -p ~/flagsmith && cd ~/flagsmithStep 2: Create the compose file
Save this as docker-compose.yml:
x-flagsmith-env: &flagsmith-env
DATABASE_URL: postgresql://flagsmith:${POSTGRES_PASSWORD}@postgres:5432/flagsmith
USE_POSTGRES_FOR_ANALYTICS: "true"
ENVIRONMENT: production
DJANGO_ALLOWED_HOSTS: ${DJANGO_ALLOWED_HOSTS}
FLAGSMITH_DOMAIN: ${FLAGSMITH_DOMAIN}
DJANGO_SECRET_KEY: ${DJANGO_SECRET_KEY}
WAREHOUSE_CREDENTIALS_SECRET: ${WAREHOUSE_CREDENTIALS_SECRET}
TASK_RUN_METHOD: TASK_PROCESSOR
services:
postgres:
image: postgres:15.5-alpine
restart: unless-stopped
environment:
POSTGRES_USER: flagsmith
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: flagsmith
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -d flagsmith -U flagsmith"]
interval: 5s
timeout: 3s
retries: 20
migrate-db:
image: docker.flagsmith.com/flagsmith/flagsmith:2.291.0
command: migrate
environment: *flagsmith-env
healthcheck:
disable: true
depends_on:
postgres:
condition: service_healthy
flagsmith:
image: docker.flagsmith.com/flagsmith/flagsmith:2.291.0
command: serve
restart: unless-stopped
environment: *flagsmith-env
ports:
- "8000:8000"
depends_on:
migrate-db:
condition: service_completed_successfully
flagsmith-task-processor:
image: docker.flagsmith.com/flagsmith/flagsmith:2.291.0
command: run-task-processor
restart: unless-stopped
environment: *flagsmith-env
depends_on:
migrate-db:
condition: service_completed_successfully
volumes:
pgdata:A few notes on what is going on here. The migrate-db container runs the database migrations once and exits, and the web and task processor containers wait for it. The task processor runs background jobs; the compose file only needs it because TASK_RUN_METHOD is set to TASK_PROCESSOR. If you bind the port to all interfaces as shown, remember that Docker publishes it past most host firewall rules. When a reverse proxy runs on the same machine, use "127.0.0.1:8000:8000" instead. In my test I bound to localhost on a different free port, which is the only change I made compared to the file above.
Step 3: Generate secrets
cat > .env <<EOF
POSTGRES_PASSWORD=$(openssl rand -hex 16)
DJANGO_SECRET_KEY=$(openssl rand -hex 32)
WAREHOUSE_CREDENTIALS_SECRET=$(openssl rand -hex 32)
FLAGSMITH_DOMAIN=flags.example.com
DJANGO_ALLOWED_HOSTS=flags.example.com
EOF
chmod 600 .envKeep this file out of version control. Losing DJANGO_SECRET_KEY and WAREHOUSE_CREDENTIALS_SECRET later is a headache, so back it up with the rest of your secrets.
Step 4: Start the stack
docker compose up -d --wait
docker compose psBe patient on the first start. Pulling the images and running all migrations took about two minutes on my 2 vCPU test VM, and most of that time migrate-db was busy applying migrations while Compose waited quietly. Once it finished, all long-running containers reported healthy.
A stumbling block with allowed hosts
My first attempt put the port into DJANGO_ALLOWED_HOSTS (localhost:18200, because I was testing on a non-standard port). The container came up healthy, but the web interface answered every request with HTTP 400. Django compares the host name without the port, so the variable needs just the name, like flags.example.com or localhost. After I fixed that, the UI answered with 200 when the request carried a matching Host header, and a request with a different Host header still got a 400. That is the intended behaviour, but it is easy to trip over when you test with a raw IP address. The upstream example file uses * here, which avoids the problem and is also less strict; I would set your real host name.
First run: the setup wizard
Open the address of your instance in a browser. A welcome page shows the installed version (for me: "You've successfully installed Flagsmith v2.291.0") and a Get Started button.

From there the wizard has two steps. First you enter first name, last name, email and password for the admin account. The second step asks for an organisation name. On this step there is also a checkbox to opt into a free technical onboarding call, and it was ticked by default when I went through it. Read it before you click Next and untick it if you don't want that. I did not test what happens in the background when it stays ticked, so I can't say more than that.
After the wizard you land on a Getting Started page. The project list lives under Projects in the top navigation.
Creating and toggling your first flag
This is the part you will use daily, and it is short:
- Go to Projects and create a project (I used "Demo Shop"). Flagsmith creates it with two environments, Development and Production.
- In the features view of the Development environment, click Create Feature, enter a name like
new_checkoutand an optional description, and confirm. - The new flag opens in an edit panel, and it was disabled after creation. Close the panel, then use the switch in the feature list to turn it on.
When I flipped the switch in the Development environment, the UI asked me to confirm the change before applying it. I only tested this in Development. Whether Production or a project with change requests enabled behaves differently (for example, requiring an approval first) I did not test, so check the docs for your setup before relying on it.

To actually use the flag, your application needs an SDK and the environment key from the SDK Keys page in that environment. The dashboard also shows code examples for installing and initialising an SDK right below the feature list.
Tips
- Pin and read release notes. The project releases frequently (the version number was already at 2.291 when I wrote this). Upgrade deliberately and check the release notes and the upgrade guide first.
- Back up PostgreSQL. All flags, environments and users live in the database. A nightly
pg_dumpfrom the postgres container is enough to start with. - Keep the task processor. It is not decoration. The compose file sets
TASK_RUN_METHODto the task processor, so background jobs depend on it running. - Use environments. Do not test flags in Production. The Development environment exists for exactly that.
- Configure email early. Password resets and invitations need SMTP. The docs list the required settings under email setup.
Limits and security
A few things worth knowing before you put this in front of your team.
First, it is open core. The BSD-licensed repository is the platform you just ran, but the project documents an Enterprise Edition with additional capabilities that require a paid license. Check that page if you need things like advanced governance features, and don't assume everything you see in the interface is available in the free self-hosted build.
Second, this is not a tiny service. Three containers and roughly 850 MiB of RAM right after startup is fine for a server, but heavier than a single-binary tool. The Flagsmith docs also have a sizing and scaling page if you expect real traffic from SDKs; I only ran a functional test, not a load test.
Third, security basics. Use HTTPS, set a real DJANGO_ALLOWED_HOSTS, generate your own secrets, and think about who can register. The upstream compose file contains commented-out PREVENT_SIGNUP and ALLOW_REGISTRATION_WITHOUT_INVITE options for limiting sign-ups, so look at them after you have created your admin account. I did not test these switches, so verify the behaviour yourself.
How it compares
The closest self-hostable alternatives are Unleash and GrowthBook, both open source with their own hosted offerings. Roughly, Unleash is also a flag-first service with a similar scope, and GrowthBook leans harder towards experimentation and analytics. I did not run either of them for this article, so take this as a rough orientation and check their docs. If you only need a handful of on/off switches for one app, an environment variable or a config file is simpler than any of these. Flagsmith starts to make sense when several people, environments or services need to flip flags without touching code.
Conclusion
Flagsmith 2.291.0 started cleanly from a plain Compose file, and the wizard plus the first flag took only a few minutes. The first start is slower than you might expect because of the migrations, and the allowed-hosts setting is the one thing that can send you in circles. If you want a self-hosted feature flag service with environments and a real UI, it is a solid starting point, as long as you are fine with the open-core split.