Skip to main content
Development

Self-host Harbor on a VPS

An open-source container registry with security scanning.

Store and distribute container images privately, with RBAC, replication and vulnerability scanning built in.

Why self-host Harbor?

A private registry keeps your images (and any secrets baked into them) off public registries and inside your network.

How to install Harbor

  1. 1

    Provision a VPS

    Pick a Debian/Ubuntu template and get root SSH in about a minute.

  2. 2

    Install the runtime

    Install Docker Compose + PostgreSQL + Redis.

  3. 3

    Deploy the application

    Net what you need from the project’s official source and run it.

  4. 4

    Put it behind TLS

    Reverse-proxy with Nginx and issue a Let’s Encrypt certificate.

  5. 5

    Add it to your backups

    Include the data directory and database in your backup routine before you rely on it.

Practical tips

  • Give Harbor its own database user with rights only on its own schema.
  • Reverse-proxy Harbor and terminate TLS at the proxy so certificates are managed in one place.
  • Take a VPS snapshot before major upgrades so you can roll back cleanly.
  • Keep Harbor patched — most self-hosting incidents are unpatched software.

Frequently asked questions

How much RAM does Harbor need?
Plan on 4 GB for typical use; add headroom if you expect many concurrent users.
What stack does Harbor run on?
Docker Compose + PostgreSQL + Redis.
Can I run other things on the same VPS?
Yes — size the plan so Harbor plus your other workloads fit in RAM with room to spare.

Looking for something else? Popular alternatives include GitLab Registry, Gitea Packages, Zot — browse all app guides.