How to GitLab on Ubuntu 24.04
You install GitLab on Ubuntu 24.04 to create your own self-hosted Git repository manager.
GitLab is a comprehensive DevOps platform that provides source code management, CI/CD pipelines, and issue tracking for your development workflow. It’s an essential tool for streamlining your software development lifecycle.
This guide helps you set up GitLab Community Edition, the free and open-source version, on Ubuntu 24.04 LTS. You’ll get a powerful, self-hosted solution for managing all your projects.
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 you can install GitLab on Ubuntu, you’ll need OpenSSH server set up. If you haven’t already done so, check out our guide on how to install it on Ubuntu.
How to install OpenSSH server on Ubuntu
Once that’s done, you can move on.
Install SMTP server
Next, you’ll need an SMTP server (Simple Mail Transfer Protocol server for sending emails). If you already have one set up, great! Otherwise, you can learn how to install Postfix MTA server here.
How to install Postfix on Ubuntu
After that’s complete, you’re ready for the main event: installing GitLab.
Install GitLab
Now you are ready to install GitLab.
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
If everything went well, you will get a success message like the one below.
*. *.
*** ***
***** *****
.****** *******
******** ********
,,,,,,,,,***********,,,,,,,,,
,,,,,,,,,,,*********,,,,,,,,,,,
.,,,,,,,,,,,*******,,,,,,,,,,,,
,,,,,,,,,*****,,,,,,,,,.
,,,,,,,****,,,,,,
.,,,***,,,,
,*,.
_______ __ __ __
/ ____(_) /_/ / ____ _/ /_
/ / __/ / __/ / / __ `/ __
/ /_/ / / /_/ /___/ /_/ / /_/ /
____/_/__/_____/__,_/_.___/
Thank you for installing GitLab!
Configure GitLab next by running the command below.
sudo gitlab-ctl reconfigure
An initial password is stored in [/etc/gitlab/initial_root_password]. Take notes of the temporary password. You will need it later.
Access GitLab
Now that GitLab is installed, you can reach it from any computer on your network using its IP address or hostname in a web browser.
Enter the root for username and the initial password in the file.

Login and start using GitLab.

That should do it!
Conclusion:
Installing GitLab on Ubuntu 24.04 provides a robust platform for managing your software development projects. Here are the 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.
With these steps completed, you can use GitLab effectively for your development needs!
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!