Overview
This guide covers preparing container images and model weights on a connected machine, transferring them to an air-gapped environment, and running MergeWatch with Ollama for fully offline code reviews.Prerequisites
1
Connected machine (for preparation)
You need a machine with internet access to download container images and model weights before transferring them to the air-gapped environment.
2
Air-gapped machine
The target machine needs Docker and Docker Compose installed (these can be installed from offline packages).
3
Transfer medium
A USB drive, external disk, or internal file transfer mechanism with at least 15 GB of free space (container images + model weights).
4
Gather your GitHub App credentials
In an air-gapped environment, your GitHub Enterprise Server instance must be reachable from the MergeWatch host on the internal network. Configure
GITHUB_API_URL to point to your GHE instance.Prepare images on a connected machine
1
Pull the required container images
2
Pull the Ollama model
Download the model weights using the Ollama CLI or container:
3
Save images to tar files
4
Export the Ollama model volume
5
Copy files to transfer medium
Copy these four files to your USB drive or transfer medium:
mergewatch.tarollama.tarpostgres.tarollama-models.tar.gz
Deploy on the air-gapped machine
1
Load the container images
2
Restore the Ollama model volume
3
Create the docker-compose.yml
4
Create the .env file
5
Start all services
6
Verify Ollama is serving the model
Set up Postgres
Postgres runs as a container in the docker-compose stack above. Data is persisted to thepgdata Docker volume.
If your air-gapped environment has an existing PostgreSQL instance, remove the
postgres service from docker-compose.yml and set DATABASE_URL in your .env file to the existing database connection string.Configure the webhook URL
Set the webhook URL on your GitHub Enterprise Server App to the MergeWatch host followed by/webhook:
Next steps
Configure review behavior
Tune sensitivity, ignored paths, and review focus areas.
Environment variables
Full list of supported environment variables.
VPS / Bare Metal guide
Reverse proxy and TLS setup for self-hosted servers.
Troubleshooting
Common issues and how to fix them.