Self-host GitLab CE
The whole DevOps platform in one install: repositories, merge requests, issues, a built-in CI/CD runner fleet, container and package registries, and Pages. It is open core — the community edition is MIT, the ee/ directory behind the paid tiers is not — and it is by far the heaviest thing on this list.
Key facts
GitLab CE is the pick when you want the whole DevOps platform in one install — merge requests, a built-in CI/CD runner fleet, container and package registries, and Pages — and you can afford to feed it. Upstream documents 16 GB as the single-node baseline and says it can run in a memory-constrained environment with at least 8 GB, which is an order of magnitude above Gitea, Forgejo or Gogs. That gap is the entire decision: if what you need is a forge, take Gitea or Forgejo and run a runner beside it. Take GitLab when collapsing five separate tools into one is worth operating by far the heaviest thing on this hub.
What you need
- Any VPS with at least 8192 MB of RAM
- A domain you control — most self-hosted setups need HTTPS in front of them
- About the better part of a day
Install with Docker Compose
Save this as compose.yml and run docker compose up -d:
# GitLab CE — Compose is upstream's recommended container path.
# Git over SSH is mapped to 2222 — clone URLs carry the port. Use 22:22 only if
# you have already moved the host's own sshd, which can lock you out if it goes wrong
services:
gitlab:
image: gitlab/gitlab-ce:latest # pin a versioned tag for production
hostname: gitlab.example.com
restart: always
environment:
GITLAB_OMNIBUS_CONFIG: "external_url 'http://gitlab.example.com'"
ports: ["80:80", "443:443", "2222:22"]
volumes:
- "./config:/etc/gitlab"
- "./logs:/var/log/gitlab"
- "./data:/var/opt/gitlab"
shm_size: "256m"
# docker compose up -d — first boot takes several minutes before it answers
# root password: docker exec -it gitlab grep 'Password:' /etc/gitlab/initial_root_password
# that file is deleted on the first restart after 24 hours — read it earlyWhat you take on
GitLab pays for its breadth in weight and in licensing, and both bite before you finish the first install:
An alternative to
Head-to-head
More in Code hosting
Forgejo
GitBucket
Gitea
Gogs
Common questions
Is self-hosted GitLab actually open source?
Partly. Its LICENSE file opens with "Portions of this software are licensed as follows": everything outside the ee/ and jh/ directories is under the MIT Expat license, all client-side JavaScript is MIT, documentation under doc/ is CC BY-SA 4.0, and the ee/ and jh/ directories carry their own separate proprietary licenses. The Community Edition you install from the gitlab-ce package or container is the MIT half; Premium and Ultimate features live in ee/ and are not open source.
How much RAM does self-hosted GitLab need?
GitLab documents 16 GB as the baseline for a single-node install, and says it can run in a memory-constrained environment with at least 8 GB. That is an order of magnitude above Gitea or Gogs, and it is the reason GitLab is a deliberate choice rather than a default one. Upstream also recommends disabling swap rather than leaning on it.
Omnibus package or container?
Both are official. The Linux package (Omnibus) is the standard self-managed path and bundles PostgreSQL, Redis, Gitaly, Puma, Sidekiq and NGINX behind a single gitlab.rb config file. The container wraps the same Omnibus bundle, which is why the image is enormous and first boot is slow. Upstream explicitly warns against running the Docker image in Kubernetes — use the Helm chart or Operator there.
Which features do I lose on the free tier?
The ones that live in ee/. Merge request approval rules, epics and advanced search need Premium; dependency scanning and the compliance tooling need Ultimate. Everything in the core loop stays free: unlimited private repositories, merge requests, issues, CI/CD, container scanning, the container registry and Pages. Read the tier badge on each documentation page before you commit — this is the most open-core-gated project in the catalogue.