Self-host GitLab
Open-core DevOps platform for Git hosting, CI/CD and MRs
docker compose up -d- CPU
- 8 vCPU (baseline for a single-node installation)
- RAM
- 16 GB (baseline; can run with at least 8 GB in memory-constrained environments)
- Storage
- 40 GB for application nodes (package installation ~2.5 GB plus OS, logs, temporary files)
- Ports
- 80 (HTTP web UI and Git over HTTP), 443 (HTTPS), 22 (Git over SSH (GitLab Shell))
- Requires
- Git, Mail transport agent (Postfix or Sendmail), PostgreSQL, Redis
gitlab/gitlab-ceWhat is GitLab?
This Rails-based product pulls source code management, build and deployment pipelines, issue tracking and documentation into a single application that runs on your own hardware. Its README advertises fine-grained permissions for Git repositories, code review via merge requests, CI/CD pipelines that build, test and ship applications, plus a per-project issue tracker, board and wiki, and notes that over 100,000 organizations run it on-premises for their Git hosting. Licensing is open-core: the bulk of the code is MIT, while files under /ee stay proprietary yet source available and open to contributions. Three editions ship - the free Community Edition, Enterprise Edition aimed at organizations larger than 100 users with official support behind a subscription, and a JiHu edition for China. To self-host, the documented options are the recommended Omnibus deb/rpm packages (which bundle PostgreSQL, Redis and Sidekiq), Docker images used through Compose, Docker Engine or Swarm, the Kubernetes Helm chart or GitLab Operator, and a self-compiled install; a single node should have 8 vCPU and 16 GB RAM, with 8 GB possible when memory is tight. Paid tiers unlock Premium and Ultimate capabilities, and GitLab.com remains available as the vendor-hosted option.
GitLab alternatives
ForgejoA self-hosted, open-source software forge: git hosting with issues, pull requests, wikis, CI and package registries in one lightweight binary or container.CompareForgejo with GitLab
GiteaGitea is a self-hosted, open-source Git platform with code hosting, CI/CD, package registries, issues, and project management — a lightweight GitHub alternative.CompareGitea with GitLab
GerritOpen-source, self-hosted code review and Git repository management server: patchset reviews, fine-grained permissions, plugins, REST API and webhooks.CompareGerrit with GitLab
GogsA lightweight, open-source, self-hosted Git service written in Go: repos, issues, pull requests, wikis and LDAP login, run from one binary or a Docker image.CompareGogs with GitLab
GitnessAn open-source, self-hosted DevOps platform combining Git code hosting, CI/CD pipelines, Gitspaces dev environments and artifact registries in one Docker container.CompareGitness with GitLab
Gitea RunnerGit with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CDCompareGitea Runner with GitLab
PipewrightA self-hosted CI/CD platform that unifies build pipelines, server deployment, and container management in a single Go binary.ComparePipewright with GitLab
semaphoreSemaphore is a self-hosted, open-source CI/CD platform with YAML pipelines, parallel execution, and self-hosted agents for teams.Comparesemaphore with GitLab
Should you self-host GitLab?
GitLab scores 68/100 on selfhost.directory (how scoring works) and ranks #5 of 15 in Code Hosting.
There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.
Setup is advanced: plan for several services and some ongoing maintenance. An official Docker image is available. It is mit-licensed.
Its closest alternative on selfhost.directory is Gitea (89/100, 59 114 stars). It scores higher overall, so compare the two before you pick. See GitLab vs Gitea side by side.
Features
- AI assistant (GitLab Duo)Duo Agent Platform on Self-Managed needs GitLab 18.7/18.8 or later and credits; some tiers paid.
- CI/CD PipelinesJobs are executed by GitLab Runner instances you set up.
- Container RegistryNeeds its own domain and TLS certificate.
- Dependency proxy
- Enterprise features behind paid tiersOfficial support and extra features require a subscription.
- Geo ReplicationOnly takes effect when Geo is enabled.
- Issue Tracking
- Merge requests
- Single sign-on (LDAP, SAML, OAuth, OIDC)
- Wiki
How to install GitLab
Install GitLab with Docker
GITLAB_OMNIBUS_CONFIGshell
sudo docker run --detach \
--hostname gitlab.example.com \
--env GITLAB_OMNIBUS_CONFIG="external_url 'http://gitlab.example.com'" \
--publish 443:443 --publish 80:80 --publish 22:22 \
--name gitlab \
--restart always \
--volume $GITLAB_HOME/config:/etc/gitlab \
--volume $GITLAB_HOME/logs:/var/log/gitlab \
--volume $GITLAB_HOME/data:/var/opt/gitlab \
--shm-size 256m \
gitlab/gitlab-ee:<version>-ee.0
Sign in as root with the password from /etc/gitlab/initial_root_password.
FAQ
Do the compute minutes apply to all runners?
No, compute minute limits only apply to GitLab.com shared runners.
Can I bring my own GitLab CI/CD runners?
Yes, bring-your-own runners work with all plans.
Can I import my projects from another provider?
Yes, project import from other providers is supported.
What are the differences between SAST, Secret Detection, and Container Scanning across tiers?
Basic scans run in every tier, but enterprise-grade scanning and management features are only available in Ultimate.
What are the differences between Free, Premium, and Ultimate plans?
The differences are laid out in GitLab's feature comparison pages for Premium and Ultimate.
Is there a minimum supported version to use specific capabilities?
For Self-Managed, GitLab Duo Agent Platform requires at least version 18.8, and trialing Ultimate with Duo and GitLab Credits requires 18.9.
How do I install GitLab Self-Managed?
All supported installation methods are listed in the GitLab installation documentation.
What is GitLab Self-Managed?
It is the version of GitLab you install, configure and maintain on your own infrastructure, whether on-premises or in the cloud.
More in Code Hosting
GitLab-CESelf-hosted, open-source DevOps platform for Git repositories, merge requests, CI/CD pipelines, issue boards and wikis, with free CE and paid Premium/Ultimate tiers.
GitnessAn open-source, self-hosted DevOps platform combining Git code hosting, CI/CD pipelines, Gitspaces dev environments and artifact registries in one Docker container.
GitusGitus is a self-hosted, open-source Git forge in Go with no JavaScript, featuring a web installer, SSH access, issues, pull requests, and experimental webhooks.
GogsA lightweight, open-source, self-hosted Git service written in Go: repos, issues, pull requests, wikis and LDAP login, run from one binary or a Docker image.
harnessSelf-hosted, open-source DevOps platform: Git hosting with pull requests, CI/CD pipelines, Gitspaces dev environments, and Docker and Helm artifact registries.
legitOpen-source, self-hosted browsing UI for Git repos, built in Go: serves bare repositories from a folder with custom templates, README rendering and HTTP cloning.
OneDevOneDev is a powerful and simple DevOps platform that integrates Git server, Kanban, CI/CD, and package registries into a seamless experience.- PagurePagure is a lightweight, git-centered forge for hosting projects with documentation, ticketing, and pull-request mechanisms.
rgitSelf-hosted, open-source Git web interface in Rust using RocksDB caching and gitoxide for fast browsing with dark mode.- RhodeCodeRhodeCode is an open-source, self-hosted platform for unified repository management, supporting Git, Mercurial, and Subversion. It provides enterprise-grade security, code review, workflow automation, and permission management for teams.
Roundup Issue TrackerRoundup is a highly customizable issue-tracking system with command-line, web, REST, XML-RPC, and e-mail interfaces. It is designed to be easy to install and use, and can be adapted to various use cases.
scm-managerSelf-hosted open-source repository manager for Git, Mercurial and Subversion with web UI, REST API, and plugin system.
0 comments