# The GitLab application

In GitLab, open Admin area → Applications (on your own GitLab, for every user) or User settings → Applications (on gitlab.com), and add an application with the redirect URI…

1. In GitLab, open **Admin area → Applications** (on your own GitLab, for every user) or **User settings → Applications** (on gitlab.com), and add an application with the redirect URI `https://your-domain.example/app/docs/git/gitlab/callback`, **Confidential** ticked, and the `api` scope.
2. In **Admin → Settings → Git sync → GitLab**, fill in the Application ID and Secret, and your GitLab's address if it isn't gitlab.com.
3. Click **Test GitLab** to check the address answers.

A self-hosted GitLab must reach your install for webhooks; if it refuses addresses on your network, an administrator allows them under Admin area → Settings → Network → Outbound requests.

Running a sync by hand: `php artisan docs:git-sync` for what waits, or `php artisan docs:git-sync --all` for every connected branch.
