Skip to content

How to GitLab on Ubuntu 24.04

Richard
Written by
Richard
Mar 1, 2025 Updated Mar 20, 2026 3 min read
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.

⚡ Quick Answer

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

Before installing GitLab, you’ll need a way to send emails, which requires an SMTP server. If you don’t have one already, you can easily install Postfix MTA server on Ubuntu to handle outgoing mail.

How to install Postfix on Ubuntu

After that’s complete, you’re ready for the main event: installing GitLab.

Install GitLab

Now it’s time to install GitLab on your Ubuntu 24.04 system. First, run a command to get some necessary packages, then download the GitLab repository script, and finally, use that script to install GitLab itself.

Start by installing some recommended packages with this command:

🐧Bash / Shell
sudo apt install ca-certificates tzdata perl

Then, download the GitLab repository installer using this command:

💻Code
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:

🐧Bash / Shell
sudo apt update
sudo apt install gitlab-ee

If everything went well, you will get a success message like the one below.

💻Code
       *.                  *.
*** ***
***** *****
.****** *******
******** ********
,,,,,,,,,***********,,,,,,,,,
,,,,,,,,,,,*********,,,,,,,,,,,
.,,,,,,,,,,,*******,,,,,,,,,,,,
,,,,,,,,,*****,,,,,,,,,.
,,,,,,,****,,,,,,
.,,,***,,,,
,*,.



_______ __ __ __
/ ____(_) /_/ / ____ _/ /_
/ / __/ / __/ / / __ `/ __
/ /_/ / / /_/ /___/ /_/ / /_/ /
____/_/__/_____/__,_/_.___/


Thank you for installing GitLab!

Configure GitLab next by running the command below.

🐧Bash / Shell
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

Once GitLab is installed, you can access it from any computer on your network. Simply open a web browser and type in your server’s IP address or hostname, then log in with the provided root username and initial password.

Enter the root for username and the initial password in the file.

GitLab install on Ubuntu

Login and start using GitLab.

GitLab web portal
GitLab web portal

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_password for your first login.

With these steps completed, you can use GitLab effectively for your development needs!

Was this guide helpful?

Was this helpful?
Richard

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!

Leave a Comment

Your email address will not be published. Required fields are marked *

Exit mobile version