CloudLinux.ro
Docker & containers

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 pricing

Related tutorials