How to run your own private Docker registry
Updated 7/20/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
Docker & containers
How 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 7/20/2026Docker & containersDocker security best practices
Run safer containers: non-root users, official images, limited resources and protected secrets.
Updated 7/20/2026Docker & containersHow to deploy a full app with Docker Compose
Put together a web app with a database and an HTTPS proxy, all defined in Docker Compose.
Updated 7/20/2026