DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
VGSources
Blog

How to Set Up a Private Docker Registry on a VPS

Deploy a private Docker registry on your VPS with persistent storage, DNS, HTTPS, authentication, client verification and a safe image-retention workflow.
Length10 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 container on your VPS, store /var/lib/registry on persistent disk, point a DNS name to the server, publish it through trusted HTTPS, and enable authentication before allowing external clients. The documented registry:3 container starts a registry, but the unauthenticated HTTP example is a bootstrap test only—not a production deployment.

What you are building

A private Docker registry is an image service you operate yourself. The registry software runs inside a container; the VPS contributes the CPU, memory, network address and durable storage. Docker clients push image manifests and layers to the registry and later pull them by hostname and repository tag.

As an Amazon Associate I earn from qualifying purchases.

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

A production path has five distinct pieces:

  • Registry process: CNCF Distribution, launched from the registry:3 image.
  • Persistent storage: a host directory or supported object-storage backend containing image layers and manifests.
  • DNS: a dedicated hostname resolving to the VPS.
  • TLS: a certificate trusted by every Docker client that connects from outside the VPS.
  • Authentication and authorization: credentials and repository-scoped permissions that are tested from an actual Docker client.

Do not treat a successful container start as proof that the service is ready. Until TLS and access control are in place, anyone who can reach the listening port may be able to inspect or modify the registry.

Plan the VPS, hostname and network first

Choose a persistent disk layout

Reserve storage for image layers, manifests, logs and backups. The default local POSIX filesystem is straightforward for development and small deployments. Mount a host path into the container and make that path part of your backup plan; deleting the container must not delete the registry data.

#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.

For a larger or more distributed design, Distribution documents object-storage backends including Amazon S3-compatible storage, Microsoft Azure and Google Cloud Storage. Object storage separates image data from the VPS, which can simplify capacity growth and server replacement, but introduces provider configuration, credentials, network latency and another failure domain.

Create the registry DNS name

Use a hostname dedicated to the registry, such as registry.example.net, and create an A or AAAA record pointing to the VPS address. Use that same hostname in image tags, certificates, client login commands and the registry’s allowed-host settings. A certificate for a different name will fail Docker’s TLS verification even when the registry itself is healthy.

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

Open only the required paths

External clients should reach the HTTPS endpoint on port 443. The registry process normally listens on port 5000 inside the VPS. A reverse proxy can accept 443 and forward traffic to that internal port, or the registry can terminate TLS itself. Keep port 5000 private when a proxy is your public entry point, and restrict administrative access such as SSH separately.

Confirm that DNS, VPS routing and firewall rules allow the intended client networks to reach 443 before troubleshooting Docker authentication. A blocked port and a bad certificate can produce similarly unhelpful client errors.

Install Docker and start a persistent registry

Verify the host prerequisites

  • Docker Engine is installed and can run containers as the account you will use for administration.
  • A registry hostname resolves to the VPS.
  • A host directory or object-storage account is ready for image data.
  • Firewall rules permit the intended HTTPS clients.
  • You have a backup destination and a process for restoring the registry data.

Run the documented bootstrap image

The minimal Distribution deployment command is:

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

This confirms that Docker can pull and launch the image, but it stores data in the container’s writable layer and exposes plain HTTP. Replace it with a persistent-volume deployment before pushing anything you need to keep:

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
sudo mkdir -p /srv/registry
docker run -d 
  --name registry 
  --restart=always 
  -p 5000:5000 
  -v /srv/registry:/var/lib/registry 
  registry:3

The mounted directory is the important change. If you later recreate the container with a newer image, mount the same path so manifests and blobs remain available. Set an explicit filesystem root in the registry configuration when you use a non-default host path, and include that root in backups.

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

Check the container before publishing it

  1. Run docker ps and confirm the container is up with the restart policy shown.
  2. Inspect docker logs registry for configuration or permission errors.
  3. Confirm the host directory is writable by the registry process and that new files appear after a test push.
  4. Do not advertise the plain HTTP endpoint to external users; proceed to TLS and authentication first.

Choose local storage or object storage

Both approaches can hold the same registry content. The decision is primarily about durability, growth and operations rather than Docker client behavior.

