LinuxCommandLibrary

tailscale-file

Send files between Tailscale devices

TLDR

Send a file to a specific node

$ tailscale file cp [path/to/file] [hostname|ip]:
copy

Store files that were sent to the current node into a specific directory
$ tailscale file get [path/to/directory]
copy

SYNOPSIS

tailscale file

PARAMETERS


    Path to the file or directory to send. Can be a single file or a directory; if it's a directory it will be transferred as a zip archive.


    Tailscale name or IP address of the receiving node, followed by an optional colon and destination path on receiver. If the destination is not defined on the receiver, the default path will be used (~/taildrop).

DESCRIPTION

The `tailscale file` command facilitates secure file transfer between devices connected to a Tailscale network. It leverages Tailscale's encryption and peer-to-peer capabilities to provide a convenient and secure way to share files, bypassing the need for public internet exposure or complex configurations like port forwarding. This command works by establishing a direct connection between the sender and receiver, ensuring that the file data remains within your Tailscale network. The receiving end must be explicitly setup to listen for file transfer, making it inherently more secure than simply sharing files over a public share. `tailscale file` simplifies the process of sending files to specific devices within your Tailscale network, eliminating the challenges associated with traditional file-sharing methods, like the need for external servers or complex firewall rules.

CAVEATS

Requires Tailscale to be active and connected on both sending and receiving devices. The receiving device needs to be explicitly prepared to receive files via `tailscale file --accept` or in the GUI/app. Very large files or slow network connections may result in timeouts.

RECEIVING FILES

Before sending files, the receiving device needs to be listening for connections. This can be achieved by running the command `tailscale file --accept` on the target machine or through the GUI/app. The application is responsible for establishing the connection on the correct port, and the command manages the file transfer over the direct connection.

SECURITY

All file transfers are encrypted using Tailscale's WireGuard encryption, ensuring that the data remains confidential and secure during transit. Ensure both machines are registered under your account.

HISTORY

The `tailscale file` command was introduced as part of the Tailscale suite of tools to provide a user-friendly and secure method for transferring files within a private Tailscale network. It was designed to simplify file sharing, replacing the need for more complex solutions.

SEE ALSO

tailscale(1), scp(1)

Copied to clipboard