{"id":605,"date":"2023-11-13T19:12:43","date_gmt":"2023-11-13T19:12:43","guid":{"rendered":"https:\/\/blog.hostinger.io\/support\/2023\/11\/13\/8583863-how-to-use-the-gitlab-vps-template-at-hostinger\/"},"modified":"2026-03-16T12:12:01","modified_gmt":"2026-03-16T12:12:01","slug":"8583863-how-to-use-the-gitlab-vps-template-at-hostinger","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/8583863-how-to-use-the-gitlab-vps-template-at-hostinger\/","title":{"rendered":"How to Use the GitLab VPS Template at Hostinger"},"content":{"rendered":"<p class=\"no-margin\">By following this article, you&rsquo;ll learn how to install and configure <b>GitLab<\/b> on an<b> Ubuntu 24.04<\/b> virtual private server (VPS) available through hPanel. We&rsquo;ll cover accessing GitLab, the initial admin login details, changing the GitLab domain, and essential security measures.<\/p><div class=\"intercom-interblocks-callout\" style=\"background-color: #e3e7fa80;border-color: #334bfa33\">\n<p class=\"no-margin\">Haven&rsquo;t signed up for a VPS plan yet? Check out <b><a class=\"intercom-content-link\" href=\"https:\/\/www.hostinger.com\/vps\/gitlab-hosting\" target=\"_blank\" rel=\"noopener\">GitLab VPS hosting options<\/a><\/b>.<\/p>\n<\/div><h2 id=\"requirements\" class=\"text-text-100 mt-3 -mb-1 text-[1.125rem] font-bold\">Requirements<\/h2><p class=\"font-claude-response-body break-words whitespace-normal leading-[1.7]\">Before proceeding with the GitLab installation, ensure your VPS meets the following requirements:<\/p><ul class=\"[li_&amp;]:mb-0 [li_&amp;]:mt-1 [li_&amp;]:gap-1 [&amp;:not(:last-child)_ul]:pb-1 [&amp;:not(:last-child)_ol]:pb-1 list-disc flex flex-col gap-1 pl-8 mb-3\">\n<li class=\"whitespace-normal break-words pl-2\"><strong>VPS Plan<\/strong>: KVM2 or higher (KVM1 plans do not support GitLab)<\/li>\n<li class=\"whitespace-normal break-words pl-2\">Operating System: Ubuntu 24.04<\/li>\n<\/ul><div class=\"intercom-interblocks-callout\" style=\"background-color: #feedaf80;border-color: #fbc91633\"><strong>IMPORTANT<\/strong>: If you&rsquo;re currently on a KVM1 plan, you&rsquo;ll need to upgrade to KVM2 or higher to use GitLab.<\/div><h2 id=\"h_2ee576fc7d\">Installing the Ubuntu 24.04 with GitLab Template:<\/h2><p class=\"no-margin\">To select this OS template, go to the <b><a class=\"intercom-content-link\" href=\"https:\/\/hpanel.hostinger.com\/servers\" target=\"_blank\" rel=\"noopener\">VPS section<\/a><\/b> in hPanel and click on the<b> <\/b>server you want to manage.<\/p><p class=\"no-margin\">In the sidebar, go to <b>OS &amp; Panel <\/b>&rarr; <b>Operating System<\/b> and find the section<b> Change your Operating System<\/b>. Select <b>Applications<\/b>, then select the template<b> Ubuntu 24.04 with GitLab<\/b>, and, finally, click on <b>Change OS<\/b>:<\/p><div class=\"intercom-container\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2023\/11\/64f9a640-5f7d-4c21-b087-3736d409785d.jpg\"><\/div><p class=\"no-margin\">Once the installation is complete, access GitLab through the server IP or hostname provided in your Hostinger VPS dashboard.<\/p><h2 id=\"h_a47bb01194\">Initial Admin Login Details<\/h2><p class=\"no-margin\">Use the following credentials to access the GitLab admin panel:<\/p><ul>\n<li>\n<p class=\"no-margin\"><b>Username<\/b>:<b> <\/b>root<\/p>\n<\/li>\n<li>\n<p class=\"no-margin\"><b>Password<\/b>: the one set during the OS installation; learn how to reset panel password<\/p>\n<\/li>\n<\/ul><div class=\"intercom-container\"><img decoding=\"async\" src=\"\/support\/wp-content\/uploads\/sites\/55\/2023\/11\/be539b08-e0d7-4054-85db-5ba15bd95982.jpg\"><\/div><h2 id=\"h_2f40665a2e\">Changing the GitLab Server Domain<\/h2><p class=\"no-margin\">If you want GitLab Enterprise to redirect to your domain instead of the server&rsquo;s hostname, <b>edit the configuration file<\/b> accordingly and then run a reconfiguration command.<\/p><p class=\"no-margin\">To get started, open the following file with your preferred text editor. This example uses <code>vim<\/code>:<\/p><pre><code>vim \/etc\/gitlab\/gitlab.rb<\/code><\/pre><p class=\"no-margin\">Once you&rsquo;re in the file, search for <code>the external_url<\/code> line. This will likely appear similar to the following with the http and your IP address information:<\/p><pre><code>\/etc\/gitlab\/gitlab.rb\r\n&hellip;\r\n## GitLab URL\r\n##! URL on which GitLab will be reachable.\r\n##! For more details on configuring external_url see:\r\n##! https:\/\/docs.gitlab.com\/omnibus\/settings\/configuration.html#configuring-the&gt;\r\n##!\r\n##! Note: During installation\/upgrades, the value of the environment variable\r\n##! EXTERNAL_URL will be used to populate\/replace this value.\r\n##! On AWS EC2 instances, we also attempt to fetch the public hostname\/IP\r\n##! address from AWS. For more details, see:\r\n##! https:\/\/docs.aws.amazon.com\/AWSEC2\/latest\/UserGuide\/instancedata-data-retri&gt;\r\nexternal_url 'http:\/\/domain.tld'<\/code><\/pre><p class=\"no-margin\">After that, enter the following command to apply the changes:<\/p><pre><code>gitlab-ctl reconfigure<\/code><\/pre><h2 id=\"h_7157a77ed8\">Adding an SSL to GitLab Server<\/h2><p class=\"no-margin\">Update the last line, i.e., <code>external_url 'http:\/\/domain.tld'<\/code> by changing <code>http<\/code> to <code>https<\/code> and inserting <b>your own domain name<\/b>. This way, you&rsquo;ll be automatically protected by a <b><a class=\"intercom-content-link\" href=\"https:\/\/letsencrypt.org\/\" target=\"_blank\" rel=\"noopener\">Let&rsquo;s Encrypt<\/a><\/b> certificate:<\/p><pre><code>\/etc\/gitlab\/gitlab.rb\r\n&hellip;\r\n## GitLab URL\r\n##! URL on which GitLab will be reachable.\r\n##! For more details on configuring external_url see:\r\n##! https:\/\/docs.gitlab.com\/omnibus\/settings\/configuration.html#configuring-the&gt;\r\n##!\r\n##! Note: During installation\/upgrades, the value of the environment variable\r\n##! EXTERNAL_URL will be used to populate\/replace this value.\r\n##! On AWS EC2 instances, we also attempt to fetch the public hostname\/IP\r\n##! address from AWS. For more details, see:\r\n##! https:\/\/docs.aws.amazon.com\/AWSEC2\/latest\/UserGuide\/instancedata-data-retri&gt;\r\nexternal_url 'https:\/\/domain.tld'\r\n&hellip;<\/code><\/pre><p class=\"no-margin\">Next, you need to add your <b>email address<\/b> for <b>Let&rsquo;s Encrypt<\/b>. Find the <code>letsencrypt['contact_emails']<\/code> line, uncomment it by deleting the hash symbol <code>#<\/code>, and then add your information:<\/p><pre><code>\/etc\/gitlab\/gitlab.rb\r\n&hellip;\r\nletsencrypt['contact_emails'] = ['name@example.tld']\r\n&hellip;<\/code><\/pre><p class=\"no-margin\">Once you make these changes, save and close the file. Then run the following command to <b>reconfigure GitLab<\/b>:<\/p><pre><code>gitlab-ctl reconfigure <\/code><\/pre><p class=\"no-margin\">And that&rsquo;s it! You&rsquo;ve successfully set up a <b>GitLab<\/b> self-hosted server on an <b>Ubuntu 24.04 VPS<\/b> provided by Hostinger.<\/p><div class=\"intercom-interblocks-callout\" style=\"background-color: #e3e7fa80;border-color: #334bfa33\">\n<p class=\"no-margin\">Learn more: <b><a class=\"intercom-content-link\" href=\"https:\/\/docs.gitlab.com\/omnibus\/settings\/configuration.html\" target=\"_blank\" rel=\"noopener\">Configuration options for Linux package installations | GitLab<\/a><\/b><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Getting started with the GitLab VPS Template<\/p>\n","protected":false},"author":581,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[206],"tags":[],"class_list":["post-605","post","type-post","status-publish","format-standard","hentry","category-vps-os-and-templates"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/support\/8583863-how-to-use-the-gitlab-vps-template-at-hostinger\/","default":1}],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/605","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=605"}],"version-history":[{"count":3,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/605\/revisions"}],"predecessor-version":[{"id":7765,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/605\/revisions\/7765"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=605"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=605"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}