Storage design Strengths Trade-offs Best fit
Local POSIX filesystem Simple mount, low operational complexity, easy to understand on one VPS Capacity is tied to the VPS; backups and server replacement are your responsibility Development and small, single-server registries
Object storage Image data is separated from the VPS; capacity can grow independently Requires backend credentials and configuration; network latency and provider availability affect pushes and pulls Deployments that need independent storage or easier host replacement

Whichever backend you select, test a restore rather than assuming that a completed backup is usable. A registry backup must include the blobs and manifests that make tags resolvable, along with the configuration and credentials needed to mount the backend.

Secure the registry with HTTPS

Use a publicly trusted certificate for external clients

External access requires TLS. Use a CA-issued certificate and its private key, or the documented Let’s Encrypt integration. The certificate’s name must match the registry hostname that appears in every image reference.

When using Let’s Encrypt, the outward-facing address must be reachable on port 443. Constrain the allowed-host list to the registry hostname instead of accepting arbitrary host headers. Renew the certificate before it expires and verify that the renewal process reloads the proxy or registry that serves it.

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.
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)

Decide where TLS terminates

Termination point Advantages Operational concerns
Inside Distribution Fewer moving parts; the registry owns certificate handling and HTTPS You must manage certificate files, renewal and listener settings in the registry deployment
Separate reverse proxy Centralized certificate automation, access logging and integration with other host-level controls The proxy-to-registry path and port 5000 must be protected; proxy failures can hide a healthy registry

The Distribution configuration reference permits TLS in the registry and also supports a separate web server proxying TLS to it. Do not expose an unencrypted registry endpoint as a fallback: Docker credentials and image contents should travel only over the protected path.

Validate trust from a client machine

  1. Resolve the hostname from the client and confirm it reaches the intended VPS.
  2. Connect to https://registry.example.net with a browser or TLS diagnostic and inspect the certificate name and chain.
  3. Check that the certificate presented on port 443 is the renewed certificate, not an old file still loaded by a process.
  4. Only after the certificate validates should you test Docker login and image pushes.

Self-signed or otherwise unverified certificates are suitable for isolated testing when every client is explicitly configured to trust them. The official deployment guidance treats insecure and unverified modes as testing-only, not as a production security model.

Add authentication and repository authorization

Distribution natively supports TLS and basic authentication. Docker’s Registry API uses a challenge followed by a repository-scoped bearer-token flow, so a client may first receive a challenge and then request a token for the repository action it is attempting. A container that starts successfully does not prove that this flow, the credentials or the repository permissions are correct.

Define the access model

  • Decide which users or automation identities may push.
  • Separate read-only pull access from write access where your workflow requires it.
  • Limit permissions by repository rather than granting every credential unrestricted access.
  • Store credential material outside the image data directory and restrict filesystem permissions.
  • Plan credential rotation and immediate revocation for a lost or compromised client.

Configure the registry and proxy consistently

Authentication settings belong in the registry configuration when Distribution handles the challenge, or in the access-control layer you deliberately place in front of it. Ensure the externally visible hostname, HTTPS scheme and token service details agree; mismatches often appear as repeated login prompts or unauthorized responses after a successful TLS handshake.

Restart or reload the component that owns the changed configuration, then inspect logs while performing a login. Keep the authentication endpoint and registry endpoint on names and certificates that clients can validate.

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

Verify push and pull end to end

Use a separate Docker client, not only commands run on the VPS. This single workflow exercises DNS, TLS trust, authentication, storage writes and client compatibility.

  1. Pull a known image locally. Choose an image your client is already allowed to access.
  2. Retag it with your registry hostname. The reference must include the registry host and repository, for example registry.example.net/team/demo:check.
  3. Authenticate. Run docker login registry.example.net and provide the account intended for this repository.
  4. Push the tag. Run docker push registry.example.net/team/demo:check. Watch the registry logs and confirm that layer uploads complete.
  5. Remove local copies. Delete the local tag and image so a later pull cannot succeed from the client cache.
  6. Pull again. Run docker pull registry.example.net/team/demo:check and verify that the image starts normally.

A failed step narrows the problem: DNS or connection errors point to routing and firewall rules; certificate errors point to hostname, chain or trust; unauthorized responses point to credentials, token exchange or repository scope; and upload failures after authentication point to storage permissions, capacity or backend connectivity.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Operate tags, deletion and garbage collection safely

Understand what deletion removes

Tags point to manifests, and manifests reference shared blobs. Deleting a tag or manifest does not necessarily reclaim disk space immediately because a blob may still be referenced by another manifest. Garbage collection removes blobs that are no longer referenced.

