GitLab Community Edition (CE) is a self-hosted Git repository platform with built-in CI/CD, issue tracking, container registry, and merge request workflows. This guide installs GitLab CE on Ubuntu 26.04 LTS using the official Omnibus package.
Tested and valid on:
- Ubuntu 26.04 LTS
Prerequisites
- Ubuntu 26.04 LTS with at least 4 GB RAM and 2 CPUs
- A domain name pointed at the server
- Ports 80, 443, and 22 open
Step 1 – Install Dependencies
sudo apt update
sudo apt install curl ca-certificates postfix tzdata -y
Step 2 – Add the GitLab Repository
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
Step 3 – Install GitLab CE
sudo EXTERNAL_URL='https://gitlab.example.com' apt install gitlab-ce -y
Step 4 – Retrieve the Initial Root Password
sudo cat /etc/gitlab/initial_root_password
Step 5 – Configure GitLab
Edit the configuration to customise GitLab:
sudo nano /etc/gitlab/gitlab.rb
Key settings:
external_url 'https://gitlab.example.com'
gitlab_rails['gitlab_email_from'] = '[email protected]'
gitlab_rails['smtp_enable'] = true
sudo gitlab-ctl reconfigure
Step 6 – Verify Services
sudo gitlab-ctl status
Step 7 – Backup GitLab
sudo gitlab-backup create
ls /var/opt/gitlab/backups/
Conclusion
GitLab CE is running on Ubuntu 26.04 LTS. Log in at your configured URL with root and the initial password. Create users, groups, and repositories, and enable GitLab CI/CD by adding a .gitlab-ci.yml to your repos.