DEV Community

Henri Sekeladi
Henri Sekeladi

Posted on

3

Install Gitlab CE on Ubuntu Server 24.04

In this article we use EC2 instance on AWS with Ubuntu 24.04 Server.

First, update our ubuntu package

sudo apt update

Next, install some libraries that we need.

sudo apt install ca-certificates curl openssh-server postfix tzdata perl

Install Gitlab CE

Move to directory /tmp

cd /tmp

Get the repository for gitlab ce

curl -LO https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh

Run the bash script

sudo bash /tmp/script.deb.sh

Lastly, install the gitlab ce

sudo apt install gitlab-ce

Setup firewall

Check the status of UFW

sudo ufw status

Add some rules to allow http, https and OpenSSH

sudo ufw allow http
sudo ufw allow https
sudo ufw allow OpenSSH
Enter fullscreen mode Exit fullscreen mode

Check the ufw status again

sudo ufw status

Editing the Gitlab configuration

Edit the gitlab configuration in

sudo nano /etc/gitlab/gitlab.rb

Edit this 2 below below to get domain name and ssl certificate from letsencrypt.

external_url 'https://gitlab.withenri.tech'
letsencrypt['contact_emails'] = ['studio@withenri.tech']

save the configuration with ctrl + x, choose Yes and Enter.

Lastly, run the gitlab-ctl to configure gitlab

sudo gitlab-ctl reconfigure

Just wait, the process will take times. If there is no error, we can access our gitlab instance with the domain name.

Root Password Gitlab

The default user for Administrator is root with password in

sudo cat /etc/gitlab/initial_root_password

this file will deleted in 24 our after installation of gitlab.

Administrator UI

Access our instance with domain name (https://gitlab.withenri.tech).
Enter username with root and password from /etc/gitlab/initial_root_password.

Change the root password with click profile picture, choose edit profile and choose Password.

Gitlab Administration

That's it.

Hopefully this article helps you!

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

Top comments (0)

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay