ton push - Send a file over the network to someone running ton pull


ton push [options] path ...


Listen for the presence of a corresponding ton pull process on the network, then send the named files or directories to it.

By default, ton push will generate a random passphrase and print it to standard error. The user running ton pull is expected to type in that passphrase when prompted. Both endpoints must be on the same network (specifically, the pushing side must be able to receive private-address-range UDP multicast packets from the pulling side and the pushing side must be able to make a TCP connection to the pulling side), and they must use the same passphrase.

The supplied pathnames may consist of files or directories. All these files and directories will be copied over the network and written to ton pull’s destination directory. Symlinks, device files and socket files are ignored. File permission bits are preserved where possible, but some systems do not support all the Unix file permissions.


-4, --ipv4

Use IPv4 only, not IPv6.

-6, --ipv6

Use IPv6 only, not IPv4.

--discover-port port

Specify the discovery port number. This is the UDP port number on which we expect to receive announcement packets from ton pull, which must be using the same port number. The default is 51205.

-h, --help

Show help and exit.


If we are prompting for a passphrase (see --prompt-passphrase), don’t echo the passphrase as it is typed.


Listen for announcements on global as well as private IP addresses.

--multicast-address-ipv4 address

Specify the IPv4 multicast group address on which we expect to receive announcement packets. The ton pull process must use the same address. The default is, which is for use on private networks.

--multicast-address-ipv6 address

Specify the IPv6 multicast group address on which we expect to receive announcement packets. The ton pull process must use the same address. The default is ff08:5206:dd93:4290:0891:d264:1444:bd21, which is a private multicast address with organization-local scope.

--passphrase string

Use this specific passphrase rather than generating or prompting for one. Conventionally a passphrase is multiple words, but it may be any arbitrary byte string.


Don’t generate a random passphrase, but prompt for one at the terminal.

-q, --quiet

Don’t show the progress indicator or non-essential commentary.


Before sending all the files, send a full list of all the files to be transferred. This gives the receiving side an opportunity to review the list and cancel the transfer if desired.

-t, --timeout sec

Time out if no connection is established after sec seconds. The default is 0, which disables the timeout.

-w, --words count

Generate a passphrase with count words, if we’re generating a passphrase. The default is 4.

-v, --verbose

Show extra diagnostic output, including details of announcement packets received and where we’re trying to connect to as a result.


All these examples assume there’s someone on the nework running ton pull with the same passphrase as us.
Send a single file:

$ ton push rickroll.mp3

Send multiple files:

$ ton push rickroll.mp3 ./Pictures/cat.jpg

Send a directory and everything in it:

$ ton push ./Pictures/

Send a file, not use IPv6, and supply your own passphrase:

$ ton push -4 --passphrase "hovercraft full of eels" ./cat.jpg


ton(1), ton-pull(1)