Skip to Content
Aperture
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

ServiceCompose profilePortWhat it is
aperture-serverweb4000The Phoenix API server, job queue and scheduler.
runnerrunnerinternal 5000Runs jobs in gVisor-sandboxed containers. Privileged (Docker-in-Docker).
aperture-dashboarddashboard3000 → 80The web dashboard (nginx in prod, Vite dev server in dev).
aperture-docsdocs3001 → 80This documentation site (static, nginx).
postgrespostgresinternal 5432Database.
minio, create-bucketalways on9000, 9001S3-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=false to 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 seeds

The seeds create a sample team, project and users. Then:

  1. Create your account: ./run mix aperture.admin <email> <password>, or register in the dashboard (needs REGISTRATIONS_ENABLED=true).
  2. Create a team; you become its owner.
  3. With billing on, optionally make the team billing-exempt.
  4. 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:migrate once 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 /socket websocket to API_UPSTREAM, which defaults to the hosted server. Set it on the dashboard container to your API, for example API_UPSTREAM=http://aperture-server:4000. The upstream must resolve when nginx starts.
  • Set DASHBOARD_URL on 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.

On this page