Updated: 18 November 2026 · Applies to: Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9

GitLab is a self-hosted Git platform with CI/CD. Install the official Omnibus package.

The operating system versions in the original guide (CentOS 7, Ubuntu 16.04/18.04, Debian 8/9) are no longer supported, so this guide uses Ubuntu 24.04, Debian 12, AlmaLinux 9 and Rocky Linux 9.

Requirements

  • GitLab recommends 8 vCPU and 16 GB RAM for a single server; small teams can run it with at least 8 GB RAM using its memory-constrained settings.
  • A domain pointing to the server.

Install GitLab Community Edition

# Ubuntu / Debian
curl -fsSL https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | bash
EXTERNAL_URL="https://gitlab.example.com" apt install gitlab-ce

# AlmaLinux / Rocky
curl -fsSL https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | bash
EXTERNAL_URL="https://gitlab.example.com" dnf install gitlab-ce

With an https URL, GitLab requests a Let's Encrypt certificate itself. The initial root password is in /etc/gitlab/initial_root_password (deleted after 24 hours).

Open the firewall

ufw allow 80,443/tcp                                   # Ubuntu / Debian with UFW
firewall-cmd --permanent --add-service=http --add-service=https && firewall-cmd --reload   # AlmaLinux / Rocky

Tip: Back up with gitlab-backup create and keep /etc/gitlab/gitlab-secrets.json safe as well.

Manage GitLab

gitlab-ctl status            # state of all GitLab services
gitlab-ctl reconfigure       # apply changes made in /etc/gitlab/gitlab.rb
gitlab-ctl tail              # follow the logs
  • Change settings (URL, email, SMTP) in /etc/gitlab/gitlab.rb, then run gitlab-ctl reconfigure.
  • Update with apt upgrade gitlab-ce or dnf upgrade gitlab-ce. Follow GitLab's upgrade path: skipping required stops between major versions can fail.

Common problems

  • 502 error right after install: GitLab takes a few minutes to start; wait and reload. If it stays, check memory with free -h.
  • Let's Encrypt fails: the domain must point to the server and port 80 must be open.

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Unmanaged dedicated servers

full root access and free IPMI KVM, with Free Basic Managed Support.

Managed dedicated servers

our engineers look after the server for you, from $135 a month.

Was this answer helpful?

Still stuck? Open a ticket