Skip to content

Run GrowthBook with Docker

The fastest way to run GrowthBook locally is with Docker Compose. The Compose stack below starts GrowthBook and a MongoDB instance together — no manual database wiring required.

  1. Save the compose.yaml shown in the box above to your project root. The file defines two services — mongo and growthbook — and one named volume for file uploads.

  2. Start GrowthBook in the background by running:

Terminal window
docker compose up -d

The -d flag (detached mode) returns control to your terminal immediately while both containers start in the background.

  1. Open your browser at http://localhost:3000 — this is the GrowthBook web UI where you create feature flags, run experiments, and manage your account.

  2. Your SDK will talk to http://localhost:3100 — this is the GrowthBook SDK API endpoint. Your application fetches feature flag payloads from this URL, not from port 3000.

  3. Stop and inspect the stack when you are done:

Terminal window
# Stop all containers (data is preserved in the uploads volume)
docker compose down
# Tail live logs for the growthbook container only
docker compose logs -f growthbook
services:
mongo:
image: mongo:latest
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=password
growthbook:
image: growthbook/growthbook:latest
ports: ["3000:3000", "3100:3100"]
depends_on: [mongo]
environment:
- MONGO_URL=mongodb://root:password@mongo:27017/
volumes: ["uploads:/usr/local/src/app/packages/back-end/uploads"]
volumes:
uploads:
PortServicePurpose
3000GrowthBook web appAdmin UI — create flags, experiments, metrics
3100GrowthBook SDK APIYour application fetches feature flags from here
27017MongoDB (internal)Not exposed to the host; only used by the GrowthBook container

GrowthBook stores all of its own configuration in MongoDB — feature flag definitions, experiment configs, metrics, and team settings. MongoDB does not hold your analytics event data or your user data warehouse. Your raw events stay wherever they already live (Snowflake, BigQuery, Redshift, etc.).

# Start GrowthBook and MongoDB in the background
docker compose up -d

# Stop all containers (data is preserved)
docker compose down

# Tail live logs for the growthbook container
docker compose logs -f growthbook
Which port serves the GrowthBook web UI?
Which port do SDKs use to fetch feature flags?
What command starts GrowthBook in the background?
What does GrowthBook store in MongoDB?