DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
VGSources
Blog

How to Self-Host a Private Docker Registry on a VPS

Deploy a private Docker registry on your own VPS: configure DNS and firewalls, secure Distribution with HTTPS and authentication, persist image layers, and operate the service safely.
Length11 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Run the CNCF Distribution registry as a registry:3 container on your VPS, give it a DNS name, protect the endpoint with a certificate trusted by your clients, and add authentication before exposing it to the internet. Store the registry data on durable VPS storage or an object-storage backend, then tag, push, and pull images using the registry hostname.

What a private registry on a VPS actually does

A Docker registry is an HTTP service that stores image manifests and layer blobs and serves them back to clients. In a small self-hosted deployment, the registry is an instance of the CNCF Distribution software, normally started from the official registry:3 image. Your VPS supplies the network address, firewall, compute, and persistent storage; Distribution supplies the registry API.

As an Amazon Associate I earn from qualifying purchases.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A typical request path looks like this:

Developer or CI client
        |
        | HTTPS on registry.example.com:443
        v
TLS endpoint (Distribution itself or a reverse proxy)
        |
        v
registry:3 container
        |
        v
Persistent filesystem or object-storage backend

Clients address repositories by hostname, such as registry.example.com/team/api. The hostname is part of the image reference, so changing it later means retagging images and updating automation. Decide on a stable name before you distribute pull instructions.

Requirements and decisions before installation

Requirement What you need Why it matters
VPS A Linux host able to run Docker Engine, with enough disk, CPU, memory, and network capacity for your repository count, layer sizes, concurrent pushes and pulls, and backup window. No authoritative source establishes a universal CPU, RAM, bandwidth, or image-capacity number. Measure your workload instead of choosing a supposed minimum.
DNS A record such as registry.example.com pointing to the VPS address. Docker clients and certificate authorities must resolve the same public name.
Routing and firewall Inbound TCP 443 for registry clients and a restricted administration path, normally SSH. Allow port 80 only when your certificate process requires HTTP validation. The registry must be reachable externally while unrelated services remain closed.
TLS certificate A certificate issued by a trusted certificate authority for the exact registry hostname. Docker clients reject an untrusted HTTPS endpoint unless you deliberately install trust material or configure an insecure test registry.
Persistent storage A durable VPS volume mounted into the container, or S3-, Microsoft Azure-, or Google Cloud Storage-compatible backend. Container recreation must not delete image data.
Access policy At least one authenticated account for a private registry; repository-scoped bearer-token authorization for larger teams or multiple repositories. Authentication without an authorization design often gives every user more access than intended.

Keep the registry on a host and network segment you can patch and monitor. Distribution documentation describes the default local POSIX filesystem driver as suitable for development or small deployments; object storage becomes attractive when you need independent storage durability or multiple registry instances.

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses
  • BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
  • EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
  • COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
  • LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
  • WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.

Run a local smoke test first

Before configuring DNS, certificates, or credentials, verify that Docker can start the image:

docker run -d -p 5000:5000 --restart=always --name registry registry:3

This publishes the registry’s HTTP port on the VPS’s port 5000. It is a test configuration, not an internet-facing production setup: it has no TLS, no access control, and no durable volume. Use it on an isolated host or remove it after confirming that the container starts:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
docker ps
 docker logs registry

The official image’s local workflow uses localhost:5000 for testing. A client can tag and push a test image with that hostname, then pull it back to verify the registry API and local storage.

Production deployment: an ordered setup

1. Point DNS at the VPS

  1. Create an A or AAAA record for your chosen registry hostname.
  2. Wait until the name resolves from the networks where clients and certificate validation will run.
  3. Confirm that no other service is claiming the same public address and port.

Use the hostname in every later certificate, login command, image tag, and CI secret. Accessing the service by its IP address will produce a certificate-name mismatch when the certificate covers only the DNS name.

2. Set the firewall before opening the service

