From 9a84d7da2ea930a2a8d53cc383aa16ceeaa7a246 Mon Sep 17 00:00:00 2001 From: "Markus F.J. Busche" Date: Sun, 21 Sep 2025 15:01:10 +0200 Subject: [PATCH] docs: document systemd-based auto-disable of Tailscale Funnel on boot --- octoprint_tailscale_funnel/README.md | 37 ++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/octoprint_tailscale_funnel/README.md b/octoprint_tailscale_funnel/README.md index a811733..907d264 100644 --- a/octoprint_tailscale_funnel/README.md +++ b/octoprint_tailscale_funnel/README.md @@ -85,6 +85,43 @@ sudo tailscale funnel reset Enabling Funnel makes your OctoPrint instance accessible from the public internet. Only enable it when needed and disable it when finished. The plugin will show a confirmation dialog before enabling Funnel if the "Confirm Enable" option is checked. +### Disable Funnel automatically on system boot (systemd) + +If you prefer to make sure the Tailscale Funnel is always off after a system reboot (independent of the plugin), you can add a small systemd unit that disables Funnel shortly after boot: + +1) Create unit file: +```bash +sudo tee /etc/systemd/system/octoprint-tailscale-funnel-off.service >/dev/null <<'UNIT' +[Unit] +Description=Disable Tailscale Funnel after boot +After=network-online.target tailscaled.service +Wants=network-online.target + +[Service] +Type=oneshot +User=octoprint +ExecStart=/usr/bin/tailscale funnel reset +# Optional: also turn off possible serve mappings on common ports +ExecStart=/usr/bin/tailscale serve --http=80 off +ExecStart=/usr/bin/tailscale serve --https=80 off + +[Install] +WantedBy=multi-user.target +UNIT +``` + +2) Enable and test: +```bash +sudo systemctl daemon-reload +sudo systemctl enable --now octoprint-tailscale-funnel-off.service +sudo systemctl status octoprint-tailscale-funnel-off.service +``` + +Notes: +- Adjust `User=octoprint` if your OctoPrint runs under a different user (e.g. `pi`). +- If sudo is required for tailscale on your system, add the corresponding sudoers entry as described above. +- You can add a short delay by inserting `ExecStartPre=/bin/sleep 5` if Tailscale comes up late during boot. + ## API Endpoints The plugin exposes the following API endpoints: