Wednesday, 4 March 2026

Upgrade self-hosted GitLab instance on Ubuntu after falling too far behind

I recently ran into a signing key issue on an Ubuntu system running gitlab-ee from the official GitLab repos but didn't notice for a while so my normal automatic upgrades hadn't been working to keep it updated. This may have also been affecting other package upgrades... not sure yet.

Anyway, the first thing to solve was getting the latest repo key installed. Downloading and running the script mentioned in step 2 of https://docs.gitlab.com/install/package/ubuntu/?tab=Enterprise+Edition did the trick for the key. 

Afterwards, I was faced with the issue of being multiple Minor revisions behind. This manifested as this error:

gitlab preinstall: It seems you are upgrading from 18.6 to 18.9.
gitlab preinstall: It is required to upgrade to the latest 18.8.x version first before proceeding.
gitlab preinstall: Please follow the upgrade documentation at https://docs.gitlab.com/ee/update/index.html#upgrade-paths

GitLab uses semantic versioning and has some recommendations with a variety of what they dub "upgrade stops" to allow for some shortcuts. In my case I opted to essentially get on the latest Patch release of my current Minor version, then upgrade to the highest Patch release of the next Minor version and so on.

To do this, I found the magic combo of the apt command to specify which version you would like:

e.g. apt-get install gitlab-ce=18.6.5-ee.0 

along with the list of possibilities for Ubuntu noble in the GitLab repo.

Note that between each upgrade, you need to give gitlab a chance to complete all it's migrations and settle down. I will typically watch top for a bit until things settle down, test the instance by browsing around the web interface, and then kick off the next upgrade.

So far so good!

No comments:

Post a Comment

Upgrade self-hosted GitLab instance on Ubuntu after falling too far behind

I recently ran into a signing key issue on an Ubuntu system running gitlab-ee from the official GitLab repos but didn't notice for a whi...