GitLab is basically an open source clone of GitHub, allowing you to host your own git-based code collaboration system.
Brightbox are big fans of GitLab and have been sponsoring their demo servers since way back in 2011!
This guide goes through getting a GitLab server of your own up and running in just a few minutes by using our user-data service to pre-configure things on first boot.
It’ll be set up so that GitLab can send emails and that security upgrades are automatically applied nightly using
First things first, get signed up and logged into Brightbox Manager. Make sure you provide an ssh key, so you can access your new server after it’s built.
Cloud Servers in the navigation bar on the left and then click the
New Cloud Server button on the right.
This pops up the
New Cloud Server dialog.
Give your new server a descriptive name like
GitLab server and change the Server Type to at least a 1GB RAM Mini, which is the recommended minimum for GitLab.
Now click the
Image tab and search for
“12.04” to find the official Ubuntu 12.04 images and select the
Now click the
Advanced tab and paste the following script into the
User defined metadata box:
#!/bin/sh DOWNLOAD_URL=https://downloads-packages.s3.amazonaws.com/ubuntu-12.04/gitlab_6.9.2-omnibus-1_amd64.deb apt-get update echo postfix postfix/main_mailer_type select "Internet Site" | debconf-set-selections echo postfix postfix/mailname select `hostname -f` | debconf-set-selections echo unattended-upgrades unattended-upgrades/enable_auto_updates boolean true | debconf-set-selections apt-get -y install language-pack-en postfix unattended-upgrades curl -o /tmp/gitlab.deb $DOWNLOAD_URL dpkg -i /tmp/gitlab.deb gitlab-ctl reconfigure
You can get the latest GitLab Ubuntu download url from their downloads page - just update the
Then click the
Create button and server will be built and will start auto-installing GitLab and all it’s dependencies.
Once the server goes into
active state, indicated by the green circle, you’ll want to map a Cloud IP to it so you can access it over IPv4 (if you’re IPv6 enabled you can skip this step)
Cloud IPs in the navigation bar on the right and click
New Cloud IP.
Destination to your new GitLab server and click
The Brightbox Cloud default firewall policy allows HTTP and SSH and blocks everything else (like PostgreSQL) so your GitLab server is pretty well secured - you don’t need to add or change any rules.
If you’ve changed the defaults, be sure to setup a new policy and open the appropriate access.
You can now access your new GitLab installation, just stick the Cloud IP address in your browser, or you can use your servers public hostname:
If you have IPv6 you can access your server using it’s IPv6 hostname:
If you get a connection refused message, then the GitLab installation is still in progress - our cloud servers can be booted and accessible in less than 30 seconds but GitLab has lots of dependencies to be configured and takes a bit longer, so give it a minute or two.
The default admin account is
root with a password of
If you provided an SSH key during signup as suggested, you can ssh into your server using the username
$ ssh email@example.com
And you can get root access using
ubuntu@srv-xxxxx:~$ sudo gitlab-ctl status run: nginx: (pid 1612) 38s; run: log: (pid 1610) 38s run: postgresql: (pid 1613) 38s; run: log: (pid 1605) 38s run: redis: (pid 1608) 38s; run: log: (pid 1606) 38s run: sidekiq: (pid 1614) 38s; run: log: (pid 1611) 38s run: unicorn: (pid 1609) 38s; run: log: (pid 1607) 38s
You can backup your new GitLab installation by snapshotting it. Snapshots are stored across our two UK datacentres and when you want to restore you just build a new server from the snapshot image.
Or you can use GitLab’s own backup system that creates tar archives, which you can copy offsite (or store in our upcoming object storage service!)
There is more to GitLab than just bootstrapping an initial install, so get stuck into the documentation to see what else can be tweaked and configured.
Last updated: 20 Jul 2018 at 10:51 UTC