ghcr.io/usecompiler/compiler. This guide runs it with Docker Compose, next to Caddy for automatic SSL.
To run Compiler on Kubernetes, ECS or another platform, see Other platforms.
Prerequisites
- A server with Docker and Docker Compose
- A domain name pointing at the server, with ports 80 and 443 open
Dependencies
Compiler needs PostgreSQL 16 or later and Redis 7 or later. Choose one of two paths.- Bundled (default)
- Your own Postgres and Redis
The compose file in step 1 runs Postgres and Redis as their own containers next to Compiler, with their data in Docker volumes. There is nothing else to set up, so follow the steps from 1. Create the files as written.
1. Create the files
Make a folder for Compiler and put these three files in it.
Generate the password and the key with:
2. Start Compiler
https://your-domain and sign up as the first user. Setup then asks for your GitHub App.
3. Create a GitHub App
Compiler reads your code through a private GitHub App that you own. The short version is below; GitHub App setup explains each setting.1
Start a new app
Go to
https://github.com/settings/apps/new, or for an organization https://github.com/organizations/YOUR_ORG/settings/apps/new.2
Name it
Set GitHub App name to anything unique (for example
Acme Compiler) and Homepage URL to https://your-domain.3
Set the callback
Set both the Callback URL and, under Post installation, the Setup URL to
https://your-domain/onboarding/github-callback. Check Redirect on update.4
Turn off what Compiler doesn't use
Uncheck Expire user authorization tokens and Request user authorization (OAuth) during installation. Under Webhook, uncheck Active.
5
Set permissions
Under Repository permissions, set Contents and Metadata to Read-only. Leave everything else as No access.
6
Create it
Under Where can this GitHub App be installed?, choose Only on this account, then click Create GitHub App.
7
Collect the credentials
Note the App ID at the top of the settings page and the slug from the app’s public URL (
github.com/apps/<slug>). Under Private keys, click Generate a private key to download a .pem file..pem file, then click Install GitHub App and choose the repositories Compiler may read. GitHub sends you back to Compiler, where you choose your AI provider (Anthropic API or AWS Bedrock) and create your first project.
To change any of this later, open Settings as an admin.
Behind a firewall
Without a public domain, skip Caddy and reach the app directly. Createdocker-compose.override.yml next to the other files:
docker-compose.override.yml
http://your-server:3000, and use that address in place of https://your-domain when creating the GitHub App.
Updating
Data and backups
With the bundled database, back it up with:
.env with it. With your own Postgres, use your provider’s backups.