> For the complete documentation index, see [llms.txt](https://docs.violetlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.violetlabs.com/apps/g/gitlab/connect-self-hosted-gitlab.md).

# Connect self-hosted GitLab

### Connect Self-Hosted GitLab in Violet

1. In [Violet](https://app.violetlabs.com/) (or [VioletGov](https://app.violetgov.com/)), navigate to **Integrations** and click  <img src="/files/IS4aq5Ad1Nr6RFUu4LLg" alt="" data-size="line"> to add a new integration.&#x20;
2. Select <img src="/files/BDMftrAhpR13LsaU19Pm" alt="" data-size="line"> **GitLab.**
3. Toggle **Cloud Installation** off and provide the URL for your GitLab instance, followed by `/api`

<img src="/files/wAnFgq8YUUQIUWhy0w1I" alt="" width="375">

4. Enter your API token (follow the instructions [here](/apps/g/gitlab/generate-a-gitlab-api-token.md) to generate one) and click **Connect.**

\[Optional] You can also provide a unique name for the connection based on the credentials you're using, and you can create **restricted permissions** to users or groups:

<figure><img src="/files/SpT8vIwBwWHZWTDqTFdP" alt="" width="375"><figcaption></figcaption></figure>

4. Once connected, you can configure which types of data to ingest, how frequently data should be refreshed, etc.&#x20;
5. Last, click **Create** to begin fetching data. You're done!

Note, depending on your network settings, Violet may also need to be allowlisted by your GitLab server in order to connect. \
\
If so, allowlist the appropriate NAT Gateway IP address below:

* for Violet (violetlabs.com) : [50.19.87.143](https://us-east-1.console.aws.amazon.com/vpcconsole/home?region=us-east-1#Addresses:public-ip=50.19.87.143)
* for VioletGov (violetgov.com): [3.31.169.141](https://console.amazonaws-us-gov.com/vpc/home?region=us-gov-west-1#Addresses:public-ip=3.31.169.141)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.violetlabs.com/apps/g/gitlab/connect-self-hosted-gitlab.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
