GitLab

Deploy self-managed GitLab for source control, code review and CI/CD in infrastructure you control, with sizing, runners, SSO, backups and required upgrade stops planned.

On this page

What a self-managed GitLab installation includes

A self-managed GitLab installation is the GitLab application plus the services behind it, running in infrastructure you control. Your team runs the Linux package or the Helm chart, together with PostgreSQL, Redis, Gitaly for repository storage, object storage and a fleet of GitLab Runner hosts. Most design work sits in those services and in the CI workload.

GitLab combines Git repositories, merge requests, issues, CI/CD pipelines, and package and container registries in one application. GitLab's installation requirements set a single node baseline of 8 vCPU and 16 GB of memory and advise against burstable instance types. They recommend SSD storage, especially for Gitaly, and advise avoiding network file systems such as NFS, Amazon EFS and Azure Files.

Check version floors before you buy hardware. GitLab 19.x requires PostgreSQL 17 at minimum and supports up to 18. GitLab 18.x requires PostgreSQL 16.5 and supports up to 17. Redis 7.2 is recommended with 7.0 as the minimum, Valkey 7.2 is supported, and Redis Cluster is not. Object storage is required for distributed deployments and recommended for all installations, and any S3-compatible service works.

Atlassian states that end of life for Jira Software, Jira Service Management, Confluence and Crowd Data Center takes place on March 28, 2029, while Bitbucket Data Center will not reach end of life (Atlassian). Bitbucket users face no forced move. Organizations replanning their Atlassian estate may use the window to decide whether source control and CI should share one self-managed platform. GitLab Dedicated is a different model: single-tenant SaaS hosted by GitLab in a chosen AWS region and listed for the Ultimate tier (GitLab Dedicated docs).

GitLab Community Edition vs Enterprise Edition: choose before installing

Edition and tier decide available features and valid restore targets.

OptionWhat it isDeployment effect
Community Edition (CE)Built from GitLab's MIT-licensed code, without the proprietary ee directory.No subscription and no paid-tier features. GitLab documents converting CE to EE later.
Enterprise Edition (EE)Includes the proprietary ee code. Premium and Ultimate features need a paid subscription.Choose it up front if paid features are likely. Backups restore only to the same version and edition type.
GitLab FOSSA read-only mirror of GitLab with all proprietary code removed, licensed under the MIT License (repository).It is a reference for what the MIT-licensed code contains.
Free-tier featuresGitLab lists SAML SSO and Gitaly Cluster (Praefect) on the Free tier for self-managed instances.SSO and repository-level HA do not by themselves require a subscription. Technical support for Gitaly Cluster is limited to Premium and Ultimate customers.
Premium and Ultimate featuresExamples include Geo secondary sites and LDAP group synchronization.Regional disaster recovery with Geo and directory-driven group membership need a subscription.
Restore targetA backup can only be restored to exactly the same version and type (CE or EE) on which it was created.Record the edition with every backup and keep the matching installer package available.

Components that shape the GitLab design

Each component scales, fails and is backed up differently.

Rails and Sidekiq

Puma serves the web UI and API and scales horizontally. Sidekiq runs background jobs and can be split into dedicated pools as load grows. Both are stateless Webservice and Sidekiq components in a Cloud Native Hybrid design. Queued job state lives in Redis, which the backup archive does not include, so monitor queues and plan job recovery separately.

Gitaly

Serves repository data. A single node keeps each repository on one host. Gitaly Cluster (Praefect) adds replication, and in HA form on Linux package installations Praefect, Consul and Redis Sentinel need an odd number of nodes for a voting quorum. Use SSD storage and avoid NFS. Support for the cluster feature is limited to Premium and Ultimate.

PostgreSQL and Redis

PostgreSQL holds application data, with PgBouncer and Consul in multi-node setups or a managed service. Redis holds cache and job queues, with Sentinel for HA. Check version floors against your release: PostgreSQL 17 minimum for 19.x, Redis 7.0 minimum, and no Redis Cluster support. The Helm chart expects both services outside the cluster.

Object storage

Holds artifacts, LFS objects, uploads, packages and registry images. GitLab's backup command does not copy blobs that are not stored on the file system, so enable versioning, replication or backups with the storage provider. Object storage is required for distributed deployments, and any S3-compatible service works. Decide bucket layout and retention before go-live.

GitLab Runner

Executes CI jobs and is installed separately. It supports Shell, Docker and Kubernetes style execution and runs on GNU/Linux, macOS and Windows. The executor decides how jobs are isolated. Keep the Runner major.minor version the same as the GitLab major.minor version, and check that at every upgrade stop.

Pick a GitLab reference architecture and size it from load

GitLab sizes its reference architectures primarily by requests per second, although other factors can also apply, and user counts are a guide. Automation, CI and mirroring generate load that headcount does not show. Collect request rates, repository sizes, monorepo outliers and pipeline volume first, then keep monitoring after go-live and compare real load with the architecture you chose. For environments serving 3,000 or more users, GitLab generally recommends a highly available strategy. For smaller environments a backup strategy is often sufficient. Write down which side of that line you chose and the load figure that would move you across it.

Integrate GitLab SAML SSO and harden the instance and runners

Connect GitLab to your identity provider through SAML or OpenID Connect so sign-in, MFA and offboarding follow central policy. GitLab lists SAML SSO for the Free, Premium and Ultimate tiers on self-managed instances, and SAML sessions end after 24 hours by default. Test a leaver: sessions, access tokens and SSH keys should stop working. LDAP group synchronization is listed for Premium and Ultimate and runs every hour by default, so confirm the tier if membership must follow LDAP.

GitLab's hardening guidance says to clear Allow new user accounts, set email confirmation to Hard, and enforce two-factor authentication with a grace period shorter than the 48-hour default. Enable Admin Mode, and select Enforce DNS-rebinding attack protection if any outbound access is allowed. Also restrict top-level group creation, keep administrator accounts separate from daily accounts, and review settings that let webhooks and integrations reach internal networks. Put TLS on every endpoint, including the container registry.

Treat runners as the highest-risk component. A CI job runs repository code with the runner's network access and any credential it can read. Separate runners for untrusted projects from those that deploy to production, avoid privileged mode unless a job requires it, keep secrets in protected and masked variables, and keep runner hosts easy to replace.

For GitLab Runner setup, choose the executor first, since Shell, Docker and Kubernetes style execution isolate jobs differently. Runner hosts can run GNU/Linux, macOS or Windows. Keep the Runner major.minor version equal to the GitLab version, record every runner in an inventory by trust level, and remove idle runners.

GitLab backup and restore: the archive and the secrets

The backup command produces one archive. A working restore needs more than that file.

ItemIn the backup archive?What to do
Database, repositories, wikis, uploads, CI artifacts and job logs on local storageYesSchedule the backup command and copy the archive off the host.
Backup commandsNot applicablePer GitLab's backup documentation, Linux package installs run sudo gitlab-backup create. Docker runs docker exec -t <container name> gitlab-backup create. Helm runs the backup-utility script on the toolbox pod.
/etc/gitlab/gitlab-secrets.jsonNoBack it up separately. It holds the key that decrypts encrypted database data and can change after upgrades.
/etc/gitlab/gitlab.rb, TLS certificates and SSH host keysNoBack them up with the secrets file. For Helm, keep values and Kubernetes secrets under the same control.
Redis, and therefore Sidekiq jobsNoDo not expect queued jobs to survive a restore. Plan for pipelines to be rerun or jobs resubmitted.
Object storage blobs, including registry imagesNoUse the storage provider's versioning, replication or backup features.
Restore targetNot applicableA backup restores only onto exactly the same version and edition type. Keep that installer package available offline.

Plan GitLab upgrades around required upgrade stops

GitLab ships minor releases on the third Thursday of each month, with patch releases on the Wednesday the week before and the Wednesday the week after. Major releases are scheduled for May each year, and the next one listed is GitLab 20.0 on May 20, 2027. Under the maintenance policy, security fixes are backported to the previous two monthly releases as well as the current stable release, and bug fixes only to the current stable release. The page lists 19.6 as receiving bug and security fixes, and 19.5 and 19.4 as receiving security fixes.

Since GitLab 17.5, required upgrade stops fall at x.2.z, x.5.z, x.8.z and x.11.z. The page lists 17.5.5, 17.8.7 and 17.11.7 for major 17, then 18.2, 18.5, 18.8 and 18.11 for major 18, and 19.2, 19.5, 19.8 and 19.11 for major 19. At each stop, let the background migrations finish before moving to the next. Install the latest available patch release of each major.minor version, for example 16.8.7 instead of 16.8.0.

GitLab Support maintains an Upgrade Path tool that calculates the stops between your current and target versions. Read each version's notes and rehearse on a restored copy of production. Back up the archive and the secrets file before each stop, and confirm runner compatibility. Because a backup restores only to the same version and type, keep the installer package for the version you run available offline.

To migrate Bitbucket to GitLab from Bitbucket Server or Data Center, GitLab's importer brings across repositories, pull requests with comments and reviewers, and LFS objects. Task lists, emoji reactions and approval rules are not imported, and embedded images remain external links to the original Bitbucket URLs. Keep the old server readable until those are handled. Converting build pipelines to .gitlab-ci.yml is separate work.

GitLab operating ownership

A self-managed GitLab instance needs named owners for the platform, the runner fleet, security controls and the change record.

