GitLab combines source control, web application services, PostgreSQL, Redis, background workers, repository storage, and optional CI activity. That makes it much heavier than a simple Git server.
The best VPS size depends on team activity, repository count, CI workload, container registry usage, and whether runners share the same machine.
Key takeaways
- 4 GB RAM is a practical lower bound for a small self-hosted GitLab instance.
- 8 GB is more comfortable for active teams and additional services.
- CI runners can consume far more CPU and memory than GitLab itself.
- Repository and registry storage can grow quickly.
- Backups should cover repositories, database state, configuration, and secrets.
How much RAM for GitLab?
A small team can run GitLab on modest resources, but 4 GB should be treated as a practical floor rather than a generous configuration. Eight gigabytes provides more room for background jobs, PostgreSQL, Redis, and concurrent users.
The correct size grows with project activity rather than repository count alone. Issues, merge requests, search, background jobs, and integrations all add load.
CI runners change the sizing equation
CI jobs can compile software, build Docker images, run tests, or process large artifacts. Those workloads may saturate CPU and memory even when the GitLab web application is lightly used.
Separate runners are often the cleanest way to scale because they can use different instance types and be created only when needed.
Storage and repository growth
Repositories, artifacts, package registries, logs, and container images accumulate over time. Plan disk capacity beyond the current code size.
Fast storage helps repository operations and database latency, while external object or block storage can simplify capacity growth.
Backups and recovery
A GitLab backup plan should protect repositories, the database, configuration, secrets, and any external storage dependencies. Test restoring to a clean server.
The value of self-hosting depends on being able to recover after a failed upgrade or server loss.
Frequently asked questions
Is 4 GB RAM enough for GitLab?
It can be enough for a small team and light activity, but 8 GB provides much more comfortable headroom.
Should GitLab CI run on the same VPS?
For very light use it can, but separate runners are easier to scale and prevent build jobs from affecting GitLab itself.
Does GitLab need fast storage?
Yes. Repository access, database operations, artifacts, and container images all benefit from responsive storage.
Can GitLab run in Docker?
Yes, though containerization does not reduce the underlying RAM, CPU, storage, and backup requirements.