Currently it isn't clear how to set an exit node from a config file. The easiest means of achieving this is the following:
-
Make sure the "Locked" in the config is set to false
-
After starting the container, exec the
tailscale set --advertise-exit-node
command
Effiectively the steps are:
-
Find out the ID number of the node that should be an exit node
-
Enable routes on that node
One example of how a single pihole node showed up in headscale for me:
/ # headscale routes list
ID | Node | Prefix | Advertised | Enabled | Primary
1 | pihole | ::/0 | true | false | -
2 | pihole | 0.0.0.0/0 | true | false | -
/ # headscale routes enable -r 1
/ # headscale routes enable -r 2
/ # headscale routes list
ID | Node | Prefix | Advertised | Enabled | Primary
1 | pihole | ::/0 | true | true | -
2 | pihole | 0.0.0.0/0 | true | true | -