Self-hosting
Self-hosting
Run your own Aperture server, runner, dashboard and docs with Docker Compose.
Aperture ships as a set of Docker Compose services in the repository root.
Services
| Service | Compose profile | Port | What it is |
|---|---|---|---|
aperture-server | web | 4000 | The Phoenix API server, job queue and scheduler. |
runner | runner | internal 5000 | Runs jobs in gVisor-sandboxed containers. Privileged (Docker-in-Docker). |
aperture-dashboard | dashboard | 3000 → 80 | The web dashboard (nginx in prod, Vite dev server in dev). |
aperture-docs | docs | 3001 → 80 | This documentation site (static, nginx). |
postgres | postgres | internal 5432 | Database. |
minio, create-bucket | always on | 9000, 9001 | S3-compatible storage for execution logs. Replace with real S3 in production. |
COMPOSE_PROFILES in .env chooses which services start. The server and the
runner share the code-share volume, where deployed job code lives.
Requirements
- Docker with Compose v2.
- A Linux host that can run a privileged container with gVisor (
runsc); the runner needs it to sandbox jobs. - Optionally, a Stripe account for paid plans. Set
BILLING_ENABLED=falseto run without Stripe: every team is then unlimited and free. - S3 or an S3-compatible store for logs.
First start
cp .env.example .env
# Edit .env: see Configuration. At minimum set SECRET_KEY_BASE, GUARDIAN_SECRET_KEY,
# ENCRYPTION_KEY, URL_HOST and the S3_* values, and either the STRIPE_* values or
# BILLING_ENABLED=false.
./run up:detach # start the services in COMPOSE_PROFILES
./run setup # install deps, create and migrate the database, run seedsThe seeds create a sample team, project and users. Then:
- Create your account:
./run mix aperture.admin <email> <password>, or register in the dashboard (needsREGISTRATIONS_ENABLED=true). - Create a team; you become its owner.
- With billing on, optionally make the team billing-exempt.
- Point the CLI at your server with
APERTURE_API_URL=https://<your host>.
Set REGISTRATIONS_ENABLED=false afterwards if you don't want open sign-ups.
Production
- Build images with
MIX_ENV=prod docker compose build. The server image is an Elixir release; the dashboard and docs are static sites behind nginx. - Run migrations with
./run prod:migrateonce the server container is up. - Put the API, dashboard and docs behind HTTPS. Outbound webhooks to non-HTTPS URLs are refused in production.
- The dashboard's nginx proxies
/api/and the/socketwebsocket toAPI_UPSTREAM, which defaults to the hosted server. Set it on the dashboard container to your API, for exampleAPI_UPSTREAM=http://aperture-server:4000. The upstream must resolve when nginx starts. - Set
DASHBOARD_URLon the server to the dashboard's public URL; it's the only browser origin allowed on the websocket. VITE_*values are baked into the dashboard and docs at build time.
Next: Configuration and Operations.