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

# GitLab (self-hosted)

> How to connect your self-hosted GitLab instance to Weave

## Setup

To set up a self-hosted GitLab instance, you need to create an application in GitLab. This allows
you and your organization members to authenticate using your GitLab instance, and allows Weave to
access your instance's API on your behalf.

1. Go to the [data sources page](https://app.workweave.ai/data)
2. On the GitLab card, click **Connect self-hosted** button
3. Follow the instructions to create an application in GitLab. When configuring scopes, select
   `read_api`, `read_repository`, `openid`, `profile`, and `email`.
4. Select the repositories you want to connect to Weave
5. Go to the [members page](https://app.workweave.ai/members) and ensure everyone from your GitLab
   instance is added as a Weave user.

## Automatic repository sync

When a complete repository listing confirms that all available repositories are selected or explicitly excluded, Weave enables auto-sync for new repositories. Saving from a group selection without a complete listing leaves auto-sync disabled.

Removing individual repositories excludes them from sync while preserving the existing auto-sync setting, so they won't be added back automatically.

## Reconnecting an existing instance

For applications configured with `read_api`, add `read_repository` to the application's scopes in GitLab before reconnecting in Weave. Existing access tokens do not gain this permission automatically; a Weave administrator must authorize the connection again. Older applications configured with `api` can keep that scope.

Weave uses one GitLab account per instance for your organization's repository discovery and sync. Reconnecting replaces that shared account's credentials and refreshes the available project lists. Use an account with Maintainer or Owner access to the repositories your organization needs. Deleting an instance disconnects its repositories for the whole organization.

## Maintenance and outages

Planned maintenance or temporary gateway errors on your GitLab instance do not immediately trigger integration alerts or circuit breakers. Weave tolerates a grace period of failed syncs while the instance is unreachable, then resumes normal health monitoring once syncs succeed again or the grace window expires.

## Limitations

You can connect to multiple self-hosted GitLab instances, or to both self-hosted and cloud GitLab.
However, each user in Weave can only be connected to a single GitLab user.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.