How to setup GitLab on Ubuntu 22.04?

#apt update
#apt upgrade
#apt install ca-certificates curl openssh-server postfix tzdata perl
#cd /tmp
#curl -LO https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh
#less /tmp/script.deb.sh
#bash /tmp/script.deb.sh
#apt install gitlab-ce
#ufw status # To check Firewall status
#sudo ufw allow http
#sudo ufw allow https
#sudo ufw allow OpenSSH

Editing the GitLab Configuration File

#vim /etc/gitlab/gitlab.rb
external_url 'https://gitlab.example.com' # To setup ip address and domain
letsencrypt['contact_emails'] = ['admin@gitlab.example.com'] # To setup email address
#sudo gitlab-ctl reconfigure
#cat /etc/gitlab/initial_root_password # Use this password for login gitlab

Open in any browser and search http://gitlab.example.com or http://192.168.0.105

If you want to change your port number so that you can follow this step

# vim /etc/gitlab/gitlab.rb
#external_url 'http://gitlab.example.com:8085'
# gitlab-ctl reconfigure
# ufw allow 8085
#ufw reload
#ufw status
#netstat –tunlp | grep 8085

Leave a Reply

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