GitLab Community Edition (CE) is a complete, self-hosted DevOps platform that combines Git repository hosting, issue tracking, CI/CD pipelines, container registry, and code review in a single application. Hosting GitLab internally gives organisations full control over their source code without relying on third-party services, making it the preferred choice for teams with data sovereignty requirements or those operating in air-gapped environments. GitLab CE is free and open-source; GitLab EE adds enterprise features (SAML SSO, advanced security scanning, compliance management) on the same codebase. This guide covers installing GitLab CE on RHEL 9 using the official Omnibus package (which bundles PostgreSQL, Redis, Nginx, and all GitLab components), performing initial configuration, and securing the installation with TLS.

Prerequisites

  • RHEL 9 with at least 4 GB RAM (8 GB recommended) and 20 GB disk space
  • A hostname or IP address for the GitLab server

Step 1 — Install GitLab CE

# Install dependencies
dnf install -y curl policycoreutils openssh-server perl

# Add the GitLab package repository
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | bash

# Install GitLab CE with your external URL
EXTERNAL_URL="https://gitlab.example.com" dnf install -y gitlab-ce

# GitLab Omnibus automatically:
# - Generates self-signed TLS certificates for the URL
# - Starts PostgreSQL, Redis, Nginx, Sidekiq, and Puma
# - Creates the 'root' admin account

Step 2 — Configure the Firewall

firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
firewall-cmd --permanent --add-service=ssh
firewall-cmd --reload

Step 3 — Get the Initial Root Password

# The initial root password is generated at install time
# It is valid for 24 hours — change it immediately after first login
cat /etc/gitlab/initial_root_password

# Access GitLab at: https://gitlab.example.com
# Login: root / (password above)
# Immediately change the password: User settings → Password

Step 4 — Key Configuration (gitlab.rb)

# Edit /etc/gitlab/gitlab.rb to customise GitLab
# After any change, reconfigure:

# Change the external URL
external_url 'https://gitlab.example.com'

# Use an existing SSL certificate instead of self-signed
nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.crt"
nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/gitlab.key"

# Configure SMTP for email notifications
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.gmail.com"
gitlab_rails['smtp_port'] = 587
gitlab_rails['smtp_user_name'] = "[email protected]"

# After editing gitlab.rb:
gitlab-ctl reconfigure

Step 5 — Basic Administration

gitlab-ctl status           # Check all GitLab component statuses
gitlab-ctl restart          # Restart all components
gitlab-ctl tail             # Follow all GitLab logs
gitlab-ctl backup-etc       # Back up GitLab configuration
gitlab-backup create        # Create a full GitLab backup (repos + DB)
gitlab-rake gitlab:check    # Run a health check

Conclusion

GitLab CE Omnibus on RHEL 9 delivers a complete self-hosted DevOps platform in a single package. The most critical post-installation tasks are: changing the root password immediately (the initial password expires in 24 hours), configuring SMTP for CI/CD notifications and account recovery, and setting up regular GitLab backups (gitlab-backup create) to an off-server location. For production use, configure GitLab to use Let’s Encrypt certificates automatically by setting letsencrypt['enable'] = true in gitlab.rb, which eliminates self-signed certificate warnings for all users.

Next steps: How to Configure GitLab CI/CD Pipelines on RHEL 9, How to Install Jenkins on RHEL 9, and How to Set Up a Git Server with Gitea on RHEL 9.