> For the complete documentation index, see [llms.txt](https://docs.iftrue.co/getting-started/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.iftrue.co/getting-started/integrations/gitlab-self-managed.md).

# Gitlab (self-managed)

Estimated time to integrate: 4 minutes

***

## Getting Started

### Requirements

* You have an [iftrue](https://app.iftrue.co) account.
* You have your own Gitlab instance running on your own servers. eg: gitlab.example.com
* You have permission to create Gitlab Applications on your Gitlab Group.

### Variables Required

* Inbound IP addresses `34.36.101.243` `34.36.29.18`
* Outbound IP address `34.73.236.126`
* Callback url for oAuth APP `https://api.iftrue.co/v1/account/gitlab/callback`

### Adding Gitlab as a Git Provider

if you just signed up you will see this screen.

<figure><img src="/files/lEbk8mJgwEku84SqFhZa" alt=""><figcaption><p>Integrate GIT Provider Screen</p></figcaption></figure>

### Create Gitlab Application

We need to create Gitlab application to integrate iftrue. To access this page,

1. Click **Create Gitlab SSO Bridge**
2. **Navigate** to your Gitlab group settings. (Groups -> Select Group -> Settings)

<figure><img src="/files/5gQ1dTgZa4Q4RooIVksO" alt=""><figcaption><p>Gitlab Group Application Settings</p></figcaption></figure>

3. Set the callback URL and requested permissions.

**Copy paste the callback URL**

```
https://api.iftrue.co/v1/account/gitlab/callback
```

**We do not require repository read or write permissions.**&#x20;

<figure><img src="/files/l1qS4xWj3cs6GT2GAM8e" alt=""><figcaption><p>Gitlab Create Application</p></figcaption></figure>

4. **Copy and paste Application id and secret to iftrue**

<figure><img src="/files/YrsmOXZu5G01XvLFe04Z" alt=""><figcaption><p>Gitlab Application Secrets</p></figcaption></figure>

Copy those newly created application id and secret to iftrue onboarding page shown below.

<figure><img src="/files/dXzdfxgptFzlyAu99wTx" alt=""><figcaption></figcaption></figure>

5. **Enter your host url**

Insert your gitlab instances URL to the host URL section. This will validate your developers with oAuth.

6. **Create Integration once done**

Once you've created the application and the details, click create integration. This integration will be used by your own landing page in iftrue, which is,&#x20;

<mark style="color:blue;">**https\://\[your-organization-slug].app.iftrue.co**</mark>

When your team wants to signin you will use this address and your team will be able to signin with their Gitlab account by using oAuth 2.0.

7. **Create Access Token to Fetch Data**

We need to create access token to fetch data from your gitlab instance. In order to that,

navigate to groups settings and than click `Access Token`&#x20;

<figure><img src="/files/PO8Os2hVdqeG9oZGHeWj" alt=""><figcaption><p>Gitlab Group Access Token Menu</p></figcaption></figure>

Set the token properties as below,

<figure><img src="/files/pKAb6FzCOCVmTYcGc04Q" alt=""><figcaption><p>Gitlab Access Token Settings</p></figcaption></figure>

**Copy the access token and paste it to iftrue**

<figure><img src="/files/nHoprT7J7j38yGwnpvtF" alt=""><figcaption><p>Iftrue Gitlab Access Token Settings</p></figcaption></figure>

Hit save and you are ready to go :tada:
