Dev Tools

Host GitLab CE on VeloxaHost

GitLab Community Edition is a complete DevOps platform in one application, with Git repositories, merge requests, issues, CI/CD pipelines and a container registry. Companies and teams self-host it to keep source code on their own server, under their own access rules, without per-user hosted pricing.

The one-click install adds GitLab's package repository to Ubuntu 24.04 and installs the gitlab-ce Linux package, which bundles PostgreSQL, Redis, Nginx, Puma and Sidekiq and manages them with gitlab-ctl. It installs with external_url set to http://localhost, because only you know the address people will use. The first job after deploying is to set it: your domain, or http://<shared IPv4 address>:<port>, followed by gitlab-ctl reconfigure.

How much server it needs

GitLab needs far more memory than most self-hosted apps. Its requirements page gives 8 vCPU and 16 GB of memory as the single-node baseline, and says GitLab can run with at least 8 GB in memory-constrained environments. A separate guide for very small instances describes running with about 2.5 GB by switching Puma to a single process, lowering Sidekiq concurrency and turning off the bundled Prometheus:

puma['worker_processes'] = 0
sidekiq['concurrency'] = 10
prometheus_monitoring['enable'] = false

So the recommendation here is 4 vCPU and 8 GB: enough for a small team without tuning. The console's 2 vCPU and 4 GB minimum works for personal use with the settings above. Storage needs about 40 GB for the application and logs, plus your repositories, CI artifacts and registry images.

Reaching it on a shared IPv4 port

Every server gets a block of ports (10 by default) on the region's shared IPv4 address, and the first one already forwards to SSH. Forward a second port to 80, then edit /etc/gitlab/gitlab.rb (example block 20000-20009):

external_url 'http://203.0.113.10:20001'
nginx['listen_port'] = 80
gitlab_rails['gitlab_shell_ssh_port'] = 20000

Run gitlab-ctl reconfigure. The web interface is now on port 20001, and clone URLs use port 20000, where the server's SSH already answers for the git user. Sign in as root with the password in /etc/gitlab/initial_root_password; GitLab deletes that file on the first reconfigure after 24 hours, so change the password straight away.

HTTPS through GitLab's built-in Let's Encrypt support needs ports 80 and 443 on a public address: a dedicated IPv4 address, a paid add-on with limited availability. IPv6 is not available in US East yet.

Install it yourself

  1. On Ubuntu 24.04, install the prerequisites.
    apt install -y curl openssh-server ca-certificates tzdata perl
    
  2. Add GitLab's package repository.
    curl -fsSL https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | bash
    
  3. Install GitLab with the URL people will use.
    EXTERNAL_URL="http://203.0.113.10:20001" apt install -y gitlab-ce
    
  4. Add the nginx['listen_port'] and gitlab_shell_ssh_port lines above to /etc/gitlab/gitlab.rb, then gitlab-ctl reconfigure.
  5. Sign in as root and turn off open sign-up under Admin → Settings → General if the instance is private.

FAQ

How do I back up GitLab?

Run gitlab-backup create, which writes an archive of the database, repositories and uploads to /var/opt/gitlab/backups. It does not include /etc/gitlab/gitlab-secrets.json or gitlab.rb, and without the secrets file encrypted data such as CI variables cannot be restored, so copy both separately. Scheduled VeloxaHost snapshots or backups of the whole server cover all of it.

How do I upgrade GitLab?

With apt update && apt install gitlab-ce, but follow GitLab's upgrade path: large jumps must stop at required versions, which GitLab's upgrade path tool lists. Take a server snapshot first; restoring it is the quickest rollback.

Where do CI jobs run?

On GitLab Runner, installed separately. A runner only needs outbound access to GitLab's URL, so it can run on the same server or on another VeloxaHost server. Jobs that build containers need Docker on the runner's server; container servers have Docker support.

Can GitLab send email from VeloxaHost?

Yes, through an SMTP provider set in gitlab.rb. Outbound TCP port 25 is blocked by default, so use port 587 or 465.

What license is GitLab CE under?

The MIT license. Paid tiers add features to the same codebase under GitLab's enterprise license.

Which VeloxaHost size fits GitLab?

The recommended 4 vCPU and 8 GB is a Veloxa 4: 4 vCPU, 8 GB RAM and 160 GB of disk for $30 a month, billed at $0.05 an hour and capped at the monthly price. GitLab's full baseline is a Veloxa 8, with 8 vCPU and 16 GB, for $60.