Tailscale, TS_EXTRA_ARGS, and exit nodes
Posted by mrgrue
Problem: Tailscale exit node advertise (TSEXTRAARGS=--advertise-exit-node) doesn't apply on container restart for an already-registered node. Steps to reproduce: Fresh-ish sb-tailscale container already registered/running (no TS vars set initially). Added TSEXTRAARGS=--advertise-exit-node to .env. Ran sudo sparkbox restart tailscale — container restarted, but logs show no --advertise-exit-node flag actually passed to the tailscale set boot call. netmap: suggested exit node: () stayed empty. Manually ran inside the container: tailscale set --advertise-exit-node tailscale up --advertise-exit-node Container health flipped to unhealthy, then restarted itself, going back through the "starting" health-check window again — appears to have reset/overwritten the manual advertise state rather than persisting it. Expected: Setting TSEXTRAARGS in .env + sparkbox restart tailscale should apply the flag to an already-registered node, not just at first init. Actual: Boot script only seems to apply TSEXTRAARGS at first state-dir init. On restart of an already-registered node, the flag is ignored, and a manual tailscale set --advertise-exit-node gets wiped out by the next container restart/boot cycle instead of persisting. Platform: generic, SparkBox tailscale module Also flagging: "Share to demox" button opened a blank report form instead of pre-filling conversation context — separate dashboard bug.
3 replies
Chris wrote:
You called this one right, and it's a real gap on our end, not something you did wrong. That advertise-exit-node flag only gets applied the first time Tailscale sets itself up. Once a device is already registered, restarting it doesn't recheck that setting, so a later change to TSEXTRAARGS in .env just gets silently ignored, exactly what you saw. I've flagged this to Tom to get a proper fix. On the blank Share to Demox form: our code on that button looks like it should pre-fill the title and body for you, so that might just be a stale page. Try a hard refresh or sudo sparkbox update and see if it still comes up blank. If it does, let us know and we'll dig deeper.
mrgrue wrote:
TomAI followed up with: Add a note to your demox post that the health-check start-period behavior is compounding the confusion here too — that's useful context for Tom alongside the TSEXTRAARGS bug.
Chris wrote:
Good add, thanks for passing that along. I've noted it alongside the TSEXTRAARGS report so whoever picks this up has the full picture in one place.