Deletion is disabled by default in the Distribution configuration reference. Keep it disabled unless you have a deliberate retention process and understand which API actions your clients and automation will perform.

Use a controlled cleanup window

  1. Identify tags and manifests that are no longer needed. Confirm that active deployments, rollback plans and CI jobs do not reference them.
  2. Enable deletion only through a reviewed configuration change and protect that change with the same administrative controls as the registry.
  3. Stop writes, or run the registry in read-only mode, before collecting garbage. New pushes during collection can race with reachability analysis.
  4. Run garbage collection in dry-run mode first and review which blobs would be removed.
  5. Run the real collection only after the dry run matches the approved retention list.
  6. Restore normal write operation and perform a pull of an image that must remain available.

The garbage-collection command supports --delete-untagged to remove untagged manifests. Treat that option as irreversible for anything not retained elsewhere; an untagged manifest can still be needed by a digest-pinned deployment.

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.

Backups, upgrades and recovery

Back up the data that makes images usable

For local storage, back up the configured filesystem root, not merely the container definition. For object storage, protect the backend data and the registry configuration that describes it. Keep authentication files, TLS private keys and renewal material in a separate protected backup set with access limited to administrators.

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

Document the registry hostname, storage location, configuration version and the exact container image tag used for each deployment. A recovery plan should recreate the container, attach the same data, restore certificates and credentials, and then verify a digest-pinned pull from a clean client.

Upgrade deliberately

Use an explicit registry image tag and test upgrades against a copy or maintenance window. Before replacing the container, confirm that backups are current and that no garbage-collection job is running. Recreate the container with the same persistent volume and configuration, then repeat the external push and pull test.

Troubleshoot by symptom

“Connection refused” or timeout

  • Check that the container is running and listening on the expected internal port.
  • Check VPS firewall and provider-level network rules for port 443.
  • If using a proxy, verify that it forwards to port 5000 and that the registry is reachable locally.
  • Confirm DNS resolves to the current VPS address, including IPv6 if an AAAA record exists.

TLS or certificate verification failure

  • Use the exact hostname in the image tag and certificate.
  • Check certificate expiration, intermediate-chain delivery and renewal reloads.
  • Remove accidental plain-HTTP endpoints from client configuration.
  • For isolated testing only, explicitly trust a self-signed certificate on every client; do not carry that exception into production.

Authentication succeeds but push is unauthorized

  • Inspect the challenge and token exchange in registry and proxy logs.
  • Confirm the account has push permission for the specific repository path, not only general login permission.
  • Check that the token service and external hostname match the HTTPS endpoint the client used.

Push fails while pulling works

  • Check repository write authorization and available storage.
  • Verify the mounted filesystem is writable by the registry process.
  • For object storage, verify backend credentials and write permissions, not just read access.
  • Review proxy request-size, timeout and body-forwarding settings if a proxy sits in front of Distribution.

Images disappear after recreating the container

The container was likely started without a persistent volume, or it was recreated with a different storage root. Reattach the original host path or object-storage configuration and restore from backup if the original data was removed.

Production readiness checklist

  • Registry hostname resolves correctly from every intended client network.
  • Port 443 is reachable; port 5000 is private when a reverse proxy terminates TLS.
  • Trusted CA-issued TLS is active, renews automatically and is loaded after renewal.
  • Authentication and repository scopes have been tested with a real Docker client.
  • Image data lives on persistent storage and is included in tested backups.
  • Push, local deletion and clean-client pull all succeed.
  • Deletion remains disabled unless a reviewed retention process requires it.
  • Garbage collection uses read-only operation or stopped writes and a reviewed dry run.
  • Logs, certificate files, credentials and storage permissions are monitored and restricted.
  • A documented restore test can rebuild the service on the same or a replacement VPS.

What a safe final workflow looks like

Provision the VPS and durable storage, create the DNS record, launch Distribution with a persistent root, and keep the initial listener private. Put trusted HTTPS on the registry hostname, constrain allowed hosts, configure authentication and repository permissions, then validate from a separate Docker client by pushing and pulling a test tag. Operate retention conservatively: deletion is an explicit setting, and garbage collection follows a read-only window plus dry run. This sequence keeps the registry useful after restarts while preventing credentials, image traffic and cleanup jobs from becoming avoidable production risks.

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
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

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.