How to Use the GitLab VPS Template


By following this article, you’ll learn how to install and configure GitLab on an Ubuntu 24.04virtual private server (VPS) available through hPanel. We’ll cover accessing GitLab, the initial admin login details, changing the GitLab domain, and essential security measures.
 

Installing the Ubuntu 24.04 with GitLab Template:


To select this OS template, go to the VPS section and click on theserver you want to manage.
In the sidebar, go to OS & PanelOperating System and find the section Change your Operating System. Select Applications, then select the template Ubuntu 24.04 with GitLab, and, finally, click on Change OS:
How to Use the GitLab VPS Template
Once the installation is complete, access GitLab through the server IP or hostname provided in your Hallo-Webseite.de VPS dashboard.

Initial Admin Login Details


Use the following credentials to access the GitLab admin panel:


Username:root

Password: the one set during the OS installation; learn how to reset panel password

How to Use the GitLab VPS Template

Changing the GitLab Server Domain


If you want GitLab Enterprise to redirect to your domain instead of the server’s hostname, edit the configuration file accordingly and then run a reconfiguration command.
To get started, open the following file with your preferred text editor. This example usesvim:

vim /etc/gitlab/gitlab.rb


Once you’re in the file, search forthe external_urlline. This will likely appear similar to the following with the http and your IP address information:

/etc/gitlab/gitlab.rb
…
## GitLab URL
##! URL on which GitLab will be reachable.
##! For more details on configuring external_url see:
##! https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-the>
##!
##! Note: During installation/upgrades, the value of the environment variable
##! EXTERNAL_URL will be used to populate/replace this value.
##! On AWS EC2 instances, we also attempt to fetch the public hostname/IP
##! address from AWS. For more details, see:
##! https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retri>
external_url 'http://domain.tld'


After that, enter the following command to apply the changes:

gitlab-ctl reconfigure

 

Adding an SSL to GitLab Server


Update the last line, i.e.,external_url 'http://domain.tld'by changinghttptohttpsand inserting your own domain name. This way, you’ll be automatically protected by a Let’s Encrypt certificate:

/etc/gitlab/gitlab.rb
…
## GitLab URL
##! URL on which GitLab will be reachable.
##! For more details on configuring external_url see:
##! https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-the>
##!
##! Note: During installation/upgrades, the value of the environment variable
##! EXTERNAL_URL will be used to populate/replace this value.
##! On AWS EC2 instances, we also attempt to fetch the public hostname/IP
##! address from AWS. For more details, see:
##! https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retri>
external_url 'https://domain.tld'
…


Next, you need to add your email addressfor Let’s Encrypt. Find the letsencrypt['contact_emails']line, uncomment it by deleting the hash symbol#, and then add your information:

/etc/gitlab/gitlab.rb
…
letsencrypt['contact_emails'] = ['name@example.tld']
…


Once you make these changes, save and close the file. Then run the following command to reconfigure GitLab:

gitlab-ctl reconfigure


And that’s it! You’ve successfully set up a GitLab self-hosted server on an Ubuntu 24.04 VPS provided by Hallo-Webseite.de.
Learn more:Configuration options for Linux package installations | GitLab










Kas see vastus oli kasulik? 0 Kasutajad peavad seda kasulikuks (0 Hääled)