Quick summary
This tutorial walks you through installing GitLab from the official package repository on a Linux machine, including configuring the external URL and running gitlab-ctl reconfigure to get your self-hosted instance ready to use. By the end, you can log in to GitLab using the auto-generated root password in an offline or air-gapped environment.
Steps
- Go to the GitLab package repository to find the version you want to install.
- Choose the package that is compatible with your machine architecture.
- Scroll to the upper-right corner of the page and click Download to get the package file.
- Run sudo dpkg -i gitlab-ce_<version>_amd64.deb in your terminal, replacing <version> with your downloaded package version, to install GitLab CE.
- Wait for the installation process to complete.
- Open the GitLab configuration file by running sudo vim /etc/gitlab/gitlab.rb.
- Set the external URL in /etc/gitlab/gitlab.rb, then run sudo gitlab-ctl reconfigure to apply your changes.
- Run sudo gitlab-ctl reconfigure again to fully apply all configuration changes and restart GitLab services.
- Once reconfiguration is complete, copy the generated password from the terminal output — you will need it to log in to your GitLab instance.
- Log in to your GitLab offline environment using root as the username and the password you copied from the output.
.gif)



