Skip to Content
Aperture
Self-hosting

Configuration

Every environment variable the server, dashboard, docs and Compose setup read.

All services read .env in the repository root (start from .env.example).

Server

Variables marked required stop the server from starting when missing.

Core

VariableRequiredDefaultDescription
SECRET_KEY_BASEyesPhoenix secret. Generate with ./run secret.
GUARDIAN_SECRET_KEYyesSigns login tokens and API keys. Changing it invalidates every token.
ENCRYPTION_KEYyesEncrypts secrets (AES-256). Must be base64 of 32 bytes (openssl rand -base64 32); the server refuses to start otherwise. Don't change it once secrets exist.
URL_HOSTyesPublic host of the API, used in generated URLs such as trigger URLs.
URL_SCHEMEhttpsScheme for generated URLs.
URL_PORT443Port for generated URLs.
PORT4000Port the server listens on.
DASHBOARD_URLhttp://localhost:5173Dashboard URL, used in invitation emails and Stripe redirects. Also the only browser origin allowed on the websocket.
REGISTRATIONS_ENABLEDoffSet to true to allow sign-ups from the dashboard and API. Admin tasks and seeds ignore it.
BILLING_ENABLEDtrueSet to false to run without Stripe: the STRIPE_* variables become optional, every team is billing-exempt, and the Stripe webhook endpoint returns 404.
RUNNER_URLhttp://runner:5000Runner service URL. Read when the server is built, not at start-up.
MIX_ENVproddev or prod. Also selects the Docker build targets.

Database

VariableDefaultDescription
DATABASE_URLOptional Ecto URL; the variables below fill in anything it omits.
POSTGRES_HOSTpostgres
POSTGRES_PORT5432
POSTGRES_USERaperture
POSTGRES_PASSWORDpassword
POSTGRES_DBvalue of POSTGRES_USER
POSTGRES_POOL15Connection pool size.

Log storage (S3)

All required.

VariableDescription
S3_BUCKETBucket for execution logs (default aperture).
S3_REGIONRegion.
S3_HOST, S3_PORTEndpoint host and port. HTTPS is always used.
S3_ACCESS_KEY_ID, S3_SECRET_ACCESS_KEYCredentials.

Log links are pre-signed against S3_HOST, so it must be reachable from the browsers that open logs.

Email

Invitations are sent by email.

VariableDescription
EMAIL_PROVIDERresend, aws (SES), or anything else to not send email (dev).
RESEND_API_KEYFor resend.
AWS_SES_REGION, AWS_SES_ACCESS_KEY_ID, AWS_SES_SECRET_ACCESS_KEYFor aws.
EMAIL_FROM_NAME, EMAIL_FROM_ADDRESSSender. Set both.

In development, unsent emails can be viewed at http://localhost:4000/dev/mailbox.

Stripe

Required unless BILLING_ENABLED=false: STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, STRIPE_PRODUCT_ID, STRIPE_PRICE_PRO, STRIPE_PRICE_PREMIUM_BASE, STRIPE_PRICE_PREMIUM_JOB_MINUTES, STRIPE_PRICE_PREMIUM_WEBHOOK_DELIVERIES, STRIPE_METER_JOB_EXECUTION_MINUTES, STRIPE_METER_WEBHOOK_DELIVERIES, STRIPE_SUCCESS_URL, STRIPE_CANCEL_URL.

Point Stripe's webhooks at https://<api host>/api/v1/webhooks/stripe.

Clustering

VariableDescription
DNS_CLUSTER_QUERYDNS name that resolves to the other server nodes, to cluster them.

Dashboard (build time)

Baked in when the dashboard is built.

VariableDefaultDescription
VITE_API_URL/apiAPI base including /api, e.g. https://api.example.com/api.
VITE_API_VERSION1API version number (not v1).
VITE_SOCKET_URL/socket in the Docker imageWebsocket URL. The image's nginx proxies /socket to the API.
VITE_DOCS_URLhttps://aperture-docs.mountaindev.comTarget of the sidebar's Documentation link.
VITE_APP_NAMEApertureName in the page title.

The dashboard image also reads one variable at run time:

VariableDefaultDescription
API_UPSTREAMhttps://aperture-server.mountaindev.comWhere nginx proxies /api/ and /socket.

Docs site (build time)

VariableDefaultDescription
DOCS_URLhttps://aperture-docs.mountaindev.comPublic origin of the docs, used for canonical links and the URLs in llms.txt. Passed to the image as VITE_DOCS_URL.

Compose

VariableDefaultDescription
COMPOSE_PROFILESServices to start: any of postgres, web, runner, dashboard, docs.
DOCKER_WEB_PORT_FORWARD127.0.0.1:4000Host binding for the API.
DOCKER_DASHBOARD_PORT_FORWARD127.0.0.1:3000Host binding for the dashboard.
DOCKER_DOCS_PORT_FORWARD127.0.0.1:3001Host binding for the docs.
DOCKER_RESTART_POLICYunless-stoppedRestart policy.
DOCKER_WEB_CPUS, DOCKER_WEB_MEMORY, DOCKER_DASHBOARD_CPUS, DOCKER_DASHBOARD_MEMORY, DOCKER_POSTGRES_CPUS, DOCKER_POSTGRES_MEMORY0 (no limit)Container resource limits.
DOCKER_WEB_HEALTHCHECK_TEST, DOCKER_DASHBOARD_HEALTHCHECK_TEST, DOCKER_DOCS_HEALTHCHECK_TESTcurl …Health check commands.
MINIO_ROOT_USER, MINIO_ROOT_PASSWORDminioadminLocal MinIO credentials.
UID, GID1000User IDs for the server image.

On this page