Platform team

  • Monitor Sidekiq queues, Gitaly latency, database replication and disk growth.
  • Run scheduled backups and periodic restore tests.
  • Track the next required upgrade stop.
  • Check PostgreSQL and Redis versions against the GitLab release before each stop.

Runner owners

  • Maintain runner images, executors and autoscaling.
  • Separate runners by trust level and environment.
  • Remove idle runners and rotate runner tokens.
  • Keep Runner at the same major.minor version as GitLab.

Security

  • Review administrator accounts, tokens and deploy keys.
  • Approve integrations, webhooks and outbound rules.
  • Protect backups and the secrets file separately.
  • Review hardening settings such as Admin Mode and the two-factor grace period.

Change record

  • Keep gitlab.rb or Helm values in version control.
  • Log each upgrade stop and its result.
  • Record edition, tier and renewal date.
  • Store the installer package for the running version.

GitLab deployment questions

Do we need Enterprise Edition for GitLab SAML SSO on a self-managed instance?

Not for instance-wide SAML. GitLab lists SAML SSO for the Free, Premium and Ultimate tiers on self-managed instances, and SAML sessions end after 24 hours by default. LDAP group synchronization is listed for Premium and Ultimate and runs every hour by default. Decide which of the two your group membership model needs before you choose an edition, since directory-driven membership is the part that needs a subscription.

What is the difference between GitLab Community Edition and Enterprise Edition?

Community Edition is built from GitLab's MIT-licensed code without the proprietary ee directory, with no subscription and no paid-tier features. Enterprise Edition includes the proprietary code, and Premium and Ultimate features need a paid subscription. GitLab documents converting CE to EE later. A backup restores only to the same version and edition type, so the choice also affects recovery.

What are the GitLab self-hosted requirements?

The single node baseline is 8 vCPU and 16 GB of memory, and burstable instance types are not recommended. Use SSD storage, especially for Gitaly, and avoid NFS, Amazon EFS and Azure Files. GitLab 19.x needs PostgreSQL 17 or later, and 18.x needs 16.5 or later. Redis 7.2 is recommended, with 7.0 as the minimum and no Redis Cluster support. Object storage is recommended for all installations.

Can we skip versions when following the GitLab upgrade path?

Each required stop must be installed in order, and minor versions between stops can be passed over. Since 17.5, stops fall at x.2, x.5, x.8 and x.11. Let background migrations finish at each stop, and install the latest patch release of each one, for example 16.8.7 instead of 16.8.0. GitLab Support's Upgrade Path tool calculates the stops between your current and target versions.

Is GitLab Geo disaster recovery our whole plan?

Geo provides a warm-standby secondary site for disaster recovery and is listed for Premium and Ultimate on self-managed instances. Its failover is automated but not automatic. Without Geo, recovery relies on the backup archive, the secrets file and object storage protection. Rehearse either path before relying on it, and record which one your instance uses.

Do we need Gitaly Cluster for GitLab high availability?

Gitaly Cluster (Praefect) adds replication for repository storage. It is listed for the Free, Premium and Ultimate tiers, but technical support is limited to Premium and Ultimate customers. In HA form on Linux package installations Praefect needs an odd number of nodes. On Kubernetes it is a beta feature introduced in 19.1 and not recommended for production. GitLab generally recommends HA from 3,000 users, and a backup strategy is often enough for smaller environments.

How do we back up and restore GitLab?

Run sudo gitlab-backup create on Linux package installs, docker exec -t <container name> gitlab-backup create for Docker, or the backup-utility script on the toolbox pod for Helm. The archive excludes Redis, the /etc/gitlab files, TLS and SSH keys and certificates, and object storage blobs. Back up gitlab-secrets.json and gitlab.rb separately, use your storage provider's features for blobs, and restore only onto the same version and edition type.

How do we migrate Bitbucket to GitLab?

From Bitbucket Server or Data Center, GitLab's importer brings across repositories, pull requests with comments and reviewers, and LFS objects. It does not import task lists, emoji reactions or approval rules, and embedded images stay linked to the original Bitbucket URLs. Keep the old server readable until those are handled. Converting build pipelines to .gitlab-ci.yml is separate work.

Scope and handover

DeployOpen plans the edition, topology and sizing with your team, then deploys GitLab and its runners into your cloud account, data center or isolated network. We integrate SSO, harden instance and runner settings, and set up backups that include the secrets file.

We rehearse upgrades across required stops, document the platform and can provide ongoing support. Repository migration and pipeline conversion are scoped separately.

Handover includes the chosen reference architecture and its rationale, configuration in version control, the identity and group mapping, a runner inventory by trust level, restore test results, the current version with its next required stop, and named owners for each operating area.

Sources and further reading

More on GitLab

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.