jzbor
June 10, 2024, 6:46pm
22
This is my networking setup on Hetzner Cloud:
# Networking
networking.defaultGateway6 = { address = "fe80::1"; interface = "eth0"; };
networking.interfaces.eth0.ipv6.addresses = [ { address = "${cfg.ipv6}"; prefixLength = 64; } ];
cfg.ipv6 is the assigned IPv6 address (...::2, not ...::1)
EDIT: Actually it seems to be ...::2 for ARM servers and ...::1 for x86 servers
hexa
June 12, 2024, 7:12pm
23
You have the whole subnet, which is a /64, which means the last 64 bits are free for you to pick from. Everything in there will work.
I would recommend using the networkd configuration as described in the wiki:
https://wiki.nixos.org/wiki/Install_NixOS_on_Hetzner_Cloud#Network_configuration
jzbor
June 12, 2024, 8:04pm
24
Hm at least when I tried back then it did not work with ::1, but that may also be a configuration issue on my end
tcurdt
January 23, 2026, 1:58am
25
I am a little confused here. It says…
replace this subnet with the one assigned to your instance
…but the IPv4 and the IPv6/subnet are assigned dynamically.
This cannot really go into the configuration.
What am I missing?
hexa
January 24, 2026, 4:05pm
26
The addresses/subnets are printed very prominently in the server view as well on its networking tab in the cloud console. They are statically allocated, but can certainly be configured dynamically (DHCP, maybe even RA, I don’t know).
tcurdt
January 24, 2026, 5:01pm
27
Yeah, that’s a given - but that does not fly for any automation.
But I eventually figured it out. They configure the machines via cloud-init.
1 Like
dawg
February 26, 2026, 1:14pm
28
Check ip -6 neigh, most likely the firewall is blocking neighbor discovery .
The IPv6 block can be obtained via their metadata server .
curl -fsS http://169.254.169.254/hetzner/v1/metadata/network-config | sed -En 's|.*address: (2a01.*)|\1|p'
tcurdt
May 17, 2026, 3:51pm
29
This seems to be enough for me
services.cloud-init = {
enable = true;
network.enable = true;
settings = {
datasource_list = [
"Hetzner"
"None"
];
disable_root = false;
users = [ ];
};
};
from dd-install/dd-nixos/flake.nix at ef9b13051cfca6dc3ed784f0c4009803bf94633e · tcurdt/dd-install · GitHub