Send files from your phone to a server, NAS or Raspberry Pi
Most browser file sharing tools need a browser tab open on the receiving side. A home server, NAS, Raspberry Pi or cloud VM has no screen and no browser. tosstome's command line inbox is built for exactly that machine.
Set up the inbox
On the server (Node.js 22 or newer):
tosstome listen --dir /srv/inbox
It prints a link and a QR code in the terminal:
- Scan the QR code with your phone, or copy the link to it.
- Add the page to your phone's home screen.
- Open it, pick files, press Send. They are written to
/srv/inbox.
The inbox link stays the same across restarts, so the home screen icon keeps working. To print it again later, run tosstome url. To throw the old link away and make a new one, run tosstome listen --new.
How the inbox is protected
- The link contains a secret send key after the
#. Browsers never send that part of a link to the server in the page request; the key is passed later inside the WebSocket connection. - The server stores only SHA-256 hashes of the keys.
- The server side uses a separate agent key that never leaves
~/.config/tosstome/inbox.json. - Wrong send keys lock out senders, never the server's own connection.
- File names from senders are reduced to a plain name inside the target folder. Files are written as
.partand renamed when complete, so a script watching the folder never sees half a file.
Also visible on the local network
tosstome listen --nearby
With --nearby, the server also appears in the Nearby list of browsers on the same network, so anyone at home can send to it without the link. Those files go to a separate nearby/ subfolder, because anyone on that network can send them.
Run it as a service
For a machine that should always accept files, run the command under whatever keeps your other services alive, such as a systemd unit, a Docker container or tmux. Add --json to get one JSON event per line (ready, offer, file, error) for logs or scripts.
[Unit]
Description=tosstome inbox
After=network-online.target
[Service]
ExecStart=/usr/bin/env tosstome listen --dir /srv/inbox --json
Restart=always
User=media
[Install]
WantedBy=multi-user.target
Send from another computer's terminal
tosstome send report.pdf photos.zip --to "INBOX_LINK"
Quote the link, since it contains a # that shells treat as a comment.
Questions
Does the server need a public IP or open ports?
No. The inbox makes an outgoing WebSocket connection to toss2.me and waits there, so it works behind home routers, NAT and firewalls that allow outgoing HTTPS.
What happens if the server is offline when I send?
Nothing is sent and nothing is stored. The phone page reports that the inbox is offline.
Can other people send to my inbox?
Only people who have the link. If it leaks, run tosstome listen --new to replace it; the old link stops working.
Is there a file size limit?
tosstome sets no limit. A receiving browser holds the file in memory until you save it, so for files of several gigabytes the command line inbox is the better receiver, because it writes straight to disk.
Related
- The tosstome command line tool
- Send files from your phone to your computer
- PairDrop vs tosstome
- How tosstome works
Last checked 2026-10-28.