{"id":118383,"date":"2024-11-06T12:38:45","date_gmt":"2024-11-06T12:38:45","guid":{"rendered":"\/tutorials\/?p=118383"},"modified":"2025-07-01T11:02:33","modified_gmt":"2025-07-01T11:02:33","slug":"how-to-install-gitlab","status":"publish","type":"post","link":"\/tutorials\/how-to-install-gitlab","title":{"rendered":"How to install and configure GitLab on Ubuntu: Using the Hostinger VPS template and commands"},"content":{"rendered":"<p>One of GitLab&rsquo;s distinguishing features is that you can self-host it by installing it on a private server. This has several benefits, such as maintaining data integrity, enhancing security, and improving customizability.<\/p><p>However, if you&rsquo;re unfamiliar with GitLab, installing the platform can be tricky due to various commands and dependencies.<\/p><p>In this article, we&rsquo;ll explain how to install GitLab using two methods. The Hostinger OS template method is great for beginners, while more advanced users might prefer to do it manually.<\/p><p>\n\n\n\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-prerequisites-for-installing-gitlab\">Prerequisites for installing GitLab<\/h2><p>To install <a href=\"\/tutorials\/what-is-gitlab\">GitLab<\/a>, you need a host server that meets the hardware requirements. For example, <a href=\"https:\/\/docs.gitlab.com\/ee\/install\/requirements.html#hardware-requirements\" target=\"_blank\" rel=\"noopener\">GitLab recommends a system<\/a> with <strong>8 vCPU <\/strong>cores and <strong>16 GB of RAM <\/strong>to host a repository with <strong>1,000<\/strong> users and <strong>20<\/strong> requests per second.<\/p><p>The <a href=\"\/vps\/gitlab-hosting\">Hostinger GitLab hosting<\/a> KVM 8 plan is a great fit for these requirements. If your project is smaller, simply choose a plan with fewer resources and scale up as needed.<\/p><p>Upgrading your Hostinger VPS plan will only take a few minutes. And to top it all off, our system will automatically migrate your files and settings for a seamless process.<\/p><figure class=\"wp-block-image size-large\"><a class=\"hgr-tutorials-cta hgr-tutorials-cta-vps-hosting\" href=\"\/vps-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/public\" alt=\"\" class=\"wp-image-77934\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><p>In addition to powerful hardware, Hostinger GitLab hosting comes with our <strong>Kodee AI assistant<\/strong>, which can write commands and guide you in configuring your system.<\/p><p>Hostinger&rsquo;s weekly automatic backup and snapshot also ensures your GitLab repository data is safe. For maximum security, we provide tools like a malware scanner, a built-in firewall manager, and traffic filtering.<\/p><p>Lastly, we recommend <a href=\"\/tutorials\/dns\/how-to-point-domain-to-vps\">pointing a domain to your VPS<\/a>. If you haven&rsquo;t done so, your GitLab web interface will only be accessible using your server&rsquo;s IP address or hostname, which is inconvenient.<\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-install-gitlab-using-the-hostinger-os-template\">How to install GitLab using the Hostinger OS template<\/h2><p>Hostinger VPS hosting users can easily install applications without commands using the OS templates. In addition to making the process more beginner-friendly, this method helps save time and minimizes potential misconfiguration errors.<\/p><p>Here are the GitLab installation steps using the Hostinger OS template:<\/p><ol class=\"wp-block-list\">\n<li>Log in to <strong>hPanel<\/strong> &rarr; <strong>sidebar<\/strong> &rarr; <strong>VPS<\/strong> &rarr; <strong>Manage<\/strong>.<\/li>\n\n\n\n<li>Navigate to the side menu &rarr; <strong>OS &amp; Panel<\/strong> &rarr; <strong>Operating system<\/strong>.<\/li>\n\n\n\n<li>Go to the application tab and select <strong>Ubuntu 22.04 with GitLab<\/strong>. Alternatively, look it up using the search bar.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69e0a14c20299\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1460\" height=\"551\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-template-on-hostinger-vps-os-management-page.png\/public\" alt=\"GitLab template on Hostinger VPS OS management page\" class=\"wp-image-118387\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-template-on-hostinger-vps-os-management-page.png\/w=1460,fit=scale-down 1460w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-template-on-hostinger-vps-os-management-page.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-template-on-hostinger-vps-os-management-page.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-template-on-hostinger-vps-os-management-page.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-template-on-hostinger-vps-os-management-page.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1460px) 100vw, 1460px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"4\" class=\"wp-block-list\">\n<li>Scroll down and click <strong>Change OS<\/strong>.<\/li>\n\n\n\n<li>Check the box to acknowledge the data deletion and hit <strong>Next<\/strong>.<\/li>\n\n\n\n<li>Enter a new panel password, which you will use to log in to the GitLab dashboard. Click <strong>Confirm<\/strong>.<\/li>\n<\/ol><p>Wait until the setup is complete, which should take about 10 minutes. During this process, our system will install the GitLab instance and configure its dependencies.<\/p><p>Moreover, this process will automatically create the root GitLab account, so you don&rsquo;t need to make one manually.<\/p><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69e0a14c2307d\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1460\" height=\"429\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/the-manage-app-button-on-hpanel-os-configuration-page.png\/public\" alt=\"The Manage App button on hPanel OS configuration page\" class=\"wp-image-118389\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/the-manage-app-button-on-hpanel-os-configuration-page.png\/w=1460,fit=scale-down 1460w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/the-manage-app-button-on-hpanel-os-configuration-page.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/the-manage-app-button-on-hpanel-os-configuration-page.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/the-manage-app-button-on-hpanel-os-configuration-page.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/the-manage-app-button-on-hpanel-os-configuration-page.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1460px) 100vw, 1460px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Once the setup is finished, click the <strong>Manage App<\/strong> button at the top of your screen to access the GitLab web interface. Log in as <strong>root<\/strong> using the panel password you created earlier.<\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-install-gitlab-using-commands\">How to install GitLab using commands<\/h2><p>In this section, we will explain the steps to install a GitLab instance with commands. Before proceeding, access your VPS command-line interface (CLI) <a href=\"\/tutorials\/how-to-use-putty-ssh\">using an SSH client like PuTTY<\/a> or terminal.<\/p><p>\n\n\n<div class=\"protip\">\n                    <h4 class=\"title\">Need simpler remote access?<\/h4>\n                    <p>Hostinger users can access their server&rsquo;s CLI through a web browser by clicking <strong>Browser terminal<\/strong> on the top right of the VPS management page. This also logs you in for a more efficient process.<\/p>\n                <\/div>\n\n\n\n<\/p><h3 class=\"wp-block-heading\" id=\"h-1-download-and-install-dependencies\">1. Download and install dependencies<\/h3><p>Dependencies are software components that an application needs to run properly. For example, GitLab dependencies include the Perl programming language and Postfix mail transfer agent.<\/p><p>Before installing dependencies, update your system repository to make sure you get the latest version of the packages:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt update<\/pre><p>Install all the dependency packages using the following command:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt install -y ca-certificates curl openssh-server postfix tzdata perl<\/pre><p>Your command-line interface might prompt a few questions during the Postfix installation. Select <strong>Internet Site<\/strong> as the configuration type and enter your system mail name.<\/p><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69e0a14c26aa5\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1460\" height=\"417\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/postfix-internet-site-configuration.png\/public\" alt=\"Postfix internet site configuration\" class=\"wp-image-118391\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/postfix-internet-site-configuration.png\/w=1460,fit=scale-down 1460w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/postfix-internet-site-configuration.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/postfix-internet-site-configuration.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/postfix-internet-site-configuration.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/postfix-internet-site-configuration.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1460px) 100vw, 1460px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><h3 class=\"wp-block-heading\" id=\"h-2-install-gitlab\">2. Install GitLab<\/h3><p><a href=\"https:\/\/about.gitlab.com\/install\/ce-or-ee\/\" target=\"_blank\" rel=\"noopener\">GitLab has two versions<\/a>: the community and enterprise editions. This tutorial will explain how to install the enterprise edition. If you want to use the community one, replace <strong>gitlab-ee<\/strong> in the commands with <strong>gitlab-ce<\/strong>.<\/p><p>Run the following <strong>cURL <\/strong>command to add the GitLab repository to your system:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo curl https:\/\/packages.gitlab.com\/install\/repositories\/gitlab\/gitlab-ee\/script.deb.sh | sudo bash<\/pre><p>Your command-line interface should print a message confirming that the repository is set. Now, install the GitLab package using the following command:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt install gitlab-ee<\/pre><p>The installation process might take a few minutes, depending on your internet speed.<\/p><h3 class=\"wp-block-heading\" id=\"h-3-adjust-the-firewall-rules\">3. Adjust the firewall rules<\/h3><p>Change your server&rsquo;s firewall settings to ensure your GitLab server accepts traffic. There are several ways to do this, but adjusting the <a href=\"\/tutorials\/how-to-configure-firewall-on-ubuntu-using-ufw\/\">Uncomplicated Firewall<\/a> (UFW) is the most common in Ubuntu.<\/p><p>Run the following commands subsequently to allow traffic to the essential GitLab services:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo ufw allow http\nsudo ufw allow https\nsudo ufw allow OpenSSH<\/pre><p>Now, run the following command to check if the new rules are set. You should see the previous services in the list:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo ufw status<\/pre><p>If you don&rsquo;t use UFW, you can add new firewall rules using<strong> <\/strong><a href=\"\/tutorials\/iptables-tutorial\">iptables<\/a>. Alternatively, Hostinger users can use a graphical user interface (GUI) via hPanel. Here are the steps:<\/p><ol class=\"wp-block-list\">\n<li>Go to <strong>hPanel <\/strong>&rarr; <strong>sidebar<\/strong> &rarr;<strong> VPS <\/strong>&rarr; <strong>Manage<\/strong>.<\/li>\n\n\n\n<li>Navigate to the side menu &rarr; <strong>Security<\/strong> &rarr; <strong>Firewall<\/strong>.<\/li>\n\n\n\n<li>Click <strong>Add Firewall<\/strong> on the top right corner.<\/li>\n\n\n\n<li>Enter a descriptive name for your firewall and click <strong>Create<\/strong>.<\/li>\n\n\n\n<li>Click the<strong> three-dot<\/strong> icon on the new firewall &rarr; <strong>Edit<\/strong>.<\/li>\n\n\n\n<li>Enter three rules with <strong>SSH<\/strong>, <strong>HTTP<\/strong>, and <strong>HTTPS<\/strong> as the protocol. For all of them, select <strong>Anywhere<\/strong> as the <strong>Source<\/strong>.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69e0a14c2940c\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1460\" height=\"396\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-firewall-rules-on-hpanel.png\/public\" alt=\"GitLab firewall rules on hPanel\" class=\"wp-image-118393\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-firewall-rules-on-hpanel.png\/w=1460,fit=scale-down 1460w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-firewall-rules-on-hpanel.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-firewall-rules-on-hpanel.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-firewall-rules-on-hpanel.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-firewall-rules-on-hpanel.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1460px) 100vw, 1460px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"7\" class=\"wp-block-list\">\n<li>Return to your firewall list and click the toggle to enable your GitLab rules.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69e0a14c2c710\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1460\" height=\"131\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/firewall-rule-activation-toggle-on-hpanel.png\/public\" alt=\"Firewall rule activation toggle on hPanel\" class=\"wp-image-118396\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/firewall-rule-activation-toggle-on-hpanel.png\/w=1460,fit=scale-down 1460w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/firewall-rule-activation-toggle-on-hpanel.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/firewall-rule-activation-toggle-on-hpanel.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/firewall-rule-activation-toggle-on-hpanel.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/firewall-rule-activation-toggle-on-hpanel.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1460px) 100vw, 1460px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>\n\n<div class=\"protip\">\n                    <h4 class=\"title\">Configure your firewall with Kodee<\/h4>\n                    <p>Hostinger VPS users can ask Kodee to set up a new firewall rule on your VPS. To do so, simply ask it, \"Create and activate a firewall rule on my VPS that accepts connection on port 22, 80, and 443 from any IP address.\"<\/p>\n                <\/div>\n\n\n\n<\/p><h3 class=\"wp-block-heading\" id=\"h-4-configure-gitlab-settings\">4. Configure GitLab settings<\/h3><p>Before accessing the GitLab dashboard, you&rsquo;ll want to change several settings to ensure the platform works properly and securely.<\/p><p>Start by changing the <strong>external_url <\/strong>parameter to make GitLab accessible using the domain name pointed to your VPS. To do so, run the following command to open the platform&rsquo;s configuration file:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo nano \/etc\/gitlab\/gitlab.rb<\/pre><p>Find the<strong> external_url <\/strong>parameter and change the value to your domain address. We also recommend enabling the built-in Let&rsquo;s Encrypt SSL by adding HTTPS like so:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">external _url \"https:\/\/domain.com\"<\/pre><p>Optionally, add your email address into the <strong>letsencrypt[]<\/strong> parameter if you want to receive the SSL expiration alert in your mailbox.<\/p><p>If you haven&rsquo;t purchased a domain name, use your VPS IP address. By default, GitLab uses your server hostname as the external URL. However, it might not be resolved properly, potentially causing connectivity issues.<\/p><p>Press <strong>Ctrl + X<\/strong>, <strong>Y<\/strong>, and<strong> Enter<\/strong> to save the changes. Apply the new settings by rebooting the GitLab service using this command:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo gitlab-ctl reconfigure<\/pre><p>During the installation, GitLab automatically sets up a root account and generates a random secure password. To check the credentials, run the following command:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo nano \/etc\/gitlab\/initial_root_password<\/pre><p>The root password is under the <strong>Password: <\/strong>parameter. You can change it directly by editing the file or through the GitLab dashboard, which we will explain in the next section.<\/p><h2 class=\"wp-block-heading\" id=\"h-configure-basic-gitlab-settings\">Configure basic GitLab settings<\/h2><p>Once you&rsquo;ve installed GitLab, you should adjust several important settings from its dashboard. Open the web interface using your domain name and log in as the root account.<\/p><h3 class=\"wp-block-heading\" id=\"h-add-administrator-information\">Add administrator information<\/h3><p>Adjusting the administrator profile is crucial for security and communication. To do so, go to the left sidebar &rarr;<strong> profile picture <\/strong>&rarr;<strong> Edit profile<\/strong>. Change important information like your time zone, email addresses, and contact details.<\/p><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69e0a14c305f4\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1460\" height=\"637\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-account-setting-menu.png\/public\" alt=\"GitLab account setting menu\" class=\"wp-image-118398\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-account-setting-menu.png\/w=1460,fit=scale-down 1460w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-account-setting-menu.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-account-setting-menu.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-account-setting-menu.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-account-setting-menu.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1460px) 100vw, 1460px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>You can also change the default root password by expanding the left-side menu and selecting <strong>Password<\/strong>. Enter your current and new passwords, then hit <strong>Save password<\/strong> to confirm.<\/p><h3 class=\"wp-block-heading\" id=\"h-limit-account-creation\">Limit account creation<\/h3><p>By default, anyone accessing your GitLab instance login page can create a new account. This presents security risks since cyber criminals or unauthorized parties might set up a malicious user to infiltrate your Git repositories.<\/p><p>To improve security, limit new account creation by going to the <strong>sidebar <\/strong>&rarr; <strong>Admin <\/strong>&rarr;<strong> side menu <\/strong>&rarr; <strong>Setting <\/strong>&rarr; <strong>General<\/strong>. Expand the<strong> Sign-up restriction<\/strong> menu and check the <strong>Require admin approval for new sign-ups<\/strong> box.<\/p><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69e0a14c332b7\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"2834\" height=\"538\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-sign-up-restriction-setting.png\/public\" alt=\"GitLab sign up restriction settings\" class=\"wp-image-118399\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-sign-up-restriction-setting.png\/w=2834,fit=scale-down 2834w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-sign-up-restriction-setting.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-sign-up-restriction-setting.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-sign-up-restriction-setting.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-sign-up-restriction-setting.png\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-sign-up-restriction-setting.png\/w=1536,fit=scale-down 1536w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-sign-up-restriction-setting.png\/w=2048,fit=scale-down 2048w\" sizes=\"(max-width: 2834px) 100vw, 2834px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Now, the administrator must approve every new account creation, ensuring only legitimate users can access the dashboard.<\/p><h3 class=\"wp-block-heading\" id=\"h-enable-two-factor-authentication-2fa\">Enable two-factor authentication (2FA)<\/h3><p>Enforcing 2FA is an important <a href=\"\/tutorials\/gitlab-best-practices\">GitLab best practice<\/a> to ensure the safety of all accounts, even if their passwords are compromised.<\/p><p>To do so, open your GitLab admin menu &rarr; <strong>sidebar<\/strong> &rarr; <strong>General<\/strong>. Expand the <strong>Sign-in restrictions<\/strong> section and check <strong>Two-factor authentication <\/strong>as well as <strong>Enforce Two-Factor authentication for administrator users<\/strong>.<\/p><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69e0a14c35baf\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"2840\" height=\"680\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-sign-in-restriction-setting.png\/public\" alt=\"GitLab sign in restriction settings\" class=\"wp-image-118401\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-sign-in-restriction-setting.png\/w=2840,fit=scale-down 2840w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-sign-in-restriction-setting.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-sign-in-restriction-setting.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-sign-in-restriction-setting.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-sign-in-restriction-setting.png\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-sign-in-restriction-setting.png\/w=1536,fit=scale-down 1536w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-sign-in-restriction-setting.png\/w=2048,fit=scale-down 2048w\" sizes=\"(max-width: 2840px) 100vw, 2840px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>Change the <strong>Two-factor grace period <\/strong>value to zero if you want all accounts to set up 2FA immediately. By default, it is set to <strong>48<\/strong>, meaning users can wait up to two days before doing so.<\/p><h3 class=\"wp-block-heading\" id=\"h-add-ssh-key\">Add SSH key<\/h3><p>Developers often interact with GitLab repositories using <a href=\"\/tutorials\/basic-git-commands\">Git commands<\/a> on their local computers. While you can do so via HTTPS using your account credentials, it can be inefficient and insecure.<\/p><p>Instead, set up an SSH key pair to link your local system to GitLab. It allows you to connect to the platform without entering the account login details, streamlining the process and improving security.<\/p><p>Here&rsquo;s how to set one up and add it to GitLab:<\/p><ol class=\"wp-block-list\">\n<li>Generate a key pair on your local machine by running the following command.<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">ssh-keygen<\/pre><ol start=\"2\" class=\"wp-block-list\">\n<li>Run the following to check the public SSH key:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">cat ~\/.ssh\/id_rsa.pub<\/pre><ol start=\"3\" class=\"wp-block-list\">\n<li>Copy the output and store it in a safe location.<\/li>\n\n\n\n<li>Head to your GitLab dashboard &rarr; <strong>sidebar<\/strong> &rarr; <strong>Profile picture<\/strong> &rarr; <strong>Edit profile<\/strong>.<\/li>\n\n\n\n<li>Expand the left side menu and select <strong>SSH keys<\/strong>.<\/li>\n\n\n\n<li>Click <strong>Add new key<\/strong>.<\/li>\n\n\n\n<li>Paste your public SSH key and enter other information.<\/li>\n<\/ol><div class=\"wp-block-image\">\n<figure data-wp-context='{\"imageId\":\"69e0a14c38705\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img decoding=\"async\" width=\"1460\" height=\"589\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-ssh-key-configuration-menu.png\/public\" alt=\"GitLab SSH key configuration menu\" class=\"wp-image-118402\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-ssh-key-configuration-menu.png\/w=1460,fit=scale-down 1460w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-ssh-key-configuration-menu.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-ssh-key-configuration-menu.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-ssh-key-configuration-menu.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/11\/gitlab-ssh-key-configuration-menu.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 1460px) 100vw, 1460px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>\n\n<div class=\"protip\">\n                    <h4 class=\"title\">Suggested reading<\/h4>\n                    <p>Want to learn more about the basics of using GitLab? Check out our <a href=\"\/tutorials\/gitlab-tutorial\">Gitlab tutorial<\/a> to find out how to create a repository, manage an issue, and more.<\/p>\n                <\/div>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2><p>You can self-host GitLab on a private server for improved security and isolation. The easiest way to install it is using the Hostinger OS template. Simply select the GitLab template on hPanel, and you will be set.<\/p><p>Alternatively, you can install GitLab manually using commands. To do so, connect to your server via SSH and follow these steps:<\/p><ol class=\"wp-block-list\">\n<li>Install all dependencies, including Perl, Postfix, and OpenSSH server.<\/li>\n\n\n\n<li>Download the official GitLab repository and install the package.<\/li>\n\n\n\n<li>Create firewall rules to allow HTTP, HTTPS, and SSH via UFW.<\/li>\n\n\n\n<li>Change the default GitLab URL and enforce the built-in SSL certificate.<\/li>\n<\/ol><p>Once installed, access the GitLab dashboard and change the basic settings. For example, you can add information about your admin account, enable the sign-in restrictions to improve security, and set up SSH keys.<\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-install-gitlab-faq\">How to install GitLab FAQ<\/h2><div class=\"schema-faq wp-block-yoast-faq-block\"><div class=\"schema-faq-section\" id=\"faq-question-1730892558504\"><h3 class=\"schema-faq-question\">What are the minimum system requirements for installing GitLab?<\/h3> <p class=\"schema-faq-answer\">GitLab&rsquo;s minimum requirements will vary depending on your project size. For a repository with 1,000 users and 20 requests per second, GitLab recommends a server with<strong> 8 vCPU <\/strong>cores and <strong>16 GB of RAM<\/strong>.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1730892582060\"><h3 class=\"schema-faq-question\">Can I install GitLab on a different Linux distribution?<\/h3> <p class=\"schema-faq-answer\">Yes, you can install GitLab on any distribution, including Debian, Ubuntu, openSUSE, and AlmaLinux. However, it might not support older operating systems, like <strong>Ubuntu 18.04<\/strong>. Note that the Hostinger GitLab OS template is pre-packaged with Ubuntu, meaning you can&rsquo;t choose other distros.<\/p> <\/div> <div class=\"schema-faq-section\" id=\"faq-question-1730892598991\"><h3 class=\"schema-faq-question\">Is it possible to upgrade GitLab after installation?<\/h3> <p class=\"schema-faq-answer\">Yes, you can upgrade GitLab to a newer version after installation using commands. To do so, back up all your repository files and download the new version using your distro&rsquo;s package manager command. The GitLab dashboard is inaccessible during the upgrade process<\/p> <\/div> <\/div>\n","protected":false},"excerpt":{"rendered":"<p>One of GitLab&rsquo;s distinguishing features is that you can self-host it by installing it on a private server. This has [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/tutorials\/how-to-install-gitlab\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":337,"featured_media":118520,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"How to install GitLab on Ubuntu","rank_math_description":"Check out the steps to install GitLab on Ubuntu: 1. Download the dependencies. 2. Install the GitLab package. 3. Adjust firewall rules and more.","rank_math_focus_keyword":"how to install gitlab","footnotes":""},"categories":[22646,22644],"tags":[],"class_list":["post-118383","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-pre-installed-applications","category-vps"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/how-to-install-gitlab","default":0},{"locale":"en-UK","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/how-to-install-gitlab","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/how-to-install-gitlab","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/how-to-install-gitlab","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/how-to-install-gitlab","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/how-to-install-gitlab","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/how-to-install-gitlab","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/how-to-install-gitlab","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts\/118383","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/users\/337"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/comments?post=118383"}],"version-history":[{"count":15,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts\/118383\/revisions"}],"predecessor-version":[{"id":130751,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/posts\/118383\/revisions\/130751"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/media\/118520"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/media?parent=118383"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/categories?post=118383"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/tutorials\/wp-json\/wp\/v2\/tags?post=118383"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}