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 set --operator lets your own user run tailscale without root

Network and access
~/tips/tip-tailscale-set-operator

sudo tailscale set --operator=$USER

Gives one Linux user the right to operate tailscaled, so routine commands need no sudo.

On Linux, a lot of tailscale commands complain unless you run them as root. Typing sudo for every tailscale serve gets old, and you do not need it.

sudo tailscale set --operator=$USER

The Tailscale CLI docs describe --operator as a Unix username other than root to operate tailscaled. You run it once with sudo, and after that your own account can manage the daemon. The same flag exists on tailscale login, so on a fresh install you can set it in the same step as logging in:

sudo tailscale login --operator=$USER

On a laptop or a desktop where I am the only person using the account, I would do this right after installing Tailscale. It removes a small annoyance, and it means fewer commands that I run as root out of habit.

A nice result: the operator can manage Serve and Funnel port targets. So this works as your normal user afterwards:

tailscale serve --bg 3000

That is where I’d use it most, for putting a dev server or a small app on the tailnet without sudo.

Caveats. The docs say serving a file, a directory or a Unix socket still needs root, so tailscale serve /var/www will keep asking for sudo. Pick the operator with care: whoever it is can change how this machine sits on your tailnet. On a shared server I would not hand that to every account.

Further reading: Tailscale CLI reference, On this site: turn on Tailscale SSH with tailscale set –ssh

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