Overview
This guide covers deploying MergeWatch on either Railway or Render. Both platforms follow the same pattern: connect your GitHub repo, configure environment variables, add a Postgres database, and point your GitHub App webhook at the provided URL.Prerequisites
Gather your GitHub App credentials
| Variable | Description |
|---|---|
GITHUB_APP_ID | Numeric App ID from the GitHub App settings page |
GITHUB_PRIVATE_KEY | PEM-formatted private key generated for the App |
GITHUB_WEBHOOK_SECRET | Secret used to validate incoming webhook payloads |
Deploy on Railway
Create a new project
- Go to railway.app/new
- Select Deploy from Docker Image
- Enter the image:
ghcr.io/santthosh/mergewatch:latest
Add a PostgreSQL plugin
- In your project, click + New and select Database > PostgreSQL
- Railway provisions a Postgres instance and exposes the
DATABASE_URLvariable automatically
Set environment variables
Go to your service’s Variables tab and add:
| Variable | Value |
|---|---|
GITHUB_APP_ID | Your App ID |
GITHUB_PRIVATE_KEY | Your PEM private key |
GITHUB_WEBHOOK_SECRET | Your webhook secret |
LLM_PROVIDER | anthropic |
ANTHROPIC_API_KEY | Your Anthropic API key |
PORT | 3000 |
Railway sets
DATABASE_URL automatically from the PostgreSQL plugin. Do not set it manually unless you are using an external database.Deploy on Render
Create a new Web Service
- Go to dashboard.render.com
- Click New > Web Service
- Select Deploy an existing image from a registry
- Enter:
ghcr.io/santthosh/mergewatch:latest
Add a PostgreSQL service
- Click New > PostgreSQL
- Choose a name and plan (the free tier works for evaluation)
- Copy the Internal Database URL from the PostgreSQL service dashboard
Set environment variables
In the Web Service settings, go to Environment and add:
| Variable | Value |
|---|---|
GITHUB_APP_ID | Your App ID |
GITHUB_PRIVATE_KEY | Your PEM private key |
GITHUB_WEBHOOK_SECRET | Your webhook secret |
LLM_PROVIDER | anthropic |
ANTHROPIC_API_KEY | Your Anthropic API key |
DATABASE_URL | The Internal Database URL from the PostgreSQL service |
PORT | 3000 |
Set up Postgres
Both platforms provide managed PostgreSQL as a first-party add-on.| Platform | Postgres option | How DATABASE_URL is set |
|---|---|---|
| Railway | PostgreSQL plugin | Injected automatically when linked |
| Render | PostgreSQL service | Copy the Internal Database URL manually |
Configure the webhook URL
Set the webhook URL on your GitHub App to your platform URL followed by/webhook:
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.