If you are creating a new Droplet, you do not have to do any manual configuration. Instead, just check the IPv6 box when you are creating a new Droplet.
If you are trying to enable IPv6 on an existing DigitalOcean Droplet, you should now shutdown the Droplet and create an image/backup.
WARNING: It’s very important that you have a complete backup of your server because if you mess up the network settings, you may never be able to log back in again.
sudo shutdown -h now
Now you can go the the Networking tab for your Droplet and enable Public IPv6 network
After a minute, you will be presented with your new IPv6 addresses
Turn on your Droplet again and log in to SSH.
nano to edit the file
sudo nano /etc/netplan/50-cloud-init.yaml
The config with no IPv6 settings will look similar to below:
network: version: 2 ethernets: eth0: addresses: - 18.104.22.168/20 - 10.18.0.6/16 gateway4: 22.214.171.124 match: macaddress: aa:9e:5c:98:97:e4 nameservers: addresses: - 126.96.36.199 - 188.8.131.52 search:  set-name: eth0
You will need to add your IPv6 address, IPv6 gateway and IPv6 nameservers to this configuration. These details should be in your Droplet’s networking tab.
- PUBLIC IPV6 ADDRESS:
- PUBLIC IPV6 GATEWAY:
We also need the Google Public DNS nameservers
- Google Public DNS nameserver 1
- Google Public DNS nameserver 2
With this information, add them to the config:
Warning reminder: Did you backup or make an image of your server? Because if the settings are wrong, you may get locked out permanently!
network: version: 2 ethernets: eth0: addresses: - 184.108.40.206/20 - 2a03:b0c0:2:d0::d76:c001/64 - 10.18.0.6/16 gateway4: 220.127.116.11 gateway6: 2a03:b0c0:2:d0::1 match: macaddress: aa:9e:5c:98:97:e4 nameservers: addresses: - 2001:4860:4860::8844 - 2001:4860:4860::8888 - 18.104.22.168 - 22.214.171.124 search:  set-name: eth0
Save file and exit. (Press
Y and then press
Now apply these settings using
sudo netplan apply
Now do a test IPv6 ping to Google’s Public DNS server
If IPv6 is working correctly, you should see some ping responses.
PING 2001:4860:4860::8888(2001:4860:4860::8888) 56 data bytes 64 bytes from 2001:4860:4860::8888: icmp_seq=1 ttl=61 time=0.897 ms 64 bytes from 2001:4860:4860::8888: icmp_seq=2 ttl=61 time=0.562 ms 64 bytes from 2001:4860:4860::8888: icmp_seq=3 ttl=61 time=0.607 ms 64 bytes from 2001:4860:4860::8888: icmp_seq=4 ttl=61 time=0.613 ms 64 bytes from 2001:4860:4860::8888: icmp_seq=5 ttl=61 time=0.541 ms
If you have access to another machine, try pinging your server’s IPv6 address. Just keep in mind that if your client or ISP does not yet support IPv6, the ping will fail.
p.s. I increased my AdSense revenue by 68% using AI 🤖. Read my Ezoic review to find out how.