Note: This article covers GitLab installation on Debian 8 (Jessie), which has reached end-of-life. For production deployments, consider upgrading to a supported Debian release. The general installation approach described here remains instructive for understanding how GitLab Omnibus packages work.
What Is GitLab?
GitLab is a self-hosted, open-source DevOps platform that combines source code management, CI/CD pipelines, issue tracking, container registry, and more into a single application. It is available in two primary editions:
- Community Edition (CE) – Free and open-source, suitable for most teams.
- Enterprise Edition (EE) – Adds advanced features aimed at larger organizations.
The recommended installation method is the Omnibus package, which bundles GitLab together with all its dependencies (NGINX, PostgreSQL, Redis, etc.) into a single, self-contained package managed through apt.
Prerequisites
Before installing GitLab on Debian 8, make sure your system meets the following requirements:
- A fresh Debian 8 (Jessie) server with a non-root user that has
sudoprivileges. - At least 4 GB of RAM (GitLab recommends a minimum of 4 GB for small installations; 8 GB or more for teams).
- At least 2 CPU cores.
- Sufficient disk space — 7.2 GB minimum, with more recommended depending on repository sizes.
- A fully qualified domain name (FQDN) pointing to your server’s IP address, or at minimum a static IP.
- Ports 80 (HTTP) and 443 (HTTPS) open in your firewall.
Step 1: Update the System
Start by updating the package index and upgrading any existing packages:
sudo apt-get update
sudo apt-get upgrade -yCode language: JavaScript (javascript)
Step 2: Install Required Dependencies
GitLab’s installation script requires curl, openssh-server, and ca-certificates. If you want GitLab to send email notifications, also install postfix:
sudo apt-get install -y curl openssh-server ca-certificates
sudo apt-get install -y postfixCode language: JavaScript (javascript)
During the Postfix installation, select Internet Site and enter your server’s hostname when prompted.
Step 3: Add the GitLab Package Repository
GitLab provides an official installation script that adds the correct package repository for your distribution and imports the GPG signing key:
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bashCode language: JavaScript (javascript)
This script detects your OS and configures /etc/apt/sources.list.d/gitlab_gitlab-ce.list automatically.
Step 4: Install GitLab CE
With the repository configured, install the GitLab Community Edition Omnibus package:
sudo EXTERNAL_URL="http://your-domain-or-ip" apt-get install -y gitlab-ceCode language: JavaScript (javascript)
Replace your-domain-or-ip with your actual domain name or server IP address. The EXTERNAL_URL environment variable tells GitLab how it will be accessed externally and is written into /etc/gitlab/gitlab.rb during installation.
The installer will automatically configure and start all required services (NGINX, PostgreSQL, Redis, Sidekiq, etc.). This process can take several minutes.
Step 5: Access the GitLab Web Interface
Once installation completes, open a browser and navigate to your server’s domain or IP address:
http://your-domain-or-ipCode language: JavaScript (javascript)
On first access, GitLab will prompt you to set a password for the root administrator account. Set a strong password, then log in with username root and your chosen password.
Step 6: Basic Post-Installation Configuration
After logging in, consider these important initial configuration steps:
- Configure email settings – Edit
/etc/gitlab/gitlab.rbto set up SMTP for outgoing mail, then runsudo gitlab-ctl reconfigure. - Enable HTTPS – Set
EXTERNAL_URLto anhttps://address and configure an SSL certificate. GitLab Omnibus can use Let’s Encrypt automatically if your domain is publicly reachable. - Restrict sign-ups – In the Admin Area under Settings, disable open registration if this is a private instance.
- Set up SSH keys – Users should add their SSH public keys under their profile to enable Git-over-SSH access.
Useful GitLab Management Commands
The gitlab-ctl command-line tool manages the GitLab Omnibus stack:
# Restart all GitLab services
sudo gitlab-ctl restart
# Check the status of all services
sudo gitlab-ctl status
# Apply configuration changes from gitlab.rb
sudo gitlab-ctl reconfigure
# View GitLab logs
sudo gitlab-ctl tailCode language: PHP (php)
Further Reading
For more detail on this specific Debian 8 installation procedure, see the original guide on Unixmen: How to install GitLab on Debian 8 | Unixmen.
For up-to-date installation instructions covering current Debian releases, refer to the official GitLab installation documentation.