# GitLab

> Part of the NocoDB documentation (Product docs > Sync > App Sync > On Premise Auth Integration). Index of all pages: https://nocodb.com/llms.txt. Any docs page is available as Markdown by adding `.md` to its URL.

URL: https://nocodb.com/docs/product/sync/app-sync/on-premise-oauth/gitlab
Last updated: 2026-10-03

Set up the GitLab OAuth2 authentication integration for a self-hosted NocoDB instance.

This document tells you how to set up the GitLab authentication integration for NocoDB.

## Environment Variables

To enable OAuth2 authentication with GitLab, set up these environment variables:

### Step 1: Create a GitLab OAuth Application

1. Log in to your GitLab account.
2. Go to User Settings > Applications. For an organization-wide application, go to your Group settings > Applications.
3. Fill in the form:

* **Name**: Your application name (for example, "NocoDB")
* **Redirect URI**: The URL where GitLab sends users after authorization (for example, `https://your-nocodb-instance.com/`)
* **Scopes**: Select these scopes:
* `api` (API access)
* `read_user` (Read user information)
* `read_repository` (Read repository contents)
* `write_repository` (Write repository contents)

4. Click "Save application".

### Step 2: Get Application ID and Secret

After you create your OAuth App, GitLab gives you:

* Application ID (Client ID)
* Secret (Client Secret)

### Step 3: Set Environment Variables

Configure your NocoDB instance with these environment variables:

```
INTEGRATION_AUTH_GITLAB_CLIENT_ID=your_gitlab_client_id
INTEGRATION_AUTH_GITLAB_CLIENT_SECRET=your_gitlab_client_secret
INTEGRATION_AUTH_GITLAB_REDIRECT_URI=your_redirect_uri
```

Where:

* `your_gitlab_client_id`: The Application ID from your GitLab OAuth App
* `your_gitlab_client_secret`: The Secret from your GitLab OAuth App
* `your_redirect_uri`: The callback URL that you specified when you created the OAuth App (for example, `https://your-nocodb-instance.com/`)

## OAuth Scopes

The GitLab integration requests these GitLab scopes:

* `api`: Access to the GitLab API
* `read_user`: Read-only access to user profile data
* `read_repository`: Read-only access to repository contents over HTTPS
* `write_repository`: Write access to repository contents over HTTPS

## Availability

* App Sync is available on **NocoDB Cloud** (Plus plan and above) and licensed self-hosted deployments (Business plan and above). This page covers OAuth app setup for **self-hosted** deployments. On NocoDB Cloud, these OAuth apps are preconfigured.

---

## Related pages

- [Bitbucket](https://nocodb.com/docs/product/sync/app-sync/on-premise-oauth/bitbucket.md): Set up the Bitbucket OAuth2 authentication integration for a self-hosted NocoDB instance.
- [GitHub](https://nocodb.com/docs/product/sync/app-sync/on-premise-oauth/github.md): Set up the GitHub OAuth2 or GitHub App authentication integration for a self-hosted NocoDB instance.
- [Google Calendar](https://nocodb.com/docs/product/sync/app-sync/on-premise-oauth/google-calendar.md): Set up the Google Calendar OAuth2 authentication integration for a self-hosted NocoDB instance.
- [Linear](https://nocodb.com/docs/product/sync/app-sync/on-premise-oauth/linear.md): Set up the Linear OAuth2 authentication integration for a self-hosted NocoDB instance.
- [Outlook Calendar](https://nocodb.com/docs/product/sync/app-sync/on-premise-oauth/outlook-calendar.md): Set up the Outlook Calendar OAuth2 authentication integration for a self-hosted NocoDB instance.
