How to GitLab on Ubuntu 24.04
GitLab on Ubuntu 24.04 lets you set up your own private code server 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 on Ubuntu 24.04 LTS 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
An SMTP server is required for GitLab on Ubuntu 24.04 to send emails. Configuring Postfix MTA (a mail transfer agent) handles outgoing email notifications for your server. Completing this step before installing GitLab prevents notification issues.
How to install Postfix on Ubuntu
Mail services are now ready, making it time for the core installation.
Install GitLab
Adding the official GitLab repository brings in the latest stable packages for your server. Running sudo apt install ca-certificates tzdata perl initiates the process.
Start by installing some recommended packages with this command:
sudo apt install ca-certificates tzdata perl
Then, download the GitLab repository installer using this command:
curl -O https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh
sudo bash ./script.deb.sh
Finally, install GitLab itself by running this command:
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
Accessing GitLab on Ubuntu 24.04 after installation is possible from any computer on your network. Open a web browser and enter the server IP address or hostname. Enter root for the username and supply the initial password retrieved from the 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!