Tailscale Run Unattended on Windows: Stay Online After Sign-Out

Advertisement
Network
Advertisement

You set up Tailscale so you can reach your home PC from anywhere, and it works, until Windows Update restarts the machine overnight or you sign out of a Remote Desktop session. Then the PC drops off your tailnet and stays gone.

The culprit is a default setting. Tailscale on Windows only stays connected while a user is signed in. To keep the PC reachable after sign-outs and restarts, turn on the Run unattended setting. A single PowerShell line shows whether it's on. I tried it on my own home PC, and it was off.

Table showing that with Run unattended off the PC disconnects after sign-out and restart, while with it on the PC stays connected
Off vs. on, based on Tailscale's documentation

What is Tailscale's Run unattended?

Run unattended is a Windows-only Tailscale setting that keeps the device on your tailnet even when nobody is signed in to Windows. Tailscale's docs also call it "server mode."

Tailscale on Windows has two parts: a background service named "Tailscale" and the tray app. The service starts at boot, but by default the connection profile (which account the PC uses to join the tailnet) belongs to the signed-in user. When that user signs out, or the PC restarts and nobody has signed in yet, the device leaves the tailnet. With Run unattended on, Tailscale keeps running with that user's profile whether anyone is signed in or not.

You won't find this toggle on other platforms. Linux doesn't need it, since Tailscale there already runs as the system service tailscaled, which keeps going whether anyone has signed in. On macOS, Tailscale runs inside the user's login session. Tailscale says a standalone system daemon isn't supported there yet.

When should you turn it on?

How you use the PC Run unattended Why
Home PC you reach over RDP/SSH Turn it on You can still get in after an overnight update restart. Same after closing RDP with "Sign out"
Home PC acting as a subnet router or exit node Turn it on If the PC restarts, your way into the home network disappears with it
Laptop you connect from Not needed You're signed in whenever you use it
PC shared with family Think first Only the user who turned it on can change Tailscale's settings

How it differs from key expiry and sleep

Run unattended only helps after sign-outs and restarts. If you want the home PC reachable at any time, check the key expiry and sleep settings too.

  • Run unattended: stops the PC from dropping off after a sign-out or restart. Set it in Tailscale on the home PC (tray menu, CLI)
  • Disable key expiry: stops the PC from suddenly dropping off when its key expires (180 days by default). Set it on the Machines page of the Tailscale admin console
  • Keep the PC awake: stops the PC from falling asleep and no longer answering. Set it in Windows power settings

Tailscale's docs also say to disable key expiry on unattended devices.

I checked my own PC: it was off

When I set up Remote Desktop to my home PC over Tailscale, I disabled key expiry and set the PC to never sleep. I assumed that was enough. When I looked at its Tailscale settings (version 1.104.7) for this post, Run unattended was still off.

The Tailscale service itself was set to start automatically and ran as LocalSystem from boot. Even so, ForceDaemon didn't show up at all. The service starting at boot doesn't, by itself, keep the PC on the tailnet without a signed-in user.

Microsoft Defender had also restarted that PC around 11 p.m. the night before. Going by Tailscale's docs, it wasn't reachable from outside until I signed in again. I just didn't need it during that time, so I never noticed.

How to check if Run unattended is on

On the home PC, open PowerShell and run this. No admin rights needed.

tailscale debug prefs | Select-String ForceDaemon
  • You get one line, "ForceDaemon": true,: Run unattended is on
  • You get nothing: it's off (when it's off, the field is left out of the output entirely)

tailscale debug prefs prints all of Tailscale's local preferences, and Run unattended is stored internally as ForceDaemon. Without the Select-String filter, the output also includes account and node details, so don't paste the full output anywhere public. If PowerShell can't find the tailscale command, use the full path:

& "C:\Program Files\Tailscale\tailscale.exe" debug prefs | Select-String ForceDaemon

To check without the command line, right-click the Tailscale icon in the system tray, then hover over "Preferences." A check mark next to "Run unattended" means it's on.

How to turn on Run unattended

On the home PC (the one you connect to), sign in as the user you normally use and do one of the following.

From the tray menu:

  1. Right-click the Tailscale icon in the system tray
  2. Hover over "Preferences"
  3. Select "Run unattended"
  4. Click "Yes" when asked. A check mark next to "Run unattended" means it's on

From the command line, run this in PowerShell or Command Prompt:

tailscale set --unattended=true

Then run the check command again and make sure you see "ForceDaemon": true,.

Test it before you leave home

Sign out of the home PC (or restart it and don't sign in), then run tailscale ping from another device. Replace desktop-pc with the home PC's machine name as shown on the Machines page.

tailscale ping desktop-pc

If you get a pong, the PC is on your tailnet with nobody signed in. If you don't, work through 8 causes to check when Remote Desktop over Tailscale won't connect.

Things to know before you turn it on

Other Windows users lose control of Tailscale

The Windows account that turns on Run unattended becomes the owner of Tailscale's configuration on that PC. Until it's turned off, other users can't switch profiles or change settings. On a shared PC, decide up front whose account should own it.

Deleting the owner account makes it hard to undo

If the owning account is deleted or can't sign in, you can't turn the setting off the normal way. Tailscale's docs describe two ways out. One is the UnattendedMode system policy. The other is running tailscale set --unattended=false as Local System with Sysinternals PsExec. If you plan to clean up user accounts on the PC, turn Run unattended off first.

Key expiry still applies

Run unattended doesn't touch key expiry (180 days by default). Once the key expires, the PC drops off even with a user signed in. For an always-on home PC, go to Machines in the admin console. From that device's menu, choose "Disable key expiry."

How to turn it off

Signed in as the same user who turned it on, select "Preferences" → "Run unattended" in the tray menu again to clear the check mark, or run:

tailscale set --unattended=false

Summary

  • Run unattended keeps Tailscale on Windows connected when nobody is signed in. It's off by default
  • Check it by looking for ForceDaemon in the output of tailscale debug prefs
  • For a home PC you reach from outside, combine Run unattended, disabled key expiry, and no sleep

References

Comments

Copied title and URL