Allow inbound HTTPS (TCP 443) and your restricted administration port. Keep the registry’s internal listening port, commonly 5000, private when a reverse proxy handles public traffic. If Distribution itself binds to 443, do not also bind another process there. Restrict SSH to trusted source addresses where your VPS firewall supports it.

3. Create a durable data location

Choose a host directory or mounted volume that survives container replacement. Distribution’s filesystem driver stores content below the configured root directory. The environment variable form is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Windex Gaming Cleaning Wipes, Pre-Moistened Wipes to Instantly Clean all Gaming Gear and Electronics, Resealable Packaging for a Freshness Lock, 25 count (Pack of 1)
  • WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
  • AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
  • PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
  • ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
  • COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/var/lib/registry

The equivalent YAML setting is:

storage:
  filesystem:
    rootdirectory: /var/lib/registry

Mount the host’s durable directory at /var/lib/registry in the container. Check free space and inode availability, not only the nominal volume size: many small layers can consume substantial inode counts. Keep configuration files, TLS keys, and credential files outside the image so upgrades do not overwrite them.

4. Obtain and renew a trusted certificate

Use a certificate authority trusted by the Docker clients. Distribution documentation supports automated certificates through Let’s Encrypt, or you can obtain and renew a certificate with a separate ACME client. Renewal must replace the certificate files before expiry and reload or restart the endpoint that terminates TLS.

Plain HTTP and untrusted self-signed certificates are appropriate only for isolated testing. CNCF Distribution’s guidance is explicit: “A production-ready registry must be protected by TLS and should ideally use an access-control mechanism.”

5. Choose where TLS terminates

Option A: terminate TLS in Distribution

Mount the certificate directory into the container and set REGISTRY_HTTP_TLS_CERTIFICATE and REGISTRY_HTTP_TLS_KEY to the container paths. A direct HTTPS launch can look like this after you have created the host directories and copied the certificate and key:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
docker run -d 
  --name registry 
  --restart=always 
  -p 443:5000 
  -v /srv/registry/data:/var/lib/registry 
  -v /srv/registry/certs:/certs:ro 
  -e REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/var/lib/registry 
  -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/fullchain.pem 
  -e REGISTRY_HTTP_TLS_KEY=/certs/privkey.pem 
  registry:3

Here the container still listens on its internal port 5000 while the VPS publishes HTTPS on 443. Protect the private key with restrictive host permissions and ensure the Docker daemon can read the mounted file.

Option B: terminate TLS at a reverse proxy

If the VPS already runs a web server, Distribution’s configuration reference allows TLS to be configured there instead of inside the registry. The proxy listens on 443, presents the certificate, and forwards requests to the registry’s private HTTP listener on port 5000. Bind that listener to localhost or a private interface and firewall it from the public internet.

Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men
  • Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
  • Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
  • Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
  • ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
  • Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)

A reverse proxy is useful when one host serves several HTTPS applications, because certificate renewal, HTTP-to-HTTPS redirects, request logging, and port 443 ownership stay in one place. It adds another component to patch and troubleshoot. Whichever component terminates TLS must preserve the registry’s HTTP methods, headers, request bodies, and long-running layer uploads; overly restrictive proxy limits commonly break large pushes.

Authentication and authorization

Basic authentication for a small team

Distribution natively supports HTTP basic authentication with an htpasswd file. Create the file on the host, mount it read-only, and configure the registry to use the htpasswd authentication scheme and the file path. Use a bcrypt-generated entry where your tooling supports it, and give each person a separate account so you can revoke one credential without changing everyone else’s password.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Basic authentication is acceptable for a small, single-team registry only when TLS is enabled. Distribution’s insecure-registry documentation states: “It’s not possible to use an insecure registry with basic authentication.” Credentials sent over plain HTTP can be intercepted, and Docker will not treat that arrangement as a safe private registry.

