Unlocking Seamless File Sharing with Tailscale on Linux

Tailscale has emerged as a popular self-hosted mesh-VPN solution that allows users to establish secure connections between computers, even those buried behind firewalls. In this article, we will explore how to leverage Tailscale’s new file-sharing feature on Linux, enabling smooth file transfers across devices in your network.

Setting Up Tailscale on Your Linux System

Before diving into file sharing, you’ll need to install Tailscale on your Linux device. The installation process is straightforward and user-friendly.

  1. Open Your Terminal: Launch a terminal by pressing Ctrl + Alt + T or searching for "Terminal" in your application menu.

  2. Review the Installation Script: Before executing the installation script, it’s prudent to examine its contents. You can find the script here.

  3. Install Tailscale: Ensure that the curl command-line tool is installed on your system. Once confirmed, run the following command to install Tailscale.

    curl -fsSL https://tailscale.com/install.sh | sh
  4. Log In to Tailscale: After installation, you must log in to activate Tailscale. Use the following command in the terminal:
    sudo tailscale up --operator=$USER

    This command will generate a URL. Open it in your browser to log into your Tailscale account. If you’re a new user, you can easily create an account on the Tailscale website.

Activating the File Sharing Feature

The file-sharing capability in Tailscale isn’t enabled by default. Follow these steps to turn it on:

  1. Log Into the Tailscale Admin Console: Head to the Tailscale website and click on the Admin Console button.

  2. Navigate to Settings: In the console, click on the “Settings” section, then scroll down to find “Feature Preview”.

  3. Enable ‘Send Files’: Locate the “Send Files” option and toggle it on. Please be aware that this feature is in its Alpha stage, which means it may still be undergoing testing.

Once enabled, the file-sharing feature will be available for all devices connected to your Tailnet.

Transferring Files via the Terminal

Using the terminal to send files over Tailscale is convenient and efficient. Here’s how to do it:

  1. Check Device Connectivity: Ensure both the sender and recipient devices are connected to Tailnet. You can verify this by executing:

    tailscale status

    This command will display the devices on your network.

  2. Send the File: Identify the device name of your target recipient from the status output. Next, format your command like so:
    tailscale file cp /path/to/your/file.txt recipient-device-name-or-ip:

    Upon running this command, the file will automatically download to the recipient’s "Downloads" folder.

File Sharing Via GUI on Linux

For users who prefer a graphical interface, Tailscale provides GUI options for file sharing. Specifically, Ktailctl for KDE Plasma and Trayscale for Gnome users are great choices. Both applications are available on the Flathub app store.

Using Ktailctl

To share files with Ktailctl:

  1. Select Peers: Open Ktailctl and access the “Peers” section.
  2. Send a File: Click the “Send file(s)” button, browse to the file you wish to send, and confirm.

The file will be placed in the recipient’s "Downloads" directory.

Using Trayscale

For Trayscale users:

  1. Choose a Peer: Locate a Tailscale peer from the sidebar.
  2. Send a File: Click on the “Send a file to remote machine” button, select your file, and it will transfer directly to the recipient’s "Downloads" folder.

Embrace Efficient File Sharing with Tailscale

With Tailscale’s robust new file-sharing feature, transferring files between Linux devices is a breeze. Whether using the terminal or GUI, you can easily enhance collaboration and streamline workflows within your network.

Stay tuned for more tips on maximizing your use of Tailscale, and feel free to explore the many possibilities this versatile tool offers for secure networking.

By