Why Self-Host a Container Registry?
If you run docker containers — whether for a homelab, a small team, or a production environment — you eventually hit the limits of Docker Hub. Rate limits, image size restrictions, privacy concerns, and dependency on an external service make a self-hosted container registry one of the most practical infrastructure decisions you can make.
Here’s what you gain by running your own registry:
No rate limits. Docker Hub’s free tier caps anonymous pulls at 100 per 6 hours and authenticated pulls at 200 per 6 hours. A self-hosted registry has zero pull limits — your only bottleneck is network bandwidth.
Full image privacy. Your proprietary application images, internal tooling, and custom base images never leave your network. This matters for compliance (SOC 2, HIPAA, GDPR) and for protecting intellectual property.
Faster pulls. When your registry lives on the same LAN or data center as your compute nodes, image pulls happen at local network speeds. A 2 GB image that takes 30 seconds from Docker Hub might pull in under 3 seconds locally.
Complete control over retention and cleanup. Set your own policies for how many image tags to keep, when to delete untagged manifests, and how long to retain pull logs. No vendor-imposed quotas.
Cost predictability. Docker Hub Pro costs $60/user/year with storage limits. Harbor, Distribution, and Zot are all free and open-source — you only pay for the disk and compute you provision.
In 2026, three projects stand out in the self-hosted container registry space: Harbor (the enterprise-grade platform from VMware/CNCF), CNCF Distribution (the minimal, composable registry that powers Docker Hub itself), and Zot (the modern OCI-native registry with built-in security scanning). Let’s compare them.
Quick Comparison Table
| Feature | Harbor | CNCF Distribution | Zot |
|---|---|---|---|
| License | Apache 2.0 | Apache 2.0 | Apache 2.0 |
| Written In | Go + Vue.js (UI) | Go | Go |
| OCI Compliant | ✅ | ✅ (originator) | ✅ Native |
| Web UI | ✅ Full-featured | ❌ None | ✅ Basic |
| RBAC | ✅ Project-based, LDAP/AD/OIDC | ❌ Basic auth only | ✅ OIDC, htpasswd |
| Image Scanning | ✅ Trivy, Clair | ❌ Plugin required | ✅ Built-in Trivy |
| Replication | ✅ To other registries | ❌ Manual | ✅ Pull/Push |
| Content Trust | ✅ Notary integration | ❌ Not supported | ✅ Cosign support |
| Helm Charts | ✅ Native support | ❌ | ❌ |
| Proxy Cache | ✅ Cache Docker Hub, GHCR, etc. | ✅ Via registry-mirror | ✅ Via upstream config |
| Min RAM | ~2 GB | ~64 MB | ~128 MB |
| Docker Compose | ✅ Official compose file | ✅ Simple config | ✅ Single binary |
| Garbage Collection | ✅ Online GC | ✅ Online GC | ✅ Online GC |
| API | ✅ REST + Swagger | ✅ REST | ✅ REST + OpenAPI |
| Best For | Enterprises, teams | Minimal setups, embedded | Security-focused teams |
Harbor: The Enterprise Registry Platform
Harbor is the most feature-complete container registry available as open-source software. Originally developed by VMware and now a graduated CNCF project, Harbor is the registry of choice for organizations that need role-based access control, image vulnerability scanning, audit logging, and replication out of the box.
When to Choose Harbor
Harbor makes sense when you need more than just a place to push and pull images. It’s ideal for:
- Teams managing dozens of projects with different access policies
- Organizations that require vulnerability scanning before deployment
- Environments that need to replicate images across multiple registry instances (e.g., edge deployments)
- Anyone who wants a full web UI for browsing, searching, and managing container images
Architecture
Harbor is a multi-service architecture. A typical deployment includes:
- Core — the main API and web UI server
- Jobservice — handles replication, scanning, and garbage collection jobs
- Registry — the underlying CNCF Distribution instance for actual image storage
- Portal — the Vue.js frontend
- Database — PostgreSQL for metadata (users, projects, RBAC, scan results)
- Redis — caching and session management
- Trivy — optional container image vulnerability scanner
This means Harbor has more moving parts than the alternatives, but each component is production-grade and horizontally scalable.
Installation with Docker Compose
Harbor provides an official installer that generates a complete Docker Compose configuration. Here’s the recommended setup for a production homelab or small team:
| |
For a lightweight homelab setup without HTTPS (behind a reverse proxy):
| |
After starting with docker compose -f docker-compose.harbor.yml up -d, access the web UI at http://your-server:8080 and log in with admin / your configured password.
Configuring Proxy Cache for Docker Hub
One of Harbor’s most useful features is the proxy cache. Instead of hitting Docker Hub rate limits, Harbor caches every pulled image locally:
- Log into the Harbor web UI as admin
- Navigate to Registries > New Endpoint
- Set provider to Docker Hub, enter credentials
- Navigate to Projects > New Project, enable Proxy Cache, select your Docker Hub endpoint
- Pull via your Harbor:
docker pull harbor.exa[nginx](https://nginx.org/)com/dockerhub/library/nginx:latest
Harbor now caches every image pulled through this project. Subsequent pulls of the same tag hit Harbor’s local cache instantly.
CNCF Distribution: The Minimal Registry
CNCF Distribution (formerly Docker Distribution) is the reference implementation of the OCI Distribution Specification. It’s the simplest, most lightweight option — a single binary that serves as a Docker-compatible registry with minimal dependencies.
When to Choose Distribution
Distribution is the right choice when you want:
- A dead-simple registry with zero ceremony
- Minimal resource footprint (runs comfortably on a Raspberry Pi)
- The exact same technology that powers Docker Hub and GitHub Container Registry
- A registry to embed into another application or pipeline
- No web UI, no database, no scanning — just push and pull
Installation with Docker Compose
Distribution can run as a single container with a simple configuration file:
| |
Minimal configuration file (/opt/registry/config/config.yml):
| |
Generate the htpasswd file for basic authentication:
| |
To use the registry from your Docker client, configure the daemon to trust the registry’s CA certificate:
| |
Adding Garbage Collection
Distribution supports garbage collection to reclaim disk space from deleted images. Run it periodically via a cron job:
| |
Zot: The OCI-Native Security Registry
Zot is a modern, OCI-native container registry built from the ground up with security in mind. Developed by Project Zot (a CNCF sandbox project), it offers built-in image scanning with Trivy, fine-grained access control, and a clean web UI — all in a single binary with no external database dependencies.
When to Choose Zot
Zot is a great fit when you want:
- Built-in vulnerability scanning without deploying a separate scanner
- Cosign-based content trust and signature verification
- A single-binary deployment that’s easy to manage
- OCI-native features like referrers API and artifact manifests
- Fine-grained authorization policies without the complexity of Harbor
Installation with Docker Compose
Zot runs as a single process with a YAML configuration file. Here’s a production-ready setup:
| |
Configuration file (/opt/zot/config/config.json):
| |
Set up and start Zot:
| |
Access the web UI at https://registry.example.com:5000 — Zot’s built-in interface lets you browse repositories, view image tags, inspect manifests, and see CVE scan results without any additional setup.
Built-in Image Scanning
Zot’s standout feature is its integrated Trivy scanner. Unlike Harbor (which requires a separate Trivy container), Zot runs scanning as a built-in extension. It automatically scans every pushed image and surfaces vulnerabilities directly in the web UI and API:
| |
Detailed Feature Breakdown
Security
| Aspect | Harbor | Distribution | Zot |
|---|---|---|---|
| Authentication | LDAP, AD, OIDC, DB | htpasswd, token | htpasswd, OIDC, LDAP |
| Authorization | RBAC per project | Basic | Policy-based ACL |
| Image Scanning | Trivy, Clair (separate) | None built-in | Trivy (built-in) |
| Content Trust | Notary v1/v2 | Not supported | Cosign, Notation |
| Audit Logging | ✅ Full audit trail | ❌ | ✅ Basic |
| TLS | ✅ Mutual TLS support | ✅ | ✅ |
| SBOM Generation | ✅ Via Trivy | ❌ | ✅ Built-in |
Developer Experience
| Aspect | Harbor | Distribution | Zot |
|---|---|---|---|
| Web UI | Full project management | None | Browse, search, CVE view |
| API | REST + Swagger docs | REST | REST + OpenAPI |
| CLI | harbor-cli (community) | reg (third-party) | zot (limited) |
| Helm Support | ✅ Native chart repo | ❌ | ❌ |
| Proxy Cache | ✅ Multi-source | Via mirror config | ✅ Sync extension |
| Replication | ✅ Push/Pull to remote | ❌ | ✅ Pull from upstream |
Operational Requirements
| Aspect | Harbor | Distribution | Zot |
|---|---|---|---|
| Min RAM | ~2 GB | ~64 MB | ~128 MB |
| Containers | 6-8 services | 1 container | 1 container |
| External DB | PostgreSQL required | None | None |
| External Cache | Redis required | None | None |
| Disk for 100 images | ~5 GB + DB overhead | ~4 GB | ~4 GB |
| Upgrade complexity | Multi-service upgrade | Single binary swap | Single binary swap |
| Backup | DB + registry storage | Registry storage only | Registry storage only |
Choosing the Right Registry
The decision comes down to your team size, security requirements, and operational tolerance:
Pick Harbor if you’re running a team or organization that needs the full platform experience — user management, project-scoped permissions, vulnerability scanning, replication across sites, and Helm chart hosting. The operational overhead of managing 6-8 containers is justified by the feature set. Harbor is what you run when Docker Hub isn’t enough but you still want everything in one place.
Pick CNCF Distribution if you want the absolute simplest registry possible. It’s a single container, a config file, and a data directory. No database, no Redis, no UI, no scanning. Just docker push and docker pull. This is perfect for homelab users who need a private registry for personal projects, CI pipelines that build and consume images on the same machine, or embedded use cases where you ship a registry as part of a larger product.
Pick Zot if you want a middle ground — single-binary simplicity with modern security features built in. Zot’s integrated Trivy scanning, Cosign signature verification, and fine-grained access control give you enterprise-grade capabilities without Harbor’s operational complexity. The built-in web UI and sync extension (for mirroring upstream registries) make it a compelling choice for small-to-medium teams that care about supply chain security.
Practical Recommendations
For a homelab with 1-2 users: Start with CNCF Distribution. It takes 5 minutes to set up, uses negligible resources, and does exactly what you need. Add Zot later if you want scanning and a web UI.
For a small team (5-20 people): Zot hits the sweet spot. You get vulnerability scanning, role-based access, a web UI, and sync capabilities — all in a single container with no database to manage.
For a larger team or organization: Harbor is worth the operational investment. The project-based RBAC, replication, Helm support, and audit logging solve real problems that Zot and Distribution simply don’t address.
No matter which you choose, running your own container registry in 2026 means faster builds, zero rate limits, full data sovereignty, and no surprises on your monthly cloud bill. The setup is straightforward, the maintenance is minimal, and the benefits compound with every image you push.
Frequently Asked Questions (FAQ)
Which one should I choose in 2026?
The best choice depends on your specific requirements:
- For beginners: Start with the simplest option that covers your core use case
- For production: Choose the solution with the most active community and documentation
- For teams: Look for collaboration features and user management
- For privacy: Prefer fully open-source, self-hosted options with no telemetry
Refer to the comparison table above for detailed feature breakdowns.
Can I migrate between these tools?
Most tools support data import/export. Always:
- Backup your current data
- Test the migration on a staging environment
- Check official migration guides in the documentation
Are there free versions available?
All tools in this guide offer free, open-source editions. Some also provide paid plans with additional features, priority support, or managed hosting.
How do I get started?
- Review the comparison table to identify your requirements
- Visit the official documentation (links provided above)
- Start with a Docker Compose setup for easy testing
- Join the community forums for troubleshooting