Docker and container issues
Container exits immediately
Container exits immediately
The MergeWatch container will exit on startup if required environment variables are missing or malformed.Fix: Check the container logs for the specific error:Common causes:
- Missing
GITHUB_APP_ID,GITHUB_PRIVATE_KEY,GITHUB_WEBHOOK_SECRET, orDATABASE_URL - Malformed
GITHUB_PRIVATE_KEY(must be the full PEM content, including-----BEGIN RSA PRIVATE KEY-----headers) - Invalid
DATABASE_URLformat
.env file contains all required variables listed in the environment variables reference.Port conflict on startup
Port conflict on startup
If port 3000 or 3001 is already in use, Docker Compose will fail to bind.Fix: Either stop the conflicting process or change the port mapping in You can also set the
docker-compose.yml:PORT environment variable to change the port inside the container.Database connection refused
Database connection refused
The MergeWatch server cannot connect to Postgres. This typically happens when Postgres has not finished starting before MergeWatch tries to connect.Fix:
- Confirm the Postgres container is running:
docker compose ps - Check that
DATABASE_URLmatches your Postgres container’s hostname, port, user, and password - If using the default
docker-compose.yml, the Postgres service is namedpostgres— the connection string should usepostgresas the hostname (e.g.postgresql://mergewatch:password@postgres:5432/mergewatch) - Restart the stack:
docker compose down && docker compose up -d
Cannot pull Docker images
Cannot pull Docker images
The images If the images are public, a
ghcr.io/santthosh/mergewatch:latest and ghcr.io/santthosh/mergewatch-dashboard:latest are hosted on GitHub Container Registry.Fix: Authenticate with GHCR if pulling from a private registry:docker compose pull without authentication should work.Webhook not receiving events
GitHub App webhook URL does not match your server URL
GitHub App webhook URL does not match your server URL
The webhook URL configured on your GitHub App must point to your MergeWatch server’s publicly accessible URL.Fix: Go to GitHub Settings > Developer settings > GitHub Apps > your app > Webhook URL and verify it points to your server (e.g.
https://mergewatch.example.com/webhook). For local development, use a tunnel like ngrok.Webhook secret mismatch
Webhook secret mismatch
The
GITHUB_WEBHOOK_SECRET environment variable must match the secret configured on the GitHub App. A mismatch causes every delivery to fail signature validation.Fix: Compare the value in your .env file with the value in GitHub App settings > Webhook > Secret. They must be identical.Review not posting comments
Missing pull_requests: write permission
Missing pull_requests: write permission
The GitHub App needs write access to pull requests to post review comments.Fix: Go to GitHub App settings > Permissions & events > Repository permissions and confirm Pull requests is set to Read & write.
LLM provider issues
LLM provider issues
Reviews fail if MergeWatch cannot reach the configured LLM provider. Check the logs for specific error messages:
Anthropic: invalid API key or rate limit
Anthropic: invalid API key or rate limit
Verify
ANTHROPIC_API_KEY is correct and your account has sufficient credits. Check your usage at console.anthropic.com.Bedrock: model access not enabled or throttling
Bedrock: model access not enabled or throttling
Amazon Bedrock requires you to explicitly enable model access before invoking a model.
- Open AWS Console > Amazon Bedrock > Model access and enable the model your deployment uses
- For throttling, request a quota increase in AWS Console > Service Quotas > Amazon Bedrock
- For higher throughput, use a cross-region inference profile:
LiteLLM: connection refused or auth error
LiteLLM: connection refused or auth error
Verify
LITELLM_BASE_URL is reachable from the MergeWatch container. If both run in Docker, they must be on the same Docker network. Check that LITELLM_API_KEY is set if your proxy requires authentication.Ollama: model not found or connection refused
Ollama: model not found or connection refused
Verify If Ollama runs as a sidecar container, use its Docker network hostname, not
OLLAMA_BASE_URL is reachable from the MergeWatch container. Confirm the model is pulled:localhost.”Skipped” on every PR
Skip rules in .mergewatch.yml are too broad
Skip rules in .mergewatch.yml are too broad
The Narrow the patterns or remove entries that are too aggressive.
ignorePatterns configuration may be matching all files in the diff.Fix: Review your .mergewatch.yml file:PR is a draft
PR is a draft
Draft pull requests are skipped by default.Fix: Either mark the PR as Ready for review or set
skipDrafts: false in your .mergewatch.yml:All changed files match excluded paths
All changed files match excluded paths
MergeWatch auto-skips a PR when every changed file matches an excluded pattern (lock files, generated code, documentation, etc.).Fix: Confirm the PR includes at least one source file that is not in an excluded path. Check the skip reason in the server logs:
Dashboard 401 / auth failing
NextAuth secret not set
NextAuth secret not set
The dashboard uses NextAuth for session management. A missing Add the output as
NEXTAUTH_SECRET causes all authentication to fail with a 401.Fix: Generate and set the secret:NEXTAUTH_SECRET in your dashboard environment configuration.GitHub OAuth callback URL mismatch
GitHub OAuth callback URL mismatch
The callback URL configured on the GitHub OAuth App must match the dashboard’s URL exactly.Fix: Go to GitHub Settings > Developer settings > OAuth Apps > your app and set the Authorization callback URL to:
NEXTAUTH_URL not set or incorrect
NEXTAUTH_URL not set or incorrect
NextAuth needs the
NEXTAUTH_URL variable to construct callback URLs. If it is missing or wrong, redirects break.Fix: Set NEXTAUTH_URL to the canonical URL of your dashboard (e.g. https://dashboard.mergewatch.dev for SaaS, or http://localhost:3001 for self-hosted). Do not include a trailing slash.Review taking too long (>5 minutes)
Large diffs with many files
Large diffs with many files
PRs with more than 50 changed files take significantly longer to review.Fix: Set a file limit in your Files beyond the limit are summarized rather than reviewed line-by-line.
.mergewatch.yml:Slow LLM responses
Slow LLM responses
Response time depends on your LLM provider and the model you are using.Fix:
- Anthropic / Bedrock: Check provider status pages for outages. Consider switching to a faster model via
LLM_MODEL. - LiteLLM: Check your proxy’s latency metrics and upstream provider status.
- Ollama: Ensure sufficient CPU/GPU resources. Smaller models (e.g.
llama3.1:8b) respond faster but may produce lower-quality reviews.