Run ERouter in a container. Published image: awhite0030/ERouter — multi-platform linux/amd64 + linux/arm64.
docker run -d \
-p 20128:20128 \
-v "$HOME/.erouter:/app/data" \
-e DATA_DIR=/app/data \
--name erouter \
awhite0030/ERouter:latestApp listens on port 20128. Open: http://localhost:20128
docker logs -f erouter # view logs
docker stop erouter # stop
docker start erouter # start again
docker rm -f erouter # remove-v "$HOME/.erouter:/app/data" \
-e DATA_DIR=/app/dataWithout DATA_DIR, the app falls back to ~/.erouter/ (macOS/Linux) or %APPDATA%\erouter\ (Windows). In the container, DATA_DIR=/app/data makes the bind mount work.
Data layout under $DATA_DIR/:
$DATA_DIR/
├── db/
│ ├── data.sqlite # main SQLite database
│ └── backups/ # auto backups
└── ... # certs, logs, runtime configs
Host path: $HOME/.erouter/db/data.sqlite
Container path: /app/data/db/data.sqlite
docker run -d \
-p 20128:20128 \
-v "$HOME/.erouter:/app/data" \
-e DATA_DIR=/app/data \
-e PORT=20128 \
-e HOSTNAME=0.0.0.0 \
-e DEBUG=true \
--name erouter \
awhite0030/ERouter:latestThe ERouter image does not bundle Python or Headroom. To use Headroom in Docker, run it as a separate service and point ERouter at that proxy:
services:
erouter:
image: awhite0030/ERouter:latest
ports:
- "20128:20128"
volumes:
- "$HOME/.erouter:/app/data"
environment:
DATA_DIR: /app/data
HEADROOM_URL: http://headroom:8787
depends_on:
- headroom
headroom:
image: ghcr.io/chopratejas/headroom:latest
ports:
- "8787:8787"In the dashboard, open Endpoint → Token Saver → Headroom, confirm the URL is http://headroom:8787, recheck status, then enable Headroom.
If Headroom runs on the Docker host instead of as a sidecar, use http://host.docker.internal:8787 on macOS/Windows. On Linux, add --add-host=host.docker.internal:host-gateway or the equivalent compose extra_hosts entry.
docker pull awhite0030/ERouter:latest
docker rm -f erouter
# re-run the quick start commandcd app && docker build -t erouter .
docker run --rm -p 20128:20128 \
-v "$HOME/.erouter:/app/data" \
-e DATA_DIR=/app/data \
erouterPush a git tag v* → GitHub Actions builds multi-platform (amd64+arm64) and pushes to:
ghcr.io/awhite0030/ERouter:v{version}+:latestawhite0030/ERouter:v{version}+:latest
# Use scripts/release.js (recommended)
node scripts/release.js "Release title" "Notes"
# Or manually
git tag v0.4.x && git push origin v0.4.xWorkflow: app/.github/workflows/docker-publish.yml