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 drive share turns a folder into a share your whole tailnet can open

Network and access
~/tips/tip-tailscale-drive-share-taildrive

tailscale drive share docs /srv/docs

Shares a folder over your tailnet as WebDAV, with access decided by your Tailscale policy file.

I like the idea behind Taildrive a lot: a file share with no Samba config and no separate passwords, where your tailnet policy decides who can read or write. It’s still marked alpha, so I’d treat it as a handy extra rather than the place for your only copy of anything, but the command itself is tiny.

Since version 1.64.0 the Tailscale client has a small WebDAV server built in. You share a folder from a Linux, macOS or Windows device with tailscale drive share <name> <path>:

tailscale drive share docs /srv/docs
tailscale drive list

The name is what shows up in the path, so it doesn’t have to match the folder; keep it to lowercase letters and underscores. Every share gets a path made of the tailnet, the machine and the share name, like /example.com/nas-device/docs. On another device you open http://100.100.100.100:8080 as a WebDAV location. On a Mac that’s Finder, Go, Connect to Server, and connect as Guest. It’s plain HTTP, but the traffic runs inside Tailscale’s WireGuard tunnel. tailscale drive rename and tailscale drive unshare do what they say.

Before any of that works, the tailnet policy file needs two things: a nodeAttrs entry with drive:share and drive:access for the devices involved, and a grant with the tailscale.com/cap/drive app that says which shares a source may use, with "access": "ro" or "rw".

Caveats: iOS and Android can open Taildrive shares but can’t share folders themselves, and a device that was shared into your tailnet from someone else’s can’t reach Taildrive folders at all. On a Synology you also have to give Tailscale permission on the shared folder. My advice is to start with read-only grants and only open up rw for the share that really needs it.

Further reading: Tailscale docs: Taildrive, Tailscale CLI reference: drive

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