Pular para o conteúdo principal
Development

Self-host GitLab CE on a VPS

Your own Git hosting, CI/CD and container registry.

Source control, merge requests, pipelines and a built-in registry on infrastructure you control. Keep proprietary code entirely inside your own network.

Why self-host GitLab CE?

For regulated or proprietary work, hosting your own GitLab means no third-party has your source, your issues or your pipeline secrets.

How to install GitLab CE

  1. 1

    Provision a VPS

    GitLab is memory-hungry — do not start below 4 GB.

  2. 2

    Install the Omnibus package

    The official package bundles everything GitLab needs.

  3. 3

    Configure external URL and TLS

    Set the domain and enable Let’s Encrypt in the config.

  4. 4

    Tune memory

    Lower Puma and Sidekiq workers on smaller plans so processes fit in RAM.

  5. 5

    Add a runner

    Register a CI runner — on the same box or a separate one — to execute pipelines.

Practical tips

  • Use a swap file as a safety net on 4 GB instances, but size RAM properly for real work.
  • Run backups with the built-in gitlab-backup task and copy them off the server.
  • Consider a separate runner host so heavy CI jobs cannot starve the GitLab UI.

Frequently asked questions

Is GitLab CE really free?
Yes, the Community Edition is open source and free to self-host; you pay only for the server.
Can I run CI/CD here too?
Yes, register a runner and your pipelines execute on your own hardware.
How much RAM does it need?
Plan on 4 GB as an absolute floor and 8 GB for comfortable, reliable operation.

Looking for something else? Popular alternatives include Gitea, Forgejo, SourceHut — browse all app guides.