Flagsmith
Feature flag and remote config service.
- Replaces
-
Paid feature flag services, such as LaunchDarkly.
All open-source alternatives to LaunchDarkly
- Difficulty
-
Difficulty: Hard
10 services (5 database or broker: postgres, kafka, clickhouse-server), 2 volume mounts, no env values to set, no elevated host access. Heuristic score 6 of 11: hard.
- Stack
Python (language), PostgreSQL (database), ClickHouse (database)
- Deployment
docker_compose
- Requirements
Not stated.
- License
-
BSD-3-Clause(OSI-approved open source)Read from github.com/Flagsmith/flagsmith/blob/d031dbe/LICENSE.md
- Business model
-
Unknown
The README at the pinned commit does not state a business model, so it stays unknown.
Source: github.com/Flagsmith/flagsmith/blob/d031dbe/README.md, read on .
- Repository
GitHub stats
- Stars
- 6,610
- Forks
- 591
- Open issues and pull requests
- 734
- Last push
- 2026-10-22
- Latest release
- v2.287.0
- Released
- 2026-10-20
From the GitHub API on . These numbers are a snapshot, not live. GitHub detected the license as BSD-3-Clause.
Compose file
# See https://docs.flagsmith.com/deployment/docker for more information on running Flagsmith in Docker
# This Docker Compose file will run the entire Flagsmith Platform
x-flagsmith-env: &flagsmith-env
# All environments variables are available here:
# API: https://docs.flagsmith.com/deployment/locally-api#environment-variables
# UI: https://docs.flagsmith.com/deployment/locally-frontend#environment-variables
DATABASE_URL: postgresql://postgres:password@postgres:5432/flagsmith
USE_POSTGRES_FOR_ANALYTICS: 'true' # Store API and Flag Analytics data in Postgres
ENVIRONMENT: production # set to 'production' in production.
DJANGO_ALLOWED_HOSTS: '*' # Change this in production
FLAGSMITH_DOMAIN: localhost:8000 # Change this in production
DJANGO_SECRET_KEY: secret # Change this in production
WAREHOUSE_CREDENTIALS_SECRET: &warehouse-credentials-secret secret # Change this in production
# PREVENT_SIGNUP: 'true' # Uncomment to prevent any additional signups
# ALLOW_REGISTRATION_WITHOUT_INVITE: 'true' # Uncomment and set to false to only allow signups via invitations
# Enable Task Processor
TASK_RUN_METHOD: TASK_PROCESSOR # other options are: SYNCHRONOUSLY, SEPARATE_THREAD (default)
PROMETHEUS_ENABLED: 'true'
# Uncomment if you want to enable Google OAuth. Note this does not turn Google OAuth on. You still need to use
# Flagsmith on Flagsmith to enable it - https://docs.flagsmith.com/deployment/#oauth_google
# DJANGO_SECURE_CROSS_ORIGIN_OPENER_POLICY: 'same-origin-allow-popups'
# For more info on configuring E-Mails - https://docs.flagsmith.com/deployment/locally-api#environment-variables
# Example SMTP:
# EMAIL_BACKEND: django.core.mail.backends.smtp.EmailBackend
# EMAIL_HOST: mail.example.com
# SENDER_EMAIL: [email protected]
# EMAIL_HOST_USER: [email protected]
# EMAIL_HOST_PASSWORD: smtp_account_password
# EMAIL_PORT: 587 # optional
# EMAIL_USE_TLS: 'true' # optional
# To run without experimentation, use docker-compose.flags-only.yml instead.
EXPERIMENTATION_ENABLED: 'true'
volumes:
pgdata:
clickhouse-data:
services:
postgres:
image: postgres:15.5-alpine
environment:
POSTGRES_PASSWORD: password
POSTGRES_DB: flagsmith
container_name: flagsmith_postgres
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -d flagsmith -U postgres']
interval: 2s
timeout: 2s
retries: 20
start_period: 20s
migrate-db:
image: docker.flagsmith.com/flagsmith/flagsmith:latest
command:
- migrate
environment:
<<: *flagsmith-env
healthcheck:
disable: true
depends_on:
postgres:
condition: service_healthy
flagsmith:
image: docker.flagsmith.com/flagsmith/flagsmith:latest
command:
- serve
environment:
<<: *flagsmith-env
ports:
- 8000:8000
depends_on:
migrate-db:
condition: service_completed_successfully
# The flagsmith_processor service is only needed if TASK_RUN_METHOD set to TASK_PROCESSOR
# in the application environment
flagsmith-task-processor:
image: docker.flagsmith.com/flagsmith/flagsmith:latest
environment:
<<: *flagsmith-env
ports:
- 8001:8000
depends_on:
migrate-db:
condition: service_completed_successfully
command: run-task-processor
# Experimentation services.
kafka:
image: apache/kafka:3.9.1
environment:
KAFKA_NODE_ID: 1
KAFKA_PROCESS_ROLES: broker,controller
KAFKA_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT
KAFKA_CONTROLLER_QUORUM_VOTERS: 1@kafka:9093
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
healthcheck:
test: ['CMD-SHELL', '/opt/kafka/bin/kafka-broker-api-versions.sh --bootstrap-server localhost:9092']
interval: 5s
timeout: 10s
retries: 20
kafka-init:
image: apache/kafka:3.9.1
entrypoint: ['/bin/sh', '-c']
command:
- |
for topic in flagsmith_warehouse_events external_warehouse_events external_warehouse_events_retry; do
/opt/kafka/bin/kafka-topics.sh --bootstrap-server kafka:9092 --create --if-not-exists --topic $$topic
done
depends_on:
kafka:
condition: service_healthy
# Connect it from Environment Settings > Warehouse > ClickHouse: host `clickhouse`, port 8123,
# TLS off, database `flagsmith_exp`, username `flagsmith`, password `password`.
clickhouse:
image: clickhouse/clickhouse-server:25.12
environment:
CLICKHOUSE_USER: flagsmith
CLICKHOUSE_PASSWORD: password
ulimits:
nofile:
soft: 262144
hard: 262144
volumes:
- clickhouse-data:/var/lib/clickhouse
healthcheck:
test: ['CMD', 'wget', '--spider', '-q', 'http://localhost:8123/ping']
interval: 5s
timeout: 3s
retries: 20
# Creates the events table from experimentation/clickhouse/events.sql.
clickhouse-init:
image: clickhouse/clickhouse-server:25.12
entrypoint: ['/bin/sh', '-c']
command:
- |
set -e
wget -qO /tmp/events.sql https://raw.githubusercontent.com/Flagsmith/flagsmith/main/experimentation/clickhouse/events.sql
clickhouse-client --host clickhouse --user flagsmith --password password --multiquery < /tmp/events.sql
depends_on:
clickhouse:
condition: service_healthy
ingestion-server:
image: flagsmith/events-ingestion-api:latest
environment:
KAFKA_BOOTSTRAP_SERVERS: kafka:9092
KAFKA_AUTH: none
KAFKA_TOPIC: flagsmith_warehouse_events
KAFKA_EXTERNAL_TOPIC: external_warehouse_events
DATABASE_URL: postgres://postgres:password@postgres:5432/flagsmith
ports:
- 8080:8080
depends_on:
migrate-db:
condition: service_completed_successfully
kafka-init:
condition: service_completed_successfully
warehouse-delivery:
image: flagsmith/warehouse-delivery:latest
environment:
KAFKA_BOOTSTRAP_SERVERS: kafka:9092
KAFKA_AUTH: none
DATABASE_URL: postgresql://postgres:password@postgres:5432/flagsmith
WAREHOUSE_CREDENTIALS_SECRET: *warehouse-credentials-secret
depends_on:
migrate-db:
condition: service_completed_successfully
kafka-init:
condition: service_completed_successfully
clickhouse-init:
condition: service_completed_successfully
From the app's own repository: github.com/Flagsmith/flagsmith/blob/d031dbe/docker-compose.yml.
Compose file from the app repository.
Install
- Docker with the Compose plugin (github.com/Flagsmith/flagsmith/blob/d031dbe/docker-compose.yml)
A host with Docker and the Docker Compose plugin. This entry runs from a compose file.
- Save the compose file as docker-compose.yml (github.com/Flagsmith/flagsmith/blob/d031dbe/docker-compose.yml)
Use the compose file shown above.
- Set the values the compose file needs (github.com/Flagsmith/flagsmith/blob/d031dbe/docker-compose.yml)
Replace the placeholder values listed under Gotchas.
- Start it (github.com/Flagsmith/flagsmith/blob/d031dbe/docker-compose.yml)
docker compose up -d - Open the app (github.com/Flagsmith/flagsmith/blob/d031dbe/docker-compose.yml)
Open http://localhost:8000. The compose file publishes host port 8000 for the flagsmith service.
Compose file check: config_ok on 2026-10-22.
Gotchas and maintenance
Gotchas
- Some images use the latest tag or no tag. Images without a pinned version: migrate-db: docker.flagsmith.com/flagsmith/flagsmith:latest, flagsmith: docker.flagsmith.com/flagsmith/flagsmith:latest, flagsmith-task-processor: docker.flagsmith.com/flagsmith/flagsmith:latest, ingestion-server: flagsmith/events-ingestion-api:latest, warehouse-delivery: flagsmith/warehouse-delivery:latest. A later pull can get a different version. (github.com/Flagsmith/flagsmith/blob/d031dbe/docker-compose.yml, checked 2026-10-22)
- The compose file has placeholder values. Placeholder values: POSTGRES_PASSWORD is "password" (postgres), DJANGO_SECRET_KEY is "secret" (migrate-db), WAREHOUSE_CREDENTIALS_SECRET is "secret" (migrate-db), DJANGO_SECRET_KEY is "secret" (flagsmith), WAREHOUSE_CREDENTIALS_SECRET is "secret" (flagsmith), DJANGO_SECRET_KEY is "secret" (flagsmith-task-processor), WAREHOUSE_CREDENTIALS_SECRET is "secret" (flagsmith-task-processor), CLICKHOUSE_PASSWORD is "password" (clickhouse) and 1 more. (github.com/Flagsmith/flagsmith/blob/d031dbe/docker-compose.yml, checked 2026-10-22)
- The compose file publishes host ports. Host ports: 8000 (flagsmith), 8001 (flagsmith-task-processor), 8080 (ingestion-server). A port without a host address listens on all host network interfaces. (github.com/Flagsmith/flagsmith/blob/d031dbe/docker-compose.yml, checked 2026-10-22)
Signals
- Open issues and pull requests: 734
- Last push: 2026-10-22 (0 days before this page was built)
- Latest release: v2.287.0 on 2026-10-20 (1 days before this page was built)