Once you have a Digitalocean account, this page will explain how to:
First, click Create in the top right, and click the first item Droplets
Leave it as an Ubuntu 20.04 server, and change the server type to the $20/mo shared 2vCPU 4GB memory option.
Scroll down, and select where you want your datacenter region. The closer to you, the better.
Scroll down again, and make sure that your SSH key is selected.
You can also choose to add backups.
Now that you have everything selected, you can click Create Droplet.
We can see our domain, and our Droplet being created in our Digitalocean dashboard.
Once our droplet has been created, let’s click our
80pxtesting.com domain and add some settings to point to our new Gitlab server.
We’re going to tell our domain settings to point to the gitlab, registry, and mattermost subdomains (code.80pxtutorial.com, registry.80pxtutorial.com, and chat.80pxtutorial.com) we’re going to use to the server we just created.
We’re going to use simple DNS A records, so you just have to click on the domain, then you are presented with what you want to change in the box.
Here is an example of saying we want a subdomain of
code and we want to point it to the droplet we just made (there is only one server available to choose)
We hit create record, and this domain setting will now point
code.80pxtesting.com to this server’s IP address. (
We do this again for our registry, and chat subdomains, and here’s what our entire DNS settings look like at this point.
OK, now we want to log into our server, create a safe user that isn’t root, and install and configure gitlab.
Once your DNS settings have propagated, you should be able to open up a terminal and connect to your server by typing this:
You will be asked to add this server to your list of known servers. You can type
yes and hit enter to continue.
Awesome, now we’re in the server.
You can tell the terminal we’re in now is the server because the title is no longer
pxtesting@pxtesting-VirtualBox: ~. It changed to our new user and host
We’re going to reference this tutorial from Digitalocean: Initial Server Setup with Ubuntu 20.04.
First, add a new user named
Give the user sudo (administrator) access
usermod -aG sudo code
Enable the firewall so only the SSH protocol is allowed for now
ufw allow OpenSSH
Copy your public ssh key to the new code user, and use that user from now on.
rsync --archive --chown=code:code ~/.ssh /home/code
Switch to the
Now that you have an Ubuntu server with some good Gitlab subdomains pointing to it, let’s install Gitlab.