Introduction
The One-Click GitLab application is a ready-to-use GitLab Community Edition (CE) running on Ubuntu Server. GitLab requires an instance with at least 2GB RAM and 2 CPU cores.
Self-Signed SSL
It's preferred to configure GitLab with a domain name and valid SSL certificate, but it's possible to access the GitLab application by IP address with the default self-signed certificate.
- Navigate to the link shown in your Server Information page.
- Proceed past the certificate warning. See our instructions to bypass the HTTPS warning for self-signed SSL/TLS certificates.
- You'll be prompted "Please create a password for your new account."
- Enter your password in the fields, then click Change your password.
- Log in as root with your new password.
Install SSL Certificate
You can use either a free Let's Encrypt certificate or a commercial certificate. A valid certificate will allow cloning repositories over HTTPS with Git. Substitute your IP address and domain for these examples:
- 192.0.2.123
- oneclick.example.com
Register Server Name
Before installing the SSL certificate, configure GitLab for your domain name.
- Register the server's domain name and create a DNS record for the server's IP address. Consult your DNS provider for instructions, or see our guide if using Rcs's DNS.
- Verify that DNS has finished propagation and the name is visible throughout the internet before proceeding. Propagation usually happens quickly, but could take up to 48 hours in some cases.
If you are installing a commercial certificate, skip to the Commercial SSL Certificate section.
Install Let's Encrypt Certificate
GitLab can request and manage Let's Encrypt certificates with a few configuration changes to the control file.
Connect to your server, with the root login from the Server Information screen.
Edit the control file /etc/gitlab/gitlab.rb
# nano /etc/gitlab/gitlab.rb
Locate the external_url setting. Change the IP address to the server domain name. This is located near line 30.
external_url "https://oneclick.example.com"
Locate the following section. It's easier to locate by searching for letsencrypt with Control+W (find).
############################## # Let's Encrypt integration ############################## # letsencrypt['enable'] = nil # letsencrypt['contact_emails'] = []
Remove the comments to enable the two lines. Change nil to true and set your admin email address.
############################## # Let's Encrypt integration ############################## letsencrypt['enable'] = true letsencrypt['contact_emails'] = ['admin@example.com']
Several optional settings for Let's Encrypt are available, including renewal scheduling. See the GitLab Docs for more information.
Locate the ssl_certificate setting. Change the IP address to the server domain name. This is located near the end of the file. It's easier to locate by searching for the IP address with Control+W (find). For example, replace this:
nginx['ssl_certificate'] = "/etc/gitlab/ssl/192.0.2.123.crt" nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/192.0.2.123.key"
With this:
nginx['ssl_certificate'] = "/etc/gitlab/ssl/oneclick.example.com.crt" nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/oneclick.example.com.key"
Save the file and exit the editor.
Reconfigure the GitLab server.
# gitlab-ctl reconfigure
When reconfiguration completes, verify your certificate is installed. Navigate to your server at with a web browser and log in.
https://oneclick.example.com
Commercial SSL Certificate
To install a new certificate, do the following:
Obtain a certificate from a certificate authority for your domain.
Connect to your server, with the root login from the Server Information screen.
Replace the 192.0.2.123.crt and 192.0.2.123.key files in /etc/gitlab/ssl/ with the new certificate. Details on converting certificate formats are outside of the scope of this article.
Edit the control file /etc/gitlab/gitlab.rb
# nano /etc/gitlab/gitlab.rb
Locate the external_url setting. Change the IP address to the server domain name. This is located near line 30.
external_url "https://oneclick.example.com"
Reconfigure the GitLab server:
# gitlab-ctl reconfigure
Git Repositories
Your Git repositories are located in /var/opt/gitlab/git-data/repositories.
About One-Click Apps
One-Click apps are updated regularly without notice. When launching a One-Click app, you'll receive our latest version. We do not update deployed instances, and you are responsible for keeping the instance up-to-date. If you design an infrastructure based on One-Click apps and need to ensure the same app version in the future, take a snapshot of the initial deployment and create new instances from the snapshot.