Self-host GitLab with Levelrail
GitLab Community Edition: Git hosting, CI/CD, issues, and a container registry in one Omnibus image.
- Authorgitlabhq
- LicenceMIT
- Memory4 GiB
- Services1
How to self-host GitLab
-
Pull the images
One image is pulled on your server.
Show images
gitlab/gitlab-ce:17.5.2-ce.0
-
Create the app
One service starts in a single Compose app, with 3 named volume mounts for your data, on ports 80, 22.
-
Fill in the secrets
1 secret is generated and stored encrypted, 1 setting is preset, you do not have to fill in anything.
-
Open it
Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.
GitLab requirements
- Memory
- About 4 GiB
- Architectures
- amd64 image published, arm64 not available
- Ports
- 80, 22
- Domain
- Optional, an sslip.io address is used without one
- Settings
- none to fill in
- License
- MIT, permissive license
- Listed. It is in the catalog but not verified. Back up the data volume before changing an image tag.
- Host ports. It publishes ports 80, 22 on the host, so open them in the VPS firewall only if you want that.
Install Levelrail first
On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then GitLab. New to Levelrail? Install it on a fresh VPS first.
docker pull ghcr.io/glincker/levelrail:latest Then levelrail-cli login --device. See Getting started and the GitLab docs page.
Deploy GitLab your way
Every format below deploys the same pinned images. Pick the one that fits how you work.
Deploy GitLab from the CLI
levelrail-cli templates deploy gitlab --name my-gitlab Deploy GitLab with the API
curl -X POST -H "Authorization: Bearer $TOKEN" \
https://levelrail.example.com/api/v1/service-templates/gitlab/deploy GitLab configuration
GitLab services
| Service | Image | Ports | Volumes |
|---|---|---|---|
| gitlab | gitlab/gitlab-ce:17.5.2-ce.0 | 80, 22 | gitlab_config -> /etc/gitlabgitlab_logs -> /var/log/gitlabgitlab_data -> /var/opt/gitlab |
GitLab environment variables
| Variable | Service | Value |
|---|---|---|
| GITLAB_OMNIBUS_CONFIG | gitlab | Preset by the template |
| GITLAB_ROOT_PASSWORD | gitlab | Generated at deploy |
Ports and volumes
- Ports
- 80, 22
- Volumes
- 3 named mounts: gitlab_config -> /etc/gitlab, gitlab_logs -> /var/log/gitlab, gitlab_data -> /var/opt/gitlab
GitLab FAQ
How much memory does GitLab need?
The catalog lists about 4 GiB of memory for GitLab.
Does GitLab run on arm64?
For GitLab, amd64 only, no arm64 image; amd64 is image published.
What licence is GitLab under?
GitLab is licensed under MIT, which is permissive, with few conditions on reuse.
Does GitLab need configuration before it starts?
No. The template fills in its own defaults and generates secrets at deploy time.
Which ports does GitLab use?
GitLab listens on ports 80 and 22 inside the stack.
Where does GitLab keep its data?
In named volumes: gitlab_config mounted at /etc/gitlab, gitlab_logs mounted at /var/log/gitlab and gitlab_data mounted at /var/opt/gitlab.
Can I deploy GitLab on Dokploy or Dokku?
The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for GitLab, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image gitlab/gitlab-ce:17.5.2-ce.0 is what you deploy there.