You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WireGuard is already supported out of the box via modules/presets/wireguard.nix (nix-bitcoin-wg-connect QR helper, plus lndconnect-wg / lnconnect-clnrest-wg / lndconnect-clightning-wg). Tailscale would be a second preset in the same style, which gives a VPN "suite" of WireGuard + Tailscale/Headscale.
1. modules/presets/tailscale.nix (new)
services.tailscale.enable = true, openFirewall = mkDefault true (UDP 41641, for direct connections instead of a relay).
Auth stays on the upstream options instead of being wrapped: services.tailscale.authKeyFile for unattended login, extraUpFlags = [ "--login-server=..." ] for Headscale, --ssh for Tailscale SSH (the "easy management" part).
REST exposure follows the same three conditions as the WireGuard preset (lnd lndconnect, clnrest lnconnect, clightning-rest lndconnect):
REST APIs bound to 0.0.0.0 with tor.enforce = false, same as WireGuard.
Ports opened only on the Tailscale interface via networking.firewall.interfaces.${services.tailscale.interfaceName}.allowedTCPPorts. This works with both the iptables and nftables backends, so the iptables-only assertion the WireGuard preset needs goes away. Spoofed sources on the LAN don't match an interface-pinned rule, and Tailscale ACLs take the place of restrictPeer.
Helpers lndconnect-ts, lnconnect-clnrest-ts, lndconnect-clightning-ts, which get the host at runtime from tailscale ip -4 and use --nocert.
Assertion: not compatible with netns-isolation, same as WireGuard.
Coexists with the WireGuard preset (both set the same 0.0.0.0 values).
2. Test: test/tailscale-lndconnect.nix (new)
Three VMs, fully offline: control (Headscale), server (node with the preset, joined via authKeyFile + --login-server), client (plain Tailscale peer).
Subtests: both nodes join and ping over 100.x; each helper as operator reaches lnd / clnrest / clightning-rest /v1/getinfo over the tailnet; REST ports are closed on the plain LAN address; accept rules are pinned to tailscale0; the same checks hold under the nftables backend.
Registered in test/tests.nix, buildable in test/run-tests.sh, and the CI matrix in .github/workflows/test.yml, plus a tailscale-lndconnect-online dev scenario.
3. Docs
docs/services.md: "Use Zeus via Tailscale (or Headscale)" section (import preset, auth key file, deploy, lndconnect-ts), Headscale and Tailscale SSH snippets, and a short WireGuard vs Tailscale comparison (no port forwarding, multi-device, third-party coordination server unless you self-host Headscale).
README.md: "via WireGuard, Tailscale or Tor".
No versioning.nix entry, since the change only adds things.
Open questions
Expose the Electrum server (electrs/fulcrum) over Tailscale for Sparrow as an opt-in option (nix-bitcoin.tailscale.exposeElectrumServer, default off), or keep parity with WireGuard for now?
Helper host: tailnet IP only, or also accept a MagicDNS name as an argument?
Just Tailscale/Headscale, or also a generic VPN docs page with room for others (Nebula, ZeroTier)? I'd lean toward skipping that until someone asks.
Activity
bobberb commentedon Oct 21, 2026
What's your vision here @prusnak - we already have tailscale pretty well supported on nixos you want something it's probably an easy lift
jaoleal commentedon Oct 21, 2026
+1 on @bobberb comment
bobberb commentedon Oct 21, 2026
CLAUDE COMMENT:
Plan: Tailscale preset
WireGuard is already supported out of the box via
modules/presets/wireguard.nix(nix-bitcoin-wg-connectQR helper, pluslndconnect-wg/lnconnect-clnrest-wg/lndconnect-clightning-wg). Tailscale would be a second preset in the same style, which gives a VPN "suite" of WireGuard + Tailscale/Headscale.1.
modules/presets/tailscale.nix(new)services.tailscale.enable = true,openFirewall = mkDefault true(UDP 41641, for direct connections instead of a relay).services.tailscale.authKeyFilefor unattended login,extraUpFlags = [ "--login-server=..." ]for Headscale,--sshfor Tailscale SSH (the "easy management" part).0.0.0.0withtor.enforce = false, same as WireGuard.networking.firewall.interfaces.${services.tailscale.interfaceName}.allowedTCPPorts. This works with both the iptables and nftables backends, so the iptables-only assertion the WireGuard preset needs goes away. Spoofed sources on the LAN don't match an interface-pinned rule, and Tailscale ACLs take the place ofrestrictPeer.lndconnect-ts,lnconnect-clnrest-ts,lndconnect-clightning-ts, which get the host at runtime fromtailscale ip -4and use--nocert.netns-isolation, same as WireGuard.0.0.0.0values).2. Test:
test/tailscale-lndconnect.nix(new)control(Headscale),server(node with the preset, joined viaauthKeyFile+--login-server),client(plain Tailscale peer).operatorreaches lnd / clnrest / clightning-rest/v1/getinfoover the tailnet; REST ports are closed on the plain LAN address; accept rules are pinned totailscale0; the same checks hold under the nftables backend.test/tests.nix,buildableintest/run-tests.sh, and the CI matrix in.github/workflows/test.yml, plus atailscale-lndconnect-onlinedev scenario.3. Docs
docs/services.md: "Use Zeus via Tailscale (or Headscale)" section (import preset, auth key file, deploy,lndconnect-ts), Headscale and Tailscale SSH snippets, and a short WireGuard vs Tailscale comparison (no port forwarding, multi-device, third-party coordination server unless you self-host Headscale).README.md: "via WireGuard, Tailscale or Tor".No
versioning.nixentry, since the change only adds things.Open questions
nix-bitcoin.tailscale.exposeElectrumServer, default off), or keep parity with WireGuard for now?