GitLab CE on Ubuntu 24.04
The GitLab CE image installs the official Omnibus package on Ubuntu 24.04, so Git hosting, issues, merge requests, the container registry and CI are one server you own. GitLab recommends at least 4 GB of RAM and 4 cores for a small team, which makes S8 with 4 vCPU, 8 GB RAM, 80 GB NVMe the plan we suggest first.
Image facts
- Image
- GitLab CE on Ubuntu 24.04
- Type
- App image (Ubuntu 24.04 with the app set up)
- Architectures
- x86-64 and Arm64 (all four families)
- Price
- Free on every plan
- Login
- root over SSH with your key, or a one-time root password
- Locations
- All 15
What does the GitLab CE image contain?
GitLab Community Edition is installed from the official GitLab apt repository as the gitlab-ce Omnibus package. One package brings the whole application: Puma for the web app, Sidekiq for background jobs, Gitaly for Git storage, a bundled PostgreSQL and Redis, the bundled Nginx and the Prometheus-based monitoring that GitLab ships for itself.
All of it is controlled from a single file, /etc/gitlab/gitlab.rb, and applied with gitlab-ctl reconfigure. You never edit the Nginx or Postgres configs inside the package directly; changes would be overwritten on the next reconfigure. gitlab-ctl status lists every service, and gitlab-ctl tail streams their logs when something misbehaves.
CI pipelines need a runner, which is a separate program. It is not installed on this image, for reasons explained below.
What happens on first boot and first login?
GitLab takes a few minutes on the first boot, because reconfigure creates the database and starts around a dozen services. When gitlab-ctl status shows them all as run, open http://your-server-ip/. You sign in as root; how the initial password for that account is provided is shown in the message of the day when you log in over SSH.
Change that password at once under your profile, then go to Admin, Settings, General, Sign-up restrictions and switch off open sign-ups unless you want strangers to register. Create named accounts for each person in the team rather than sharing root.
Git over SSH uses the same port 22 as your own server login, so team members add their public key in their GitLab profile and clone with git@your-server-ip:group/project.git.
How much RAM and CPU does GitLab need?
GitLab is the heaviest image we offer. Its documentation recommends at least 4 GB of RAM and 4 vCPU for small installations, and with all bundled services running, memory use settles around 3~4 GB even with no one logged in. On less, Puma workers get killed under load and pages time out.
For a team of up to about 20 people, 4 vCPU, 8 GB RAM, 80 GB NVMe is a sound start. Teams that use the container registry heavily, run many merge requests a day or keep large monorepos should go to 16 GB. Adding a few GB of swap is worth it on any GitLab server as a cushion during upgrades; the swap guide shows how.
On smaller hosts you can trim memory in gitlab.rb: lower puma['worker_processes'], reduce Sidekiq concurrency and disable the bundled monitoring with prometheus_monitoring['enable'] = false. Those changes save around 1 GB.
How do I add a domain and HTTPS?
GitLab handles certificates itself through its built-in Let's Encrypt support. Point a name such as git.example.com at the server, then set in /etc/gitlab/gitlab.rb:
external_url 'https://git.example.com'\nletsencrypt['enable'] = trueRun gitlab-ctl reconfigure. GitLab requests the certificate, configures its Nginx for HTTPS, redirects HTTP and renews before expiry. Clone URLs in the interface switch to the new name.
Keep 22, 80 and 443 open and nothing else; the bundled Postgres, Redis and monitoring listen locally. If you want a different SSH port for your own admin login, move the system sshd and leave Git on 22, which is less surprising for the team.
Should CI runners run on the same server?
No, keep them apart. GitLab Runner executes whatever is in .gitlab-ci.yml, and a build that compiles, runs tests or builds Docker images can take every core and gigabyte it finds. On the GitLab server that means slow pages and failed pushes for everyone while a pipeline runs.
The usual setup is GitLab on a steady plan and one or more runners on separate servers registered to it. A Shared vCPU or Performance plan with the Docker CE image makes a good Docker-executor runner, and a Dedicated CPU plan such as D8 suits long compile jobs that keep the processor busy. Our CI runners use case sizes them.
How do I back up GitLab?
GitLab has its own backup command, and it does not include everything. Run gitlab-backup create to archive repositories, the database, uploads, CI artifacts and the registry into /var/opt/gitlab/backups. Separately, copy /etc/gitlab/gitlab.rb and /etc/gitlab/gitlab-secrets.json. The secrets file holds the keys for two-factor data, CI variables and runner tokens; a restore without it loses all of those.
A nightly cron entry with gitlab-backup create CRON=1, plus a sync of the archive and the two config files to another machine, is the standard routine. Restores must go onto the exact same GitLab version the backup came from.
The backup add-on keeps seven daily copies of the full disk for $1.27 a month on S8, which is the fastest way back from an upgrade gone wrong: one ticket with the server name and date.
How are GitLab upgrades done?
Through apt, with care for the upgrade path. apt update && apt install gitlab-ce downloads the new package and runs reconfigure and the database migrations on its own. Within a minor series that is all there is to it.
Across versions, GitLab defines required stops: you cannot jump from an old release straight to the newest one, and the upgrade path tool in the GitLab docs lists the versions to pass through. Install them one by one with apt install gitlab-ce=<version>-ce.0 and wait for background migrations to finish in Admin, Monitoring, Background migrations before the next stop.
To avoid surprise jumps from a routine apt upgrade, hold the package with apt-mark hold gitlab-ce and upgrade GitLab on purpose, monthly, after taking a backup.
Which plan and city fit a GitLab server?
Pick the city closest to the team; Git operations and the web interface feel slow from far away. In Europe, S8 gives 4 vCPU, 8 GB RAM, 80 GB NVMe for $6.35 a month. Teams in the Americas or Asia can use P8 with the same size in all 15 cities for $21.65.
GitLab publishes arm64 packages, so the Arm family is an option: A8 offers 4 vCPU, 8 GB RAM, 80 GB NVMe in four European cities. For larger teams, S16 doubles memory and cores, and D16 reserves four threads for you if steady response times matter more than raw size.
GitLab CE on Ubuntu 24.04 questions
Can GitLab run on a 4 GB plan?
It starts, but with the bundled services it runs at the edge of its memory. If you must, trim Puma and Sidekiq and disable monitoring in gitlab.rb, and add swap. For a team, start at S8.
Is GitLab Runner included?
No. Run it on a separate server so pipelines do not slow down GitLab itself, for example a plan with the Docker CE image.
Which files must I keep besides the backup archive?
/etc/gitlab/gitlab.rb and /etc/gitlab/gitlab-secrets.json. Without the secrets file, a restore loses 2FA settings, CI variables and runner registrations.
Does the container registry work?
Yes. Enable it in gitlab.rb with registry_external_url after HTTPS is set up, then reconfigure. Images are stored on the server disk, so watch free space.
Is it possible to grow into a larger size later?
Yes: install the same GitLab version on the new server, restore the backup archive and copy the two config files. The move guide lists the general steps.
Other images
Ubuntu 24.04 LTS
Ubuntu 22.04 LTS
Debian 13
Debian 12
Rocky Linux 10
Rocky Linux 9
AlmaLinux 10
AlmaLinux 9
CentOS Stream 10
Fedora 43
openSUSE Leap 15.6
Docker CE on Ubuntu 24.04
WordPress on Ubuntu 24.04
Coolify on Ubuntu 24.04
Nextcloud on Ubuntu 24.04
WireGuard on Ubuntu 24.04
Prometheus and Grafana on Ubuntu 24.04
Start a GitLab CE server
Choose GitLab CE on Ubuntu 24.04 when you create the server, or rebuild an existing one with it.