Prevent Auto-Connect on Restart/Login

Is there a way to prevent the Windows Tailscale client from auto-connecting on a system boot/login? I use Tailscale on my system as an outbound client only when I need to, and it conflicts with some other stuff I also run at times. Would be nice to not have to remember to turn it off every time I boot my system.

1 Like

You could try to disable the autostart option

Sure, but that is not quite the same. I would also like it to start disconnected. If killing it was the only way to disconnect there would not be a menu item to disconnect

you could always create a batch file with ‘tailscale.exe down’ and drop it in the startup folder. (type shell:startup or shell:common startup in Windows File Explorer).

If you need help creating the batchfile, let me know. You also might be able to create a scheduled task on ‘shutdown’, but I haven’t looked to see if that is possible.

This way, the client is still running, just not connected.

I too, like @emorgoch, have been wondering about this - the option to start Tailscale disconnected - for my workflow on my Windows computer. It would be great if it was a feature/option in Preferences, but until then, please @muzicman0, share your batch file expertise.

open notepad and paste in:

set delay=10
ping localhost -n %delay%
tailscale down

Save that file as “tailscale_down.bat”. Be sure it is not “tailscale_down.bat.txt” (to save as a .bat in Notepad, change the file type in the save dialog to ‘All Files’, or better yet, use Notepad++ instead).

Once saved, move the .bat file to your startup folder. There are 2 folders options, 1 for just the current user, and 1 for all users (choose either one, but not both!). Open your file explorer, and in the address bar, type either “shell:startup” or “shell:common startup” and press enter. Copy the .bat file into that directory, and when you reboot, it will run on user log in.

[EDIT: the ping command in the bat file is simply to insert a delay to be sure the Tailscale process has already started]
[EDIT 2: Tailscale will technically still start connected, but will disconnect within a few seconds after login]

I also want to voice my request for having an option “connect on launch” that can be disabled. I have the same problem as others, that tailscale can break some of my other networking when it’s unexpectedly running, and I only want to connect at certain times. (It’s really confusing when Windows wants to reboot for some updates, and then all of sudden I have weird network issues. “OOoh, never mind, it’s just tailscale autostarting again.” :grimacing: )

Thank you, @muzicman0, especially for the timely response! Your solution worked without issue!

I was unaware that BAT files are a way to run terminal commands in Windows; thank you for increasing my knowledge. I am an enthusiastic user of AutoHotKey (AHK), and I use an AHK script as a kind of boot-up sequence when I log into to Windows, to automate some of my repetitive tasks in the morning. I was able to incorporate what you taught me into my AHK script. I am proud of this solution, but it is still worth mentioning that this really should be a built-in feature in Tailscale.

I can post my AHK script if anyone is curious, especially since it can run the terminal (Command Prompt) hidden. Thanks again, Tailscale community!

Glad I could help!

I completely agree.

I would like to see option for this. Sometimes people come with an connected tailscale in the company and have no networking at all because tailscale try to resolve the tailscale server over tailscale. In that state, tailscale gui hangs with “restart tailscale service”. Only way for them is to stop the tailscale services in services. An option like “always start disconnected” on the client would be awesome.