Updated by Linode
Use promo code DOCS10 for $10 credit on a new account.
GitLab One-Click App
GitLab is a complete solution for all aspects of your software development. At its core, GitLab serves as your centralized remote Git repository. GitLab also features built-in tools that represent every task in your development workflow, from planning to testing to releasing.
Self-hosting your software development with GitLab offers total control of your codebase. At the same time, its familiar interface will ease collaboration for you and your team. GitLab is the most popular self-hosted Git repository software, so you’ll benefit from a robust set of integrated tools and an active community.
Deploy a GitLab One-Click App
One-Click Apps allow you to easily deploy software on a Linode using the Linode Cloud Manager. To access Linode’s One-Click Apps:
Log in to your Linode Cloud Manager account.
From the Linode dashboard, click on the Create button in the top left-hand side of the screen and select Linode from the dropdown menu.
The Linode creation page will appear. Select the One-Click tab.
Under the Select App section, select the app you would like to deploy:
Once you have selected the app, proceed to the app’s Options section and provide values for the required fields.
You can configure your GitLab App by providing values for the following fields:
|Domain||Your GitLab site’s domain name. This domain will also be used by Postfix to send mail. Setting a value for this field will not automatically set up DNS for your app, so be sure to follow the DNS instructions in the Access your GitLab Site section. If you do not have a domain name, you can leave this field blank and Postfix will use your Linode’s default Reverse DNS to send email instead (i.e.
|SSH public key||Your SSH public key. The public key will be stored in the
After providing the app specific options, provide configurations for your Linode server:
|Select an Image||Debian 9 is currently the only image supported by the GitLab One-Click App, and it is pre-selected on the Linode creation page. Required.|
|Region||The region where you would like your Linode to reside. In general, it’s best to choose a location that’s closest to you. For more information on choosing a DC, review the How to Choose a Data Center guide. You can also generate MTR reports for a deeper look at the network routes between you and each of our data centers. Required.|
|Linode Plan||Your Linode’s hardware resources. We recommend that you use, at minimum, an 8GB Linode plan for your GitLab server. For more information on GitLab’s system requirements see their official documentation. If you decide that you need more or fewer hardware resources after you deploy your app, you can always resize your Linode to a different plan. Required.|
|Linode Label||The name for your Linode, which must be unique between all of the Linodes on your account. This name will be how you identify your server in the Cloud Manager’s Dashboard. Required.|
|Root Password||The primary administrative password for your Linode instance. This password must be provided when you log in to your Linode via SSH. It must be at least 6 characters long and contain characters from two of the following categories: lowercase and uppercase case letters, numbers, and punctuation characters. Your root password can be used to perform any action on your server, so make it long, complex, and unique. Required.|
When you’ve provided all required Linode Options, click on the Create button. Your GitLab app will complete installation anywhere between 3-7 minutes after your Linode has finished provisioning.
Getting Started after Deployment
Access your GitLab Site
After GitLab has finished installing, you will be able to access your GitLab site over
http:// with your Linode’s IPv4 address or the domain name entered when deploying your GitLab One-Click App.
Access your GitLab instance:
With your Linode’s IP Address
You will be able to access your GitLab site by copying your Linode’s IPv4 address and entering it in the browser of your choice. To find your Linode’s IPv4 address:
Click on the Linodes link in the sidebar. You will see a list of all your Linodes.
Find the Linode you just created when deploying your app and select it.
Navigate to the Networking tab.
Your IPv4 address will be listed under the Address column in the IPv4 table.
Copy and paste the IPv4 address into a browser window. Ensure you are using
With a Domain Name
If you deployed your GitLab One-Click App with a value set for the Domain field, you will need to separately set up DNS for your app. Specifically, you’ll need to create an A record associated with the IPv4 address for your Linode. Review the DNS Manager guide for instructions on setting up DNS records.
Once your DNS records are created (and the changes have propagated to your internet service provider), you can then enter the domain name in a browser window to access your GitLab site. Ensure you are using
http://when visiting your site.
Once you have accessed your GitLab site, you will be brought to GitLab’s password reset screen. Provide a secure password for the administrator’s account:
You will be redirected to the login screen. Enter
rootas the username and the password you just created to log in. You can now begin creating GitLab repositories, users, and more. See GitLab’s official documentation for more information.
Add a Domain after Deploying your GitLab Instance
If you configured your GitLab One-Click App without providing a domain, you can configure one after the app has been deployed. Begin by setting up DNS for your domain:
Create an A record associated with the IPv4 address for your Linode. Review the DNS Manager guide for instructions on setting up DNS records.
Wait for your new DNS records to propagate to your internet service provider.
After setting up DNS, you will need to update your GitLab instance’s
/etc/gitlab/gitlab.rb file with your domain name. This will ensure that any emails sent to users by the GitLab instance will use your site’s domain.
Connect to your Linode via SSH.
With a text editor of your choice (nano, for example), open the
/etc/gitlab/gitlab.rbfile and modify the value of
external_url. Ensure you replace
http://example.comwith your domain:
1 2 3 4 5
## 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-external-url-for-gitlab external_url 'http://example.com'
Issue the following command to enable your new configuration:
Navigate to the domain in a browser window and verify that you are directed to your GitLab instance.
The GitLab One-Click App will install the following required software on your Linode:
|GitLab||Remote Git repository software.|
|Postfix||Postfix is a free and open-source mail transfer agent that routes and delivers electronic mail.|
|UFW||Firewall utility. Ports 22/tcp, 80/tcp, 443/tcp, 25, 587, and 110 for IPv4 and IPv6 will allow outgoing and incoming traffic.|
|Fail2ban||Fail2Ban is an intrusion prevention software framework that protects computer servers from brute-force attacks.|
You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.
Find answers, ask questions, and help others.
This guide is published under a CC BY-ND 4.0 license.