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: send a file to your phone with tailscale file cp, no cloud in between

Network and access
~/tips/tailscale-taildrop

tailscale file cp ./my-file.txt my-phone:

Sends a file straight from your computer to your phone over Tailscale, no cloud in between.

I keep reaching for e-mail or a chat app to move one file from a computer to a phone, and it always feels silly. If both devices are on your Tailscale network, I’d use Taildrop instead: the file goes straight from one device to the other.

From a terminal, send a file like this:

tailscale file cp ./my-file.txt my-phone:

The colon at the end matters. Tailscale’s docs say it tells the command that my-phone is a device and not a filename, much like scp. Not sure what the device is called? tailscale status lists names and IPs.

Receiving depends on the platform. On a phone you share from the Share menu and get a notification. On macOS files land in Downloads. On Linux you pull them in yourself:

sudo tailscale file get .

The dot is the folder they are copied to. You need sudo because tailscaled runs as root, so the received files belong to root.

The caveats are the reason I’m writing this down. Taildrop is still marked alpha in the docs, and you have to switch on Send Files in the admin console’s General settings first. It only works between your own devices, so not to a family member on the same tailnet, and not to devices you have tagged. An interrupted transfer can usually resume for up to an hour, except when a Mac or iPhone is the receiver.

I would not build a workflow on an alpha feature, but for “get this PDF onto my phone” it does the job. If you live in a mixed Mac, Linux and phone household like me, it saves a lot of detours through e-mail.

Further reading: Tailscale docs: Taildrop, On this site: tailscale ping tells you if a device is reached directly or through a relay, On this site: run tailscale ping to see if your connection is direct or relayed

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