After enabling authentication, test both an authenticated push and an unauthenticated request. An unauthenticated client should receive a 401 response rather than a successful catalog or pull.

Bearer-token authorization for multiple repositories

Docker’s documented registry protocol is challenge-based:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. The client attempts an operation such as a pull or push.
  2. The registry returns 401 Unauthorized with a WWW-Authenticate challenge.
  3. The client asks an authorization service for a bearer token, presenting the challenge details and its credentials.
  4. The client retries the original operation with that token.

A token service can issue repository-scoped permissions, for example read-only access to team/frontend and push access to team/backend. This is safer than sharing one password across all repositories and is the better design for CI systems, contractors, or several independent teams. The registry and token service must agree on issuer, service name, signing keys, and scopes; a mismatch appears to clients as repeated unauthorized responses even when the username and password are correct.

Rank #4
Ledagic IC+RGBW USB Powered Led Light Bar with App & Remote Control, 2 Pack
  • Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
  • Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
  • 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
  • Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
  • USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC

Where pushed images are stored

Local filesystem backend

With the filesystem driver, Distribution writes manifests, configuration metadata, and content-addressed layer blobs below the root directory you configured. They are on the VPS volume, not inside the temporary writable layer of the container. Deleting and recreating the container is safe when the host directory remains mounted; deleting that directory destroys the registry’s data.

This backend is simple and has no separate service bill, but the VPS volume becomes a single durability domain. Disk failure, accidental deletion, or a full filesystem can make every repository unavailable.

Object-storage backends

Distribution also supports S3, Microsoft Azure, and Google Cloud Storage drivers. Object storage separates image durability from the lifecycle of the VPS and can let you replace the compute host without copying every layer first. It introduces credentials, endpoint configuration, access-policy management, and a storage bill. Keep object-storage credentials in a secret mechanism or protected environment file rather than in a public repository.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Backend Best fit Trade-off
VPS filesystem One small registry, low operational complexity, predictable local latency. Storage and compute fail together; you must manage volume backups and capacity.
S3-compatible storage Independent durability, portability, or several registry instances. Requires bucket credentials, network access, lifecycle policy, and ongoing storage/egress accounting.
Microsoft Azure or Google Cloud Storage Organizations already standardized on that provider’s identity and backup controls. Provider-specific configuration and permissions add setup work.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Backups, retention, and garbage collection

Back up image data and the material needed to operate the registry: configuration, TLS renewal state, authentication files or token-service keys, and any object-storage policy definitions. A backup that contains blobs but not the credentials or configuration may be impossible to restore quickly.

Define retention before the disk fills. Decide how long to keep old tags, whether CI-generated tags expire, and who approves deletion. Distribution’s storage settings do not provide a universal retention schedule; your policy must reflect release, rollback, and compliance needs.

When unreferenced layers accumulate, plan a maintenance window for Distribution’s garbage-collection operation. Follow the version-specific procedure for your deployment, stop or quiesce pushes as required, take a backup first, and verify that no still-needed manifest references the layers selected for deletion. Monitor both filesystem usage and object-storage growth after the cleanup.

Best Value
Sale
HUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs
  • Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
  • Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
  • Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
  • Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
  • Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.

Push and pull from a Docker client

Once DNS, TLS, and authentication work, tag an existing image with the registry hostname. The official deployment example uses these commands:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
docker pull ubuntu:16.04
docker tag ubuntu:16.04 myregistry.domain.com/my-ubuntu
docker push myregistry.domain.com/my-ubuntu
docker pull myregistry.domain.com/my-ubuntu

For a private registry, authenticate before the push:

docker login myregistry.domain.com

Use the same hostname that appears in the certificate. Do not add a path such as /v2 to the image name; Docker adds the registry API paths itself. In CI, store the login credential in the platform’s secret store and prefer short-lived, least-privilege tokens when your authorization service supports them.

A successful push uploads any missing layers, then publishes a manifest under the repository name and tag. Subsequent pushes reuse layers already present, while a new tag can point to an existing manifest without duplicating its blobs.

