Docker Compose
Use this guide to start Litefuse from the single-node Docker Compose bundle. The bundle runs Litefuse Web, Litefuse Worker, Postgres, Redis, MinIO, and Doris on the same host.
Prerequisites
- Docker Engine, Docker Desktop, or OrbStack
- Docker Compose v2
- Free ports:
3000,3030,5432,16379,19090,19091,8030,9030,9010,8040,8060,9050,9060
On Apple Silicon machines, Docker may show a linux/amd64 image platform warning. This is a Docker platform notice and does not mean startup failed.
Start Litefuse
Open the directory that contains the self-hosting bundle and run:
bash start.shIf you are one directory above the bundle:
cd litefuse && bash start.shThe first run creates a .env file automatically if it does not exist. The generated file includes secrets for authentication, encryption, Postgres, Redis, and MinIO.
The bundled Compose file uses the litefuse/litefuse-web:26.0.0 and litefuse/litefuse-worker:26.0.0 images and runs them with platform: linux/amd64.
Open the Application
After startup, open:
http://localhost:3000Check the public health endpoint:
curl http://localhost:3000/api/public/healthExpected response:
{"status":"OK","version":"26.0.0"}Components
| Service | Container | Purpose | Exposed ports |
|---|---|---|---|
litefuse-web | litefuse-web | Web and API service | 3000 |
litefuse-worker | litefuse-worker | Background jobs, queue consumers, and S3 batch exports | 3030 |
postgres | litefuse-postgres | Metadata database | 127.0.0.1:5432 |
redis | litefuse-redis | Queue and cache | 127.0.0.1:16379 |
minio | litefuse-minio | S3-compatible object storage | 19090, 127.0.0.1:19091 |
doris | litefuse-doris | Analytical data store | 8030, 9030, 9010, 8040, 8060, 9050, 9060 |
Default Docker networks:
litefuse_default:10.200.0.0/24litefuse_doris_internal:172.30.0.0/24
Environment Variables
To configure values manually, copy the template first:
cp .env.example .envThen edit .env and start Litefuse:
bash start.shThe startup script auto-generates these values when .env is missing:
NEXTAUTH_SECRETSALTENCRYPTION_KEYPOSTGRES_PASSWORDREDIS_AUTHMINIO_ROOT_PASSWORD
The application containers use LITEFUSE_* environment variables for Litefuse-specific features:
LITEFUSE_ENABLE_EXPERIMENTAL_FEATURESLITEFUSE_INIT_ORG_IDLITEFUSE_INIT_ORG_NAMELITEFUSE_INIT_PROJECT_IDLITEFUSE_INIT_PROJECT_NAMELITEFUSE_INIT_PROJECT_PUBLIC_KEYLITEFUSE_INIT_PROJECT_SECRET_KEYLITEFUSE_INIT_USER_EMAILLITEFUSE_INIT_USER_NAMELITEFUSE_INIT_USER_PASSWORDLITEFUSE_ANALYTICS_BACKENDLITEFUSE_AUTO_DORIS_MIGRATION_DISABLEDLITEFUSE_ENABLE_BACKGROUND_MIGRATIONS
The worker also enables S3 batch exports by default:
LITEFUSE_S3_BATCH_EXPORT_ENABLED=trueLITEFUSE_S3_BATCH_EXPORT_BUCKET=litefuseLITEFUSE_S3_BATCH_EXPORT_PREFIX=exports/LITEFUSE_S3_BATCH_EXPORT_EXTERNAL_ENDPOINT=http://localhost:19090
ClickHouse compatibility variables remain present, but ClickHouse migrations are disabled because this Compose deployment uses Doris as the analytics backend.
Common Commands
Check service status:
docker compose --env-file .env -f docker-compose.yml psTail logs:
docker compose --env-file .env -f docker-compose.yml logs -fStop services while keeping persistent data:
bash stop.shRestart services:
bash start.shRemove containers, networks, and all volumes:
docker compose --env-file .env -f docker-compose.yml down -vdown -v deletes persistent Postgres, MinIO, and Doris data. Use it only when you no longer need the existing data.
Upgrade
Pull images:
docker compose --env-file .env -f docker-compose.yml pullRestart Litefuse:
bash start.shBackup
Back up Postgres metadata:
docker exec litefuse-postgres pg_dump -U postgres postgres > litefuse-postgres.sqlPersistent data is stored in these Docker volumes:
litefuse_postgres_datalitefuse_minio_datalitefuse_doris_fe_metalitefuse_doris_be_storage
Troubleshooting
Network Subnet Conflict
Example error:
invalid pool request: Pool overlaps with other one on this address spaceThis means an existing Docker network already uses 10.200.0.0/24 or 172.30.0.0/24.
Inspect Docker networks:
docker network ls
docker network inspect <network-name> --format '{{range .IPAM.Config}}{{.Subnet}}{{end}}'If the old network is not needed, remove it:
docker network rm <network-name>If the old network must remain, update networks.*.ipam.config.subnet and gateway in docker-compose.yml.
Container Name Conflict
Example error:
Conflict. The container name "/litefuse-doris" is already in useFind the conflicting container:
docker ps -a --filter name='^/litefuse-doris$'If the old container is not needed, remove it:
docker rm -f litefuse-dorisDoris Starts Slowly or Becomes Unhealthy
Doris may take time on first boot. Check logs:
docker logs --tail 200 litefuse-dorisIf you see proxy-related errors, confirm that the host or Docker runtime is not injecting proxy variables such as http_proxy or https_proxy into the Doris container.
Web or Worker Restarts
Check logs:
docker logs --tail 200 litefuse-web
docker logs --tail 200 litefuse-workerAfter changing .env, recreate the web and worker containers:
docker compose --env-file .env -f docker-compose.yml up -d --force-recreate litefuse-web litefuse-worker