GitLab Self-Managed Setup#
MergeMonkey supports GitLab CE/EE 15.0+ running on your own infrastructure. The registration flow offers two paths:
- Automatic (recommended) — paste an admin token once; we provision the MergeMonkey user and OAuth app on your instance.
- Manual — you create an OAuth App and a personal access token yourself.
Both paths land at the same place: a working, signed-in MergeMonkey account connected to your instance.
For gitlab.com see GitLab Cloud.
Integration overview#
OAuth Application
Personal Access Token
Webhooks
Network access
Step 1 — Start the self-managed flow#
Open the MergeMonkey login page and pick Self-Managed
Visit mergemonkey.dev/auth/login, click Continue with GitLab. Pick Self-Managed from the Cloud / Self-Managed choice that appears.

Enter your instance URL
Enter your GitLab instance URL (for example
https://gitlab.example.com) and click Continue. MergeMonkey checks whether your organization has already been registered.
Choose an install method
If your instance isn't registered yet you'll see the Install MergeMonkey toggle with two options — Manual and Automatic. Pick one; the rest of this guide is split accordingly.

Pick a path#
Automatic setup#
With Automatic, MergeMonkey uses a short-lived admin token to create everything on your instance for you — the MergeMonkey bot user and a pre-configured OAuth application.

Create a Personal Access Token (admin)
In GitLab: your avatar → Edit profile → Access Tokens. Create a token with:
- Scopes:
api,admin_mode - Expiration: 1 day (the token is used once and never stored)
- Role: Admin
- Scopes:
Paste the admin token
Back on the MergeMonkey registration form, paste the token into Admin Access Token and click Continue.
What MergeMonkey provisions
During the next ~30 seconds we:
- Create a bot user named
mergemonkeyhqon your instance. - Create an OAuth application with the correct redirect URI (
https://mergemonkey.dev/auth/gitlab/callback) and scopes (api, read_user, email, openid). - Generate a personal access token for the bot user so it can post MR comments.
- Store the OAuth credentials (encrypted at rest).
The admin token you pasted is not stored — it's used to make the provisioning API calls and then discarded.
- Create a bot user named
Sign in normally
After provisioning, the login page refreshes. Click Continue with GitLab → Self-Managed, enter your instance URL, and complete OAuth as any user would.
Revoke the admin token
In GitLab, revoke the admin PAT from Step 1 — it's no longer needed.
It's scoped to a short expiration, lives only for the duration of the request, and is never written to disk or logs. For paranoid security postures you can use the Manual flow instead — same outcome, no admin token required.
Enable projects#
GitLab (unlike a GitHub App) requires opting projects in one at a time. After signing in:
Open the Repos page
Visit /platform/repos. Your GitLab projects are listed alongside any GitHub repos.
Enable a project
Toggle Enable on the rows you want reviewed. MergeMonkey creates a project-level webhook (no manual copy-paste needed).
Verify
Open any merge request on the enabled project — a review from
mergemonkeyhqposts within ~60 seconds.
Networking checklist#
- Outbound from MergeMonkey worker → your GitLab API (HTTPS 443).
- Inbound from GitLab →
https://app.mergemonkey.dev/webhooks/gitlab. - Self-managed GitLab behind a VPN? Contact us about running a MergeMonkey worker inside your network.
Register the exact URL your users hit (e.g. https://gitlab.example.com,
not https://gitlab.example.com/ with a trailing slash). We normalize
the URL but OAuth redirects must match byte-for-byte.
Troubleshooting#
"Your organization is not registered with us"#
Expected on the first run for a new instance. Complete either the Automatic or Manual path above to register. Once registered, all subsequent users sign in normally.
OAuth error: "redirect URI mismatch"#
The Redirect URI on your OAuth Application must be exactly https://mergemonkey.dev/auth/gitlab/callback — no trailing slash, no http://, no typos. Edit the OAuth Application and resave.
"Invalid token" when validating the form#
- For Automatic: the admin token expired or lacks
admin_mode. Create a new one. - For Manual: the bot PAT is missing
apiscope, or the Client ID/Secret don't match the OAuth Application. Re-copy them.
Reviews never appear#
Check the project's webhook delivery log: Project → Settings → Webhooks → Edit → Recent events. 4xx/5xx responses indicate ingress unreachable or a secret mismatch. A 200 with no review means the job is queued but the worker is throttled or at quota.