# How to setup gitlab

> To set up GitLab, download the compatible package from the GitLab package repo, install it using the dpkg command, edit the configuration file with your external URL, reconfigure the services to apply changes, and log in to your offline environment using the generated password.

Canonical: https://livedemo.ai/tutorials/how-to-setup-gitlab/
Apps: GitLab
Updated: 2026-10-05
Interactive demo: https://story-api.livedemo.ai/workspaces/62255d3d3304f17b8f5e2d03/stories/692a4e60ab56e05a00ffa3e4/preview?step=1

## Steps

1. Go to GitLab package repo to find the version you want to install.
2. Choose the package that is compatible with your machine.
3. Scroll to the upper right corner and select "Download."
4. Run sudo dpkg -i gitlab-ce_<version>_amd64.deb to install GitLab, replacing <version> with the downloaded package version.
5. Wait for it to install.
6. Use sudo vim /etc/gitlab/gitlab.rb to edit the GitLab configuration file.
7. Set the external URL in /etc/gitlab/gitlab.rb and run sudo gitlab-ctl reconfigure to apply the changes.
8. Run sudo gitlab-ctl reconfigure to apply configuration changes and restart GitLab services.
9. Once reconfiguration is complete, copy the generated password from the output, as you'll need it to log in to your GitLab instance in the offline environment.
10. You can log in to your offline environment using 'root' as the username and the password you copied earlier.
