How to GitLab on Ubuntu 24.04
GitLab on Ubuntu 24.04 puts a private code server on your own hardware to store project files, track bugs, and run build tests in one place. GitLab Community Edition is the free, self-hosted version of this popular software development platform.
Running this server gives you total control over your code without paying for cloud storage. You need a computer with at least 4 gigabytes of memory and a clean Ubuntu install to get started.
Install GitLab on Ubuntu 24.04 by first ensuring OpenSSH and an SMTP server are set up. Then, install necessary packages, download the GitLab repository script, and finally install GitLab using apt. Run `sudo gitlab-ctl reconfigure` to complete the setup.
Install OpenSSH
Before installing GitLab on Ubuntu 24.04, ensure OpenSSH server is set up. Follow the dedicated guide for assistance with that component.
How to install OpenSSH server on Ubuntu
Proceed with the next phase once OpenSSH server runs properly on the system.
Install SMTP server
Installing an SMTP server on Ubuntu 24.04 lets GitLab send email notifications for password resets and project alerts. You set this up by installing Postfix MTA (a mail transfer agent that routes outgoing emails) before you run the main GitLab installer, which stops email errors from happening later.
How to install Postfix on Ubuntu
Mail services are now ready, making it time for the core installation.
Install GitLab
To install GitLab on Ubuntu 24.04, you add the official package repository and run the setup commands through your terminal. You first install system dependencies like ca-certificates, download the official script with curl, and then use apt to install the GitLab package on your server.
First, install the required dependencies:
sudo apt install ca-certificates tzdata perl
Download the official package script:
curl -O https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh
sudo bash ./script.deb.sh
Install GitLab CE:
sudo apt update
sudo apt install gitlab-ee
Successful completion displays a confirmation message matching the example below.
*. *.
*** ***
***** *****
.****** *******
******** ********
,,,,,,,,,***********,,,,,,,,,
,,,,,,,,,,,*********,,,,,,,,,,,
.,,,,,,,,,,,*******,,,,,,,,,,,,
,,,,,,,,,*****,,,,,,,,,.
,,,,,,,****,,,,,,
.,,,***,,,,
,*,.
_______ __ __ __
/ ____(_) /_/ / ____ _/ /_
/ / __/ / __/ / / __ `/ __
/ /_/ / / /_/ /___/ /_/ / /_/ /
____/_/__/_____/__,_/_.___/
Thank you for installing GitLab!
Configure GitLab next by running the command below.
sudo gitlab-ctl reconfigure
An initial password resides inside [/etc/gitlab/initial_root_password]. Record this temporary credential securely because authentication requires it.
Access GitLab
You access GitLab on Ubuntu 24.04 by typing your server IP address or hostname into a web browser from any computer on your network. You log in for the first time by typing root as the username and entering the temporary password stored in the initial password file.
Authenticate with the root account and the temporary password.

Log in and start using GitLab.

The setup process is finished.
Conclusion:
Installing GitLab on Ubuntu 24.04 provides a robust platform for managing software development projects. Review these key takeaways from the installation process:
- Prerequisites: Ensure that both the OpenSSH server and an SMTP server (like Postfix) are installed before proceeding.
- Installation Steps: Follow the steps to install necessary packages, download the GitLab repository installer, and install GitLab using the provided commands.
- Configuration: Remember to run the configuration command to set up GitLab properly after installation.
- Access: You can access your newly installed GitLab instance via its IP address or hostname in a web browser.
- Temporary Password: Don’t forget to note down the temporary root password
/etc/gitlab/initial_root_passwordfor your first login.
Completed steps leave the server prepared for production development workloads.
Was this guide helpful?
About the Author
Richard
Tech Writer, IT Professional
Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.
No comments yet — be the first to share your thoughts!