How to self-host a Gitlab instance and your container registry…

AntoineGGG
6 min readJul 16, 2023

Or how to modernise your CI/CD operations by self-hosting your favourite tool.

Photo by SELİM ARDA ERYILMAZ on Unsplash

This article is linked to: “self-host your own gitlab runner

More context:

Over the past few weeks, I have been exploring GitLab in more depth, going beyond basic commits and pushes with my teammates. I’ve heard a lot about it and decided it’s time to give it a try.

In the past, when working with Bitbucket or GitHub, my CI/CD workflow typically involved the following steps:

  1. Creating a runner and defining actions.
  2. Setting up an SSH connection on a VPS.
  3. Initiating a deployment script that performs the following tasks:
  4. Pulling the latest changes from the remote repository.
  5. Building new container images with updated content.
  6. Switching off the existing containers and replacing them with the new ones based on the updated images.

This workflow is widely used, but I have some concerns about it. Specifically, establishing an SSH connection can be time-consuming and challenging to comprehend. Moreover, utilizing a container registry for centralized code storage is the most appropriate approach to distribute and…

--

--