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: disable key expiry for a Tailscale server so it never drops off

Network and access
~/tips/tip-tailscale-disable-key-expiry

sudo tailscale up --force-reauth

Stop a headless server from losing its Tailscale connection when its node key expires.

Tailscale node keys expire, by default after 180 days. On a laptop you just log in again. On a server in a closet, it means one day it is simply gone from your tailnet.

For servers, switch expiry off per device in the admin console: open the Machines page, click the menu at the end of the device’s row and choose Disable key expiry.

If you turn the server into a tagged device, for example by joining with an auth key that has a tag, you do not need this step. The docs say key expiry is disabled by default for tagged devices.

The tailnet-wide default can be changed too, on the Device management page under Key Expiry, to anything between 1 and 180 days.

Expiry exists for a reason, so I’d keep it on for laptops and phones. If one gets lost or stolen, its access runs out on its own even if nobody remembers to remove it.

When a device has already expired, you need to log it in again with tailscale up --force-reauth or a new auth key. The docs warn that force-reauth can drop the connection, so do not run it over SSH through Tailscale itself:

sudo tailscale up --force-reauth

Further reading: Key expiry, Auth keys

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