Testing the finished endpoint

  • Resolve the DNS name from an external network and confirm it reaches the intended VPS.
  • Open an HTTPS connection and verify the certificate subject or SAN contains the exact hostname.
  • Run docker login with a valid account and confirm that an invalid password is rejected.
  • Push a small test image, remove the local copy, and pull it again from the registry.
  • Test a user or token that should have read-only access and confirm that a push is denied.
  • Restart the registry container and verify that the previously pushed image is still available.
  • Check that backups include the data directory or object-storage contents and the authentication/TLS configuration.

Troubleshooting common failures

Symptom Likely cause Fix
DNS resolves, but the connection times out. VPS firewall, cloud firewall, or routing blocks TCP 443. Allow 443 on every firewall layer and confirm the service is listening on the expected interface.
Certificate is not trusted or the name is wrong. The certificate is self-signed, expired, missing an intermediate, or issued for a different hostname. Install a complete CA-issued chain for the registry DNS name and renew it before expiry.
502 Bad Gateway from a reverse proxy. The proxy cannot reach the registry’s internal port, or the container is stopped. Inspect container logs, verify the private listener address and port, and test connectivity from the proxy host.
Every operation returns 401. Credentials are wrong, the auth file is not mounted, or a bearer-token issuer/scope setting is inconsistent. Inspect the challenge header and registry/auth-service logs; verify the mounted path and repository scope.
Push fails partway through a large layer. Proxy request-size, timeout, buffering, or body-handling limits interrupt the upload. Raise appropriate proxy limits, preserve streaming request bodies, and check for disk exhaustion.
Images disappear after a container replacement. The registry data path was not mounted to durable storage. Mount a persistent host volume or configure an object-storage driver, then restore from backup if necessary.
Pulls or pushes fail with “no space left on device.” The VPS filesystem or inode pool is full. Remove data only through an approved retention and garbage-collection process, then expand storage or migrate the backend.
Docker refuses an HTTP endpoint. The registry is exposed without TLS and the client has not been deliberately configured for an insecure test registry. Put the endpoint behind trusted HTTPS; reserve insecure mode for an isolated lab.

Security and maintenance checklist

  • Use a certificate issued by a trusted authority for internet-facing access.
  • Expose only required ports; keep the registry’s internal port private when a proxy terminates TLS.
  • Enable authentication and grant repository-level permissions rather than a shared, unrestricted password.
  • Protect private keys, htpasswd files, token signing keys, and object-storage credentials with restrictive permissions.
  • Persist image data and test restoration, not merely backup creation.
  • Monitor disk, inode, object-storage, certificate-expiry, container-health, and failed-authentication signals.
  • Document retention and garbage-collection approvals before storage pressure becomes an outage.
  • Keep Distribution, Docker Engine, the VPS operating system, and any reverse-proxy packages patched.
  • Review who can administer the VPS separately from who can push to repositories.

Choosing the simplest architecture that will last

Decision Simpler choice When to choose the more elaborate choice
TLS termination Distribution directly on 443. Use a reverse proxy when the host already serves several HTTPS applications or centralizes certificate management.
Authentication Basic authentication with individual htpasswd accounts. Use a bearer-token authorization service for repository-scoped permissions, many users, or automated workloads.
Storage Durable local VPS filesystem. Use S3, Microsoft Azure, or Google Cloud Storage when storage must outlive the VPS or be shared by multiple registry instances.
Host layout One VPS running the registry and its firewall. Separate proxy, registry, and storage when isolation, independent scaling, or organizational controls justify the extra operations.

There is no published universal capacity figure for this software. Size the VPS from the total compressed layer volume, expected simultaneous uploads and downloads, backup throughput, and the amount of headroom you need for releases and garbage collection. Start with the architecture you can patch and restore reliably; add a proxy, token service, or object storage when a concrete operational requirement appears.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.