> ## Documentation Index
> Fetch the complete documentation index at: https://hub-docs.wundergraph.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GitLab App Setup

> Create a GitLab OAuth application for connecting self-hosted or enterprise GitLab instances to WunderGraph Hub

If you are using a **self-hosted or enterprise GitLab instance**, you need to create an OAuth application on your GitLab instance before connecting it to WunderGraph Hub.

<Info>
  If you are using **GitLab.com** (cloud), you do not need to create an OAuth application. Simply select the **GitLab.com** tab when connecting and WunderGraph Hub will use the default OAuth app.
</Info>

## Creating a GitLab OAuth Application

### Step 1: Open Application Settings

You can create the OAuth application at either the **user level** or the **group level**:

<Tabs>
  <Tab title="User Application">
    1. Sign in to your GitLab instance.
    2. In the top-right corner, click your avatar and select **Edit profile**.
    3. In the left sidebar, Access > click **Applications**.
  </Tab>

  <Tab title="Group Application">
    1. Sign in to your GitLab instance.
    2. Navigate to your group.
    3. In the left sidebar, go to **Settings > Applications**.
  </Tab>
</Tabs>

### Step 2: Create a New Application

Fill in the application form with the following values:

| Field            | Value                                                             |
| ---------------- | ----------------------------------------------------------------- |
| **Name**         | `WunderGraph Hub` (or any name you prefer)                        |
| **Redirect URI** | `https://hub-api.wundergraph.com/api/webhooks/gitlab-postinstall` |
| **Confidential** | Enabled (checked)                                                 |
| **Scopes**       | `api`, `read_repository`, `write_repository`                      |

### Step 3: Save the Application

Click **Save application**. GitLab will display your:

* **Application ID** — this is your **Client ID**
* **Secret** — this is your **Client Secret**

<Warning>
  Copy the **Secret** immediately — GitLab will not show it again after you leave this page.
</Warning>

### Step 4: Connect to WunderGraph Hub

Return to WunderGraph Hub:

1. Go to **Settings > Integrations**.
2. Click **Connect GitLab**.
3. Select the **Self-Hosted** tab.
4. Enter your **Instance URL**, **Application ID**, and **Secret**.
5. Click **Connect**.

See the [GitLab Integration](./gitlab) page for the full connection walkthrough.
