Launch offer: -50% for your first 3 months with code LANCEMENT — new customers, VPS, first 50 orders, until 31 Dec 2026. See the VPS plans →
FranceHosta RootLab service
Please note: ordering, the customer area and our terms are currently available in French only.
Practical guide

Using GitHub from an IPv6-only VPS

On a server without IPv4, git clone https://github.com/… fails: github.com still has no IPv6 address. Here is why, and three ways around it, from the simplest to the cleanest.

Why git clone fails over IPv6

An IPv6-only VPS can only reach servers that publish an IPv6 address (a DNS AAAA record). But github.com, GitHub's API and its container registry ghcr.io do not publish one. The error message looks like this:

fatal: unable to access 'https://github.com/…': Could not resolve host: github.com

or, depending on the configuration, Network is unreachable. You can check for yourself:

getent ahostsv6 github.com    # no answer: no IPv6
getent ahostsv6 debian.org    # addresses in 2001:… : IPv6 OK

Not all of GitHub is affected: raw.githubusercontent.com, which serves raw files, is reachable over IPv6. But cloning, git pull and most downloads go through github.com.

Solution 1: a NAT64/DNS64 service (the simplest)

A NAT64/DNS64 service bridges your VPS and the sites that are still IPv4-only. Its DNS server (the DNS64) answers names that have no IPv6 with a special IPv6 address; its gateway (the NAT64) receives the traffic on that address and relays it over IPv4. As far as your VPS is concerned, it is as if GitHub had IPv6: there is nothing else to configure.

The free public service nat64.net provides three DNS64 servers:

2a00:1098:2b::1
2a00:1098:2c::1
2a01:4f9:c010:3f02::1

Check these addresses on nat64.net before using them: they may change. You then need to set them as your VPS's DNS servers. First, look at how your system handles DNS:

ls -l /etc/resolv.conf

If the file points to systemd-resolved

That is the case if the command shows /run/systemd/resolve/stub-resolv.conf. Create a settings file:

mkdir -p /etc/systemd/resolved.conf.d
cat > /etc/systemd/resolved.conf.d/nat64.conf <<'EOF'
[Resolve]
DNS=2a00:1098:2b::1 2a00:1098:2c::1 2a01:4f9:c010:3f02::1
Domains=~.
EOF
systemctl restart systemd-resolved

The Domains=~. line sends all queries through these servers, even if your network interface advertises others.

If it is an ordinary file

Replace its contents with:

nameserver 2a00:1098:2b::1
nameserver 2a00:1098:2c::1
nameserver 2a01:4f9:c010:3f02::1

Check that it works

getent ahostsv6 github.com
git clone https://github.com/git/git.git --depth 1

An address starting 2a00:1098:… or 2a01:4f9:… is shown for github.com, and cloning works. SSH connections to GitHub (git@github.com) normally take the same path.

Worth knowing: a public NAT64 service is run by a third party, free of charge and with no guarantee. It sees the connections going to the IPv4 sites you reach: since GitHub uses HTTPS or SSH, the content stays encrypted. For a critical service, do not rely on it alone, and read its terms of use.

Solution 2: push the code from your computer

If you are deploying your own project, the VPS does not necessarily need to talk to GitHub. Your computer can reach GitHub normally; it can then push the code to the VPS over IPv6. Create an empty repository on the server:

git init --bare /srv/myproject.git

then, on your computer, add the VPS as a second remote:

git remote add vps root@[2001:db8::10]:/srv/myproject.git
git push vps main

Replace 2001:db8::10 with your VPS's address. With a shortcut in ~/.ssh/config (see the IPv6 VPS guide), vps:/srv/monprojet.git is enough. To copy files as a one-off, rsync or scp will also do the job.

Solution 3: use a mirror reachable over IPv6

For individual files (an install script, a configuration file), raw.githubusercontent.com is reachable over IPv6. For whole repositories, you can host a mirror on a forge that has IPv6, for example a Forgejo or Gitea instance: this software can automatically sync a GitHub repository.

What about Docker, npm, pip?

The good news: most package repositories have IPv6. The Debian and Ubuntu repositories, npm (registry.npmjs.org), PyPI (pypi.org) and nodejs.org work directly. For Docker Hub, use its IPv6 endpoint registry.ipv6.docker.com. Images hosted on ghcr.io, however, need the NAT64 solution.

Frequently asked questions

Why does GitHub not work on my IPv6 VPS?

Because github.com has no IPv6 address: a server that only has IPv6 cannot reach it directly. A NAT64/DNS64 service bridges to IPv4.

Does NAT64 slow my connection down?

A little, since traffic to IPv4 sites takes a detour through the service's gateway. For cloning a repository or installing packages, the difference is rarely a nuisance. Sites that have IPv6 do not go through the gateway.

Does NAT64 change anything for sites that already have IPv6?

No. DNS64 only creates a special address for names that have no IPv6. The others, such as the Debian repositories, are reached directly.

Can I use Docker with ghcr.io?

ghcr.io has no IPv6 either: you need to go through a NAT64 service. For Docker Hub, the registry.ipv6.docker.com endpoint works directly over IPv6.

An IPv6 VPS for your projects

Root access, SSD, DDR3 ECC RAM, hosted in France, from €1.49 a month.