Skip to main content

Access GitHub & Docker Hub from IPv6-only VPS

VirtualLabs and some IPv6-only VPS instances can't directly reach services that are still IPv4-only, such as GitHub and Docker Hub. This tutorial provides practical solutions so you can still git clone, git push, docker pull, and docker login from a VPS that only has an IPv6 address.

The Problem

git clone https://github.com/user/repo.git
docker pull nginx:latest

You might get errors like:

fatal: unable to access 'https://github.com/...': Could not resolve host: github.com
Error response from daemon: ... dial tcp: lookup registry-1.docker.io: no such host

This happens because GitHub, Docker Hub, and many developer services still don't support direct IPv6 connections (as of June 2026).


Solution 1: GitHub via IPv6 Proxy

Route traffic to GitHub through an IPv6 proxy — a server that accepts IPv6 and forwards to GitHub over IPv4. Add mappings to /etc/hosts.

Choose a Proxy

Best for VPS on TransIP / SandboxVPS.

/etc/hosts
2a01:7c8:7c8::1337 github.com
2a01:7c8:7c8::1337 api.github.com
2a01:7c8:7c8::1337 codeload.github.com
2a01:7c8:7c8::1337 objects.githubusercontent.com
2a01:7c8:7c8::1337 raw.githubusercontent.com

Apply

sudo nano /etc/hosts
# Paste entries at the end → CTRL+X → Y → Enter
curl -I https://github.com 2>&1 | head -5
git clone https://github.com/Adekabang/docs-8labs.git
note
  • SSH: Proxy only works for HTTPS. Use HTTPS remotes or set up an SSH proxy jump for [email protected].
  • Rate limiting: Public proxies hit rate limits faster — use a PAT for authenticated requests.

Solution 2: Docker Hub via IPv6 Endpoint

Docker Hub provides a dedicated IPv6 beta endpoint: registry.ipv6.docker.com.

Login & Pull

docker login registry.ipv6.docker.com

# Official images (use "library/" prefix)
docker pull registry.ipv6.docker.com/library/ubuntu:latest
docker pull registry.ipv6.docker.com/library/nginx:latest

# User images
docker pull registry.ipv6.docker.com/storjlabs/watchtower:latest

Dockerfile

Dockerfile
FROM registry.ipv6.docker.com/library/node:20-alpine
WORKDIR /app
COPY . .
RUN npm install
CMD ["node", "index.js"]

Mirror (optional)

Set up a daemon mirror to avoid prefixing every pull:

/etc/docker/daemon.json
{
"registry-mirrors": ["https://registry.ipv6.docker.com"]
}
sudo systemctl restart docker

Now docker pull nginx:latest works without any prefix.


Solution 3: NAT64 + DNS64

A universal solution — DNS64 automatically translates IPv4 addresses to IPv6, letting your VPS reach the entire IPv4 internet.

Google DNS64

nameserver 2001:4860:4860::6464
nameserver 2001:4860:4860::64
sudo nano /etc/resolv.conf
# Replace nameserver entries with lines above
warning

NAT64 only works for outbound connections. You cannot expose services to the IPv4 internet this way.


Verification

# GitHub
curl -I https://github.com 2>&1 | head -3
git ls-remote https://github.com/Adekabang/docs-8labs.git

# Docker Hub
docker pull registry.ipv6.docker.com/library/hello-world:latest
docker run --rm hello-world

Troubleshooting

IssueSolution
git push fails via HTTPSUse a Personal Access Token (PAT), not password
SSH [email protected] still failsSwitch remote to HTTPS: git remote set-url origin https://github.com/user/repo.git
Docker pull keeps timing outPull directly: docker pull registry.ipv6.docker.com/library/<image>
curl succeeds but git failsCheck .gitconfig for conflicting proxy settings
Proxy slow / times outTry an alternate proxy or NAT64

References