Skip to main content
If you have a Linux server — whether a cloud VPS from DigitalOcean, Hetzner, Linode, or a physical machine in your data center — you can run MergeWatch with Docker Compose. This gives you full control over the deployment with minimal dependencies.

Overview

This guide covers running MergeWatch and Postgres as Docker containers, setting up a reverse proxy with TLS using nginx or Caddy, and configuring the GitHub App webhook to point at your domain.

Prerequisites

1

Install Docker and Docker Compose

Verify the installation:
2

Open port 443

Ensure your firewall allows inbound HTTPS traffic on port 443. If you use ufw:
3

Point a domain at your server

Create a DNS A record pointing your domain (e.g. mergewatch.example.com) to your server’s public IP address. A domain is required for TLS certificates.
4

Gather your GitHub App credentials

5

Choose an LLM provider

Set LLM_PROVIDER to your preferred provider. For the default Anthropic provider, you also need ANTHROPIC_API_KEY.

Deploy with Docker Compose

1

Create the project directory

2

Create the docker-compose.yml

3

Create the .env file

Protect the .env file. Set permissions to owner-only: chmod 600 .env
4

Start the services

Verify both containers are running:

Set up Postgres

By default, the docker-compose.yml above runs PostgreSQL as a container alongside MergeWatch. Data is persisted to a Docker volume (pgdata).
If you prefer an external managed database, remove the postgres service from docker-compose.yml and set DATABASE_URL in your .env file to the external connection string.

Set up a reverse proxy with TLS

Expose MergeWatch on port 443 with TLS using nginx or Caddy. GitHub requires HTTPS for webhook delivery.
Caddy automatically provisions and renews TLS certificates from Let’s Encrypt. With nginx, use certbot to obtain certificates: sudo certbot --nginx -d mergewatch.example.com
Enable the nginx site and reload:

Configure the webhook URL

Set the webhook URL on your GitHub App to your domain followed by /webhook:
Do not expose port 3000 directly to the internet without TLS. Always use a reverse proxy with HTTPS.

Next steps

Configure review behavior

Tune sensitivity, ignored paths, and review focus areas.

Environment variables

Full list of supported environment variables.

Troubleshooting

Common issues and how to fix them.

Upgrading

How to update MergeWatch to the latest version.