Upgrade Linux package instances

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

Upgrade a Linux package installation to a later version of GitLab.

You can perform upgrades with the GitLab instance online. When you execute the upgrade command, PostgreSQL, Redis, and Gitaly must be running.

To upgrade a Linux package instance:

  1. Complete the initial steps in the main GitLab upgrade documentation.
  2. Continue the upgrade by following the next sections.
  3. After upgrading, if you host the product documentation, you can upgrade to a later version.

Prerequisites

Before you upgrade a Linux package 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.

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 by using 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>