Prerequisites
- A container platform that can pull public images from
ghcr.io - A domain or subdomain for Compiler, such as
compiler.yourdomain.com, and a TLS certificate for it - A way to provision PostgreSQL and Redis, either managed services or your own
Step 1: Provision PostgreSQL and Redis
PostgreSQL 16 or later
PostgreSQL 16 or later
Create an empty database that Compiler owns. Managed services such as Amazon RDS, Aurora PostgreSQL, Cloud SQL and Azure Database for PostgreSQL work.The database user must be able to create tables and the
pg_trgm extension, which a migration adds when Compiler starts. On RDS, the master user can.Redis 7 or later
Redis 7 or later
Managed services such as Amazon ElastiCache and Memorystore work. Compiler refuses to start without Redis.
rediss:// URL when Redis requires TLS.
Step 2: Create the secrets
Generate an encryption key for stored credentials:Step 3: Run the container
Run one replica of the image with the secrets from step 2 and these settings:
The image is public and built for
linux/amd64 and linux/arm64, so no registry credentials are needed. The other environment variables are optional.
Choosing an image tag
Choosing an image tag
main is the latest build from the main branch; pull it again to update. Every build of main also has a sha-<commit> tag. Each release has an exact version tag, such as 3.0.0, and a minor version tag, such as 3.0, that moves to the latest patch release. Use an exact version or sha- tag to pin a version and roll back predictably. Settings in Compiler shows the commit your instance is running.Why set PORT
Why set PORT
Without
PORT, the app uses 3000 when that port is free and picks another when it isn’t. Setting it keeps the port your platform routes to fixed.Choosing a volume for /repos
Choosing a volume for /repos
Compiler clones the repositories it reads into
/repos. The contents can be lost safely: when someone asks a question, Compiler first fetches the project’s repositories and re-clones any that are missing. The first question after the contents are lost takes longer while this happens.Ephemeral storage, such as an emptyDir volume or ECS task storage, works. A persistent volume avoids re-cloning after every restart or deployment, which matters for large repositories. Size it for full clones of every repository in every project.Step 4: Configure the deployment lifecycle
Keep to one replica, and make sure an old and a new one never run side by side. Each replica runs migrations on startup and keeps its own clones of your repositories. When it receivesSIGTERM, Compiler stops taking new work and gives in-progress answers up to 25 seconds to finish, so allow at least 30 seconds before the container is killed.
- Kubernetes
- Amazon ECS
- Set
replicas: 1andstrategy.type: Recreate - Set
terminationGracePeriodSeconds: 30or more
Step 5: Add health checks
GET /up on port 3000 returns 200 OK when the app can reach its database, and 503 when it can’t. Use it for liveness and readiness probes, and for load balancer target health checks.
Requests wait until startup migrations finish, so give the first check some room with an initial delay, a startup probe or an ECS health check grace period.
Step 6: Expose it over HTTPS
The container serves plain HTTP. Put a load balancer, ingress or reverse proxy in front of it to terminate TLS, and point your domain at it.- Route
https://compiler.yourdomain.comto port 3000 on the container - Pass the public hostname through. For its MCP endpoint, Compiler compares the
X-Forwarded-Hostheader, or theHostheader whenX-Forwarded-Hostis absent, with the host inPUBLIC_URL. When they differ, it returns421 Misdirected Request. If your proxy setsX-Forwarded-Host, make sure it holds the public hostname. Kubernetes ingress controllers and AWS load balancers pass the original host by default - Allow long-lived responses. Answers stream over HTTP, so raise any idle or read timeout below a few minutes
/api/slack/events and project picker clicks to /api/slack/interactivity, so both paths need to be reachable from the internet. Claude and ChatGPT connect to the MCP server from their own servers, so it needs to be public for them too.
Step 7: Allow outbound access
If your network restricts egress, allow HTTPS (443) from the container to these hosts:
The container also needs to reach your database, Redis and any connectors you add.
If you configure storage, people’s browsers also need to reach
<bucket>.s3.<region>.amazonaws.com. Compiler sends the browser straight to the bucket, with a link that expires after 15 minutes, to show uploaded images and open attached files.
Compiler checks for new releases when it starts and once a day while it runs. It sends instances.usecompiler.com only its version and an anonymous instance ID, which is derived from TOKEN_ENCRYPTION_KEY and reveals nothing about it. No names, emails, code, conversations or the address your instance is served on are sent. As with any web request, the IP address it comes from reaches our servers and may appear in their logs, but it isn’t saved with the check. Admins then see when a newer release is out at the bottom of Settings. To turn it off, set CHECK_FOR_UPDATES=false. If the container can’t reach instances.usecompiler.com, the check fails quietly and nothing else is affected.
Nothing else needs to be reachable.
Step 8: Finish setup
Openhttps://compiler.yourdomain.com/setup, fill in the Set up your instance form to create the owner account, and click Save. Setup then walks you through:
- Connecting your code, through a GitHub App or a GitLab access token
- Choosing an AI provider, either the Anthropic API or AWS Bedrock
- Creating your first project
On AWS, Bedrock and S3 storage take an IAM access key ID and secret access key, entered in the app. Compiler doesn’t use instance profiles, ECS task roles or IAM Roles for Service Accounts (IRSA).
Updating
Pull the new image and restart the deployment. With themain tag, that’s a rollout restart on Kubernetes or a forced new deployment on ECS. With a pinned version or sha- tag, change the tag. Migrations run on startup.