# Install: Docker Single-container Docker run — suitable for testing or simple personal installs. ## Run Command ```bash docker run -d \ --name trek \ -p 3000:3000 \ -v ./data:/app/data \ -v ./uploads:/app/uploads \ -e ENCRYPTION_KEY= \ --restart unless-stopped \ mauriceboe/trek:latest ``` `ENCRYPTION_KEY` is strongly recommended but not strictly required. If omitted, a key is auto-generated on first start and persisted to `data/.encryption_key`. Setting it explicitly means you can recreate the container from scratch (e.g. on a new host) without losing access to stored encrypted data (API keys, SMTP credentials, OIDC secrets, MFA secrets). Generate an encryption key with: ```bash openssl rand -hex 32 ``` ### Common optional variables Pass additional `-e` flags for timezone and CORS/email link support: ```bash -e TZ=Europe/Berlin \ -e ALLOWED_ORIGINS=https://trek.example.com \ ``` See [Environment-Variables](Environment-Variables) for the full list. ## Image Tags | Tag | Example | Behavior | |---|--------------------------|---| | `latest` | `mauriceboe/trek:latest` | Always the newest release across all major versions | | Major version | `mauriceboe/trek:5` | Latest release pinned to that major version | | Minor version | `mauriceboe/trek:5.0` | Latest patch of that minor version; never moves to the next minor. Published from 5.0.0 on: 4.x releases have no minor tag, so pin those by major or full version | | Full version | `mauriceboe/trek:5.0.0` | Exact release; never changes | | `latest-pre` | `mauriceboe/trek:latest-pre` | Test build of the next version; not for production | Replace `mauriceboe/trek:latest` in the run command with your chosen tag to pin to a major version, a minor version or an exact release. See [Updating](Updating#image-tags) for how the tags behave. Every image carries the standard `org.opencontainers.image.*` labels (title, version, source, documentation, licence), so an update tool such as Renovate links an image update to its release notes. `docker inspect mauriceboe/trek:latest --format '{{json .Config.Labels}}'` shows them. ## First Start On the very first start with an empty database TREK creates an admin account. Without `ADMIN_EMAIL` and `ADMIN_PASSWORD` (both are needed, and they only apply on that first start) it uses `admin@trek.local` with a random password that is printed to the container log, so run `docker logs trek` and sign in with it. See [Quick-Start](Quick-Start). When you start a newer image, TREK first copies the database to `data/pre-migrate--