How to run your own private Docker registry
Updated 11/29/2026
A private registry stores your own Docker images on your server. Useful for internal images, fast deploys and privacy.
1. Start the registry
docker run -d -p 5000:5000 --name registry \
-v registry_data:/var/lib/registry registry:2
2. Push an image
docker tag my-app localhost:5000/my-app
docker push localhost:5000/my-app
3. Pull the image on another server
docker pull SERVER_IP:5000/my-app
4. Securing it, mandatory
A registry exposed without protection is a serious risk. Put it behind a reverse proxy with HTTPS and authentication:
- HTTPS through a proxy, see Nginx as a reverse proxy.
- Basic authentication at the proxy level.
- A firewall allowing the port only from your servers, see UFW.
Backup
The registry_data volume holds all your images. Back it up regularly, see container backups.
Put this guide into practice on your own VPS
EU cloud servers, billed hourly, ready in minutes, with one-click installs for dozens of apps.
See pricingRelated tutorials
How networking works in Docker
Understand how containers communicate with each other and how to isolate them on separate Docker networks.
Updated 11/29/2026Docker & containersHow to keep data in Docker with volumes
Containers are ephemeral: without volumes, you lose data when you delete the container. Here is how to keep it correctly.
Updated 11/29/2026Docker & containersHow to free up disk space used by Docker
Images, stopped containers and orphaned volumes can fill your disk. Here is how to clean them up safely.
Updated 11/29/2026