brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: tailscale switch moves a device between your tailnets in one command

Network and access
~/tips/tip-tailscale-switch-accounts

tailscale switch --list

Switches the device to another logged-in Tailscale account or tailnet without logging out.

If you have a personal tailnet and a work one, logging out and in again to change between them is slow. Tailscale keeps several accounts on one device and switches between them.

tailscale switch --list

That lists the accounts this device knows. Then switch by email or by nickname:

tailscale switch [email protected]
tailscale switch work

The docs say you do not need to log in again when you switch, unless the account was never used on this device or its node key has expired. Add --json to --list if you want to use the list in a script.

There is also tailscale switch remove <id> to drop an account from the device, which the docs mark as alpha.

Fast user switching works from the CLI on Linux, macOS and Windows. The docs say there is no CLI for it on iOS and Android, where you switch in the app.

Caveat: a device is on one tailnet at a time. The docs are clear that it cannot send traffic on several tailnets at once, so while you are on the work tailnet, your home devices are out of reach. For a server that must be reachable from both, switching is the wrong tool.

Further reading: Tailscale CLI reference, Tailscale: fast user switching

Going deeper: Why a Tailscale device vanishes after 180 days, and how to stop it

More Network and access tips scp -3 alice@server-a:/var/backups/db.sql.gz bob@server-b:/srv/restore/ tailscale exit-node suggest tailscale lock sign nodekey:1abddef1 tlpub:abcdef12 wg genpsk > peer1.psk Table = off All Network and access tips (163) All topics

Link