Docker Deployment
This guide will help you get Arcadia running quickly using Docker Compose.
Prerequisites
- Docker and Docker Compose installed
- Git (to clone the repository)
If running docker compose doesn’t work, you may have an older version of the docker cli installed and may need to use docker-compose instead.
Also don’t forget to use sudo if you aren’t in the docker group!
Quick Setup
-
Copy Configuration Files
cp config.example.yml config.yml cp example.env .envDocker Compose automatically injects inter-container networking and credentials via environment variables from
.env, so no manual changes toconfig.ymlare required for a local test run. -
Start Services
docker compose up -dThis starts the core services:
- PostgreSQL database (
db) and automatic schema migrations (init_db) - Redis cache (
redis) - Backend API and periodic task runner (
backend) - BitTorrent tracker (
tracker, listening on host port8081) - Frontend UI and reverse proxy (
frontend, powered by Caddy on host port5173)
- PostgreSQL database (
-
Database Initialization & Initial User Setup
Choose one of the following approaches depending on your deployment:
Option A: Development (Load Sample Fixtures) Populate the database with demo data:
docker compose exec -T db psql -U arcadia -d arcadia < backend/storage/migrations/fixtures/fixtures.sqlCredentials of the user with all permissions:
- Username:
picolo - Password:
test
Option B: Production (Clean Database & First Admin Setup) If you do not load
fixtures.sql, the database initializes cleanly with schema migrations alone. To set up your first administrator:- Navigate to
http://localhost:5173/register(or your domain) and register your desired username and password. - By default, newly registered users have the
newbieclass with zero administrative permissions. Promote your account to have full administrator permissions:docker compose exec -it db psql -U arcadia -d arcadia -c "UPDATE users SET permissions = enum_range(NULL::user_permissions_enum) WHERE username = 'YOUR_USERNAME';" - Log in to the web interface to access site administration and create user classes.
- Username:
-
Access the Application
- Frontend Web UI:
http://localhost:5173 - Backend API:
http://localhost:5173/api/(proxied internally via Caddy) - Tracker Announce:
http://localhost:8081/announce/<passkey>(legacy fallback:http://localhost:8081/<passkey>/announce)
- Frontend Web UI:
Production Deployment
By default, Docker Compose uses development credentials (arcadia / password). For production deployments:
-
Set Strong Passwords in
.env:cp example.env .envEdit
.envand replace all placeholder passwords (ARCADIA_DATABASE__PASSWORD,ARCADIA_REDIS__PASSWORD, etc.) with strong random values (e.g. generated viaopenssl rand -hex 32). -
Configure URLs and Secrets in
config.yml: Update settings marked# Production:inconfig.example.yml(api.jwt_secret,tracker.api_key, public URLs, andsmtp:). See also the Configuration Reference.
Docker Compose automatically propagates credentials from .env across the stack:
db: Configures PostgreSQL user, password, database, and healthcheck.init_db: InjectsDATABASE_URLfor running schema migrations.redis: Configures Redis server password authentication (--requirepass).backend&tracker: Injects database and Redis credentials via environment variables, overriding values fromconfig.yml. Leave thedatabase:andredis:sections commented out inconfig.yml(any values placed there are overridden and ignored).
Note
PostgreSQL only uses
POSTGRES_PASSWORDwhen initializing a new database cluster. If you changeARCADIA_DATABASE__PASSWORDon an existing installation after thedb_datavolume has already been initialized, you must also update the password inside PostgreSQL:docker compose exec -it db psql -U arcadia -d arcadia -c "ALTER USER arcadia WITH PASSWORD 'new_password';"
Reverse Proxy & HTTPS (Production)
The frontend container serves the static frontend files and proxies access to all other containers using Caddy.
To make Arcadia accessible via HTTPS with automatic Let’s Encrypt certificates across all services (Web UI, API, BitTorrent tracker, Chevereto image host, and Grafana monitoring), copy the tracked production templates:
cp compose.override.yml.example compose.override.yml
cp Caddyfile.example Caddyfile
Edit Caddyfile with your domain names. See the Compose Override Guide for full routing and service details.
Upgrading
For routine updates:
git fetch && git pull
docker compose up -d --build
The init_db container automatically runs pending incremental database migrations before the backend starts.
Warning
Because Arcadia is under rapid development, database schema changes are often committed directly to the baseline migration (
backend/storage/migrations/20250312215600_initdb.sql) rather than distributed as incremental migrations. When this happens,init_dbwill fail with an SQLx checksum mismatch error. When pulling updates with baseline schema changes, follow the Schema Migration Upgrade Guide to dump, recreate, and restore your database.
Troubleshooting
- If services fail to start, check logs with:
docker compose logs [service-name] - To rebuild images:
docker compose build - To reset everything:
docker compose down -v && docker compose up -d