Upgrade Linux package instances

  • Tier: Free, Premium, Ultimate
  • Offering: GitLab Self-Managed

The instructions for upgrading a Linux package instance depend on whether you have a single-node or multi-node GitLab instance. To upgrade a multi-node Linux package GitLab instance, see:

To upgrade a single-node Linux package GitLab instance, follow the information on this page.

If you host the product documentation, you can also upgrade it to a later version.

Prerequisites

Before you upgrade a single-node Linux package GitLab instance:

The GitLab database is backed up before installing a newer GitLab version. You can skip this automatic database backup by creating an empty file at /etc/gitlab/skip-auto-backup:

sudo touch /etc/gitlab/skip-auto-backup

Nevertheless, you should maintain a full up-to-date backup on your own.

Upgrade a single-node Linux package instance

To upgrade a single-node Linux package instance:

  1. Consider turning on maintenance mode during the upgrade.
  2. Pause running CI/CD pipelines and jobs.
  3. Upgrade GitLab Runner to the same version as your target GitLab version.
  4. Upgrade GitLab with the Linux package.

After you upgrade:

  1. Unpause running CI/CD pipelines and jobs.
  2. If enabled, turn off maintenance mode.
  3. Run upgrade health checks.

Upgrade with the Linux package

To upgrade GitLab running on a single node, or upgrade a node that is part of a multi-node GitLab instance, upgrade by either:

All GitLab packages are posted to the GitLab package server.

RepositoryDescription
gitlab/gitlab-ceStripped down package that contains only the Community Edition features.
gitlab/gitlab-eeFull GitLab package that contains all the Community Edition and Enterprise Edition features.
gitlab/nightly-buildsNightly builds.
gitlab/nightly-fips-buildsNightly FIPS-compliant builds.
gitlab/gitlab-fipsFIPS-compliant builds.

By default, Linux distribution package managers install the latest available version of a package. You can’t upgrade directly to the latest major version of GitLab if your upgrade path requires multiple stops. If your upgrade path includes multiple versions, you must specify the specific GitLab package version with each upgrade.

If your upgrade path has no interim steps, you can upgrade directly to the latest version.

# GitLab Enterprise Edition (specific version)
sudo apt update && sudo apt install gitlab-ee=<version>-ee.0

# GitLab Community Edition (specific version)
sudo apt update && sudo apt install gitlab-ce=<version>-ce.0

# GitLab Enterprise Edition (latest version)
sudo apt update && sudo apt install gitlab-ee

# GitLab Community Edition (latest version)
sudo apt update && sudo apt install gitlab-ce
# GitLab Enterprise Edition (specific version)
sudo yum install gitlab-ee-<version>-ee.0.amazon2

# GitLab Community Edition (specific version)
sudo yum install gitlab-ce-<version>-ce.0.amazon2

# GitLab Enterprise Edition (latest version)
sudo yum install gitlab-ee

# GitLab Community Edition (latest version)
sudo yum install gitlab-ce
# GitLab Enterprise Edition (specific version)
sudo dnf install gitlab-ee-<version>-ee.0.el9

# GitLab Enterprise Edition (specific version)
sudo dnf install gitlab-ee-<version>-ee.0.el8

# GitLab Community Edition (specific version)
sudo dnf install gitlab-ce-<version>-ce.0.el9

# GitLab Community Edition (specific version)
sudo dnf install gitlab-ce-<version>-ce.0.el8

# GitLab Enterprise Edition (latest version)
sudo dnf install gitlab-ee

# GitLab Community Edition (latest version)
sudo dnf install gitlab-ce
# GitLab Enterprise Edition (specific version)
sudo dnf install gitlab-ee-<version>-ee.0.amazon2023

# GitLab Community Edition (specific version)
sudo dnf install gitlab-ce-<version>-ce.0.amazon2023

# GitLab Enterprise Edition (latest version)
sudo dnf install gitlab-ee

# GitLab Community Edition (latest version)
sudo dnf install gitlab-ce
# GitLab Enterprise Edition (specific version)
sudo zypper install gitlab-ee=<version>-ee.sles15

# GitLab Community Edition (specific version)
sudo zypper install gitlab-ce=<version>-ce.sles15

# GitLab Enterprise Edition (latest version)
sudo zypper install gitlab-ee

# GitLab Community Edition (latest version)
sudo zypper install gitlab-ce
# GitLab Enterprise Edition (specific version)
sudo zypper install gitlab-ee=<version>-ee.0.sles12

# GitLab Community Edition (specific version)
sudo zypper install gitlab-ce=<version>-ce.0.sles12

# GitLab Enterprise Edition (latest version)
sudo zypper install gitlab-ee

# GitLab Community Edition (latest version)
sudo zypper install gitlab-ce

Upgrade with a downloaded package

If you don’t want to use the official repositories, you can download the package and install it manually. This method can be used to either install GitLab for the first time or upgrade it.

To download and install or upgrade GitLab:

  1. Go to the official repository of your package.

  2. Filter the list by searching for the version you want to install. For example, 18.4.1. Multiple packages might exist for a single version, one for each supported distribution and architecture. Because some files are relevant to more than one distribution, there is a label next to the filename that indicates the distribution.

  3. Find the package version you wish to install, and select the filename from the list.

  4. In the upper-right corner, select Download.

  5. After the package is downloaded, install it by using one of the following commands and replacing <package_name> with the package name you downloaded:

    dpkg -i <package_name>
    rpm -Uvh <package_name>
    dnf install <package_name>
    zypper install <package_name>