Quickstart
-
Get the compose file
Terminal window curl -fsSL https://raw.githubusercontent.com/Strandgaard96/mc-gamertime/main/docker-compose.yml -o docker-compose.ymlNo clone needed — this one file is the whole self-host setup.
-
Set your admin credentials
Terminal window echo "ADMIN_USERNAME=admin" >> .envecho "ADMIN_PASSWORD=<your-password>" >> .envCompose auto-loads
.envfrom the same directory. The first boot creates this admin account; afterwards the variables are ignored, so an existing password is never overwritten. -
Start the stack
Terminal window docker compose up -dPulls the pre-built image from GHCR and creates the SQLite database and storage directory under
./config/app/on first run. Wait a few seconds for theappcontainer to become healthy.Image tags:
latestandX.Y.Zfollow releases;mainis the edge build from every commit. Pinimage: ghcr.io/strandgaard96/mc-gamertime:X.Y.Zindocker-compose.ymlif you want to control when you upgrade. -
Open the app
Navigate to
http://localhost:4263and log in.
What’s running
Section titled “What’s running”| Container | Role | Port (internal) |
|---|---|---|
app | FastAPI + React frontend, embedded SQLite, local filesystem storage | 4263 |
init | One-shot, fixes ownership on config/app then exits | none |
Only app is exposed to the host at localhost:4263.
docker-compose.yml
Section titled “docker-compose.yml”services: init: container_name: mc-gamertime-init image: alpine:3 user: root command: >- sh -c "mkdir -p /config/app && chown -R ${PUID:-1000}:${PGID:-1000} /config/app" volumes: - ./config:/config restart: "no" deploy: resources: limits: memory: 32m cpus: "0.1" security_opt: - no-new-privileges:true cap_add: - CHOWN - DAC_OVERRIDE cap_drop: [ALL]
app: container_name: mc-gamertime image: ghcr.io/strandgaard96/mc-gamertime:latest ports: - "${APP_PORT:-4263}:4263" environment: DB_BACKEND: sqlite STORAGE_BACKEND: local SECRETS_PROVIDER: env ORIGIN_GUARD_ENABLED: "false" PUBLIC_RECOMMENDED_ENABLED: "false" BGG_TOKEN: ${BGG_TOKEN:-} ADMIN_USERNAME: ${ADMIN_USERNAME:-} ADMIN_PASSWORD: ${ADMIN_PASSWORD:-} APP_BASE_URL: ${APP_BASE_URL:-} SMTP_HOST: ${SMTP_HOST:-} SMTP_PORT: ${SMTP_PORT:-587} SMTP_USERNAME: ${SMTP_USERNAME:-} SMTP_PASSWORD: ${SMTP_PASSWORD:-} SMTP_FROM_ADDRESS: ${SMTP_FROM_ADDRESS:-} METRICS_ENABLED: ${METRICS_ENABLED:-false} FORWARDED_ALLOW_IPS: ${FORWARDED_ALLOW_IPS:-} CORS_ALLOWED_ORIGINS: ${CORS_ALLOWED_ORIGINS:-} volumes: - ./config/app:/data restart: unless-stopped depends_on: init: condition: service_completed_successfully deploy: resources: limits: memory: 512m cpus: "1.0" reservations: memory: 128m cpus: "0.25" security_opt: - no-new-privileges:true cap_drop: [ALL]Next steps
Section titled “Next steps”- Configuration — BGG token for game search, password reset email, metrics
- HTTPS / Reverse proxy — before exposing it beyond your LAN
- Backups