Docker Hub mirror in Iran: pull without a VPN

If docker pull fails or stalls on your server in Iran, the simplest fix is to point Docker at the Novin Cloud mirror. One line in /etc/docker/daemon.json sends every regular pull through docker.novin.cloud, with no VPN and no login.
What is the Novin Cloud Docker mirror?
Novin Cloud (also known in Persian as Abrnovin) runs a public Docker registry mirror that anyone can use. It works without sign-up and serves Docker Hub images from inside the country. It has two addresses: the short domain docker.novin.cloud and the general mirror path mirror.novin.cloud/docker.
One note before you start: if you call /v2/ with curl, you get a 401. According to the Docker and OCI docs this is expected and part of Docker’s standard token flow. Docker fetches an anonymous token on its own. We tried that flow today, and the hello-world manifest came back fine with an anonymous token.
Setting up the Docker Hub mirror step by step
-
Try a direct pull. Without changing any settings, prefix the image name with the mirror:
docker pull docker.novin.cloud/library/nginx docker pull docker.novin.cloud/bitnami/postgresqlIf this works, your server can reach the mirror.
-
Make the mirror Docker’s default. Open
/etc/docker/daemon.json(create it if it doesn’t exist) and add this key:{ "registry-mirrors": ["https://docker.novin.cloud"] }If the file already has other keys, add
registry-mirrorsnext to them so the JSON stays valid. -
Restart the Docker service.
sudo systemctl restart dockerFrom now on,
docker pull nginxand other regular commands go through the mirror. -
Check the result.
docker pull docker.novin.cloud/library/hello-world docker image inspect hello-world --format '{{.RepoDigests}}' -
Point your CI at the mirror too. In GitLab Runner or any other CI, just write
image:with the mirror prefix:build: image: docker.novin.cloud/library/node:20 -
If you use containerd (on Kubernetes nodes, for example), add this section to
/etc/containerd/config.tomland restart the service:[plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"] endpoint = ["https://docker.novin.cloud"]sudo systemctl restart containerdMore details are in the containerd guide.
Registries other than Docker Hub
Images from ghcr.io, quay.io, registry.k8s.io and several other registries are mirrored too, each in its own repository. For GitHub Container Registry, for example, this pattern works:
docker pull mirror.novin.cloud/docker-ghcr/<owner>/<image>
The full list of repository names, plus how to install Docker Engine itself from the mirror, is in the Docker guide in the Novin Cloud docs. If you work on an Ubuntu server, also see setting up apt with the Ubuntu mirror so package installs come from inside the country as well.
Reverting the setup
Remove the registry-mirrors key from /etc/docker/daemon.json and restart Docker. Pulls you wrote directly as docker.novin.cloud/... have nothing to revert; just go back to docker.io/....
Frequently asked questions
Do I need to sign up to use the Docker mirror?
No. According to the docs, the registry is public and docker pull works without logging in.
Why does curl return 401 on /v2/?
That response is part of Docker’s token flow. The Docker client gets an anonymous token by itself and the pull continues, so there is nothing to worry about.
Does registry-mirrors also cover ghcr.io images?
This setting is for regular Docker Hub pulls. For ghcr.io and other registries, use their own repository path on mirror.novin.cloud, such as docker-ghcr.
Get started
If your server or CI still depends on a VPN to pull images, change daemon.json today. See the full service overview on the Novin Cloud Docker registry page and the rest of the mirrors on Novin Cloud mirrors.