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 up with a QR code logs in a headless box from your phone

Network and access
~/tips/tip-tailscale-up-qr-login

sudo tailscale up --qr

Scan the login link from the terminal instead of copying a long URL by hand.

On a server without a browser, tailscale up prints a login URL that you have to copy somewhere. Over a serial console or a TV screen, that copying is the annoying part. The CLI can show the link as a QR code instead.

sudo tailscale up --qr

Next to the usual URL, the terminal draws a QR code. Scan it with your phone, log in there, and the box joins your tailnet.

If the code looks squashed or too big for your terminal, --qr-format takes ascii, large or small, with auto as the default:

sudo tailscale up --qr --qr-format=small

The help text lists --qr among the flags that do not count as settings, so you do not have to repeat all your other options with it, the way tailscale up normally demands.

I like this for a Raspberry Pi set up with a keyboard and monitor, where copying anything off the screen is out of the question. For machines you set up by script, an auth key is still the better route, since nobody has to be there to scan.

Whoever scans the code logs the device in under their own account, so scan it with the account that should own the machine.

Further reading: tailscale up command

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