How To Create and Seed a Torrent in Ubuntu Using Transmission Command Line

You may have a server with limited (free) monthly bandwidth, but yet need to share some large files or files that need to be accessed by a large number of people. Instead of sharing your files via your HTTP server, you can share them via BitTorrent instead in order to hopefully save bandwidth.

Here are the steps I followed on Ubuntu 11.10, but they should work with any version of Ubuntu, Debian and Mint.

  1. Install transmission client and daemon
  2. Create a directory to share your files and .torrent files
  3. Copy your file in that directory and create the torrent file with transmission-cli
  4. Start transmission-daemon

That’s all your need to do. If you want to monitor transmission remotly via a web interface, you can instead run transmission-daemon as follows:

transmission-daemon -c ~/p2p -a public_ip

Where public_ip is the public ip of your computer. Alternatively, you could also use dynamic DNS instead.

The final step would be to share the torrent file, you can sent it to selected persons or simply share in your http server e.g.:

sudo cp ~/p2p/ubuntu.bin.7z.torrent.added /var/www/public_html/torrent
sudo chown www-data.www-data /var/www/public_html/torrent/ubuntu.bin.7z.torrent.added

Users can then download your file via BitTorrent, by download the torrent file from your server and an address that looks like:

http://www.your-server.com/torrent/ubuntu.bin.7z.torrent.added

and start download your file as they would do with any torrent.

transmission-daemon will start automatically each time you start your server, with the settings defined in /etc/transmission-daemon/settings.json and as user ‘debian-transmission’.

You’ll need to edit settings.json and add 2 lines to include the watch dir:


and make sure the directory can be access by debian-transmission user:

You may also need to add “user” to debian-transmission group, if you are going to copy file to /home/user/p2p with that user:

You can find more details about configuring transmission-daemon at https://trac.transmissionbt.com/wiki/EditConfigFiles.

Share this:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX RK3588 mini-ITX motherboard

3 Replies to “How To Create and Seed a Torrent in Ubuntu Using Transmission Command Line”

  1. Does anyone know why Chrome doesn’t allow magnets to be taken by the default torrent client on Linux Mint/Ubuntu?

  2. I do the following, download the created .torrent, starting it, but it seems that transmission doesn’t seed:
    transmission-daemon -c ~/p2p
    transmission-create -t http://mytracker.com test/
    service transmission-daemon restart

Leave a Reply

Your email address will not be published. Required fields are marked *

Boardcon Rockchip and Allwinner SoM and SBC products
Boardcon Rockchip and Allwinner SoM and SBC products