I'm using mktorrent, but I'm having problems with it since it doesn't hash the files in the directory for some weird reason...

I'm looking for a replacement specifically for command line

  • Never done it myself so commenting rather than answering, most notable torrent client have this feature on gui section and some of them have command line interface. You may give a shot at transmission-cli or qbittorrent-nox or deluge-console or rtorrent. – sagarchalise Mar 25 '11 at 21:02
  • 1
    rtorrent doesn't have torrent creation sadly (the one I use) i'll check out the others – allenskd Mar 25 '11 at 22:21
  • 1
    rtorrent doesn't and won't have creation feature as developer says here: libtorrent.rakshasa.no/ticket/656 – Pedram Mar 25 '11 at 22:29

How about ctorrent?

sudo apt-get install ctorrent
ctorrent -t -u "http://tracker.example.com:6969/announce" -s example.torrent file_or_dir_to_upload 

It's also a very good client.

| improve this answer | |

Transmission can do it:

$ ./transmission-create --help
Usage: transmission-create [options] <file|directory>


 -h --help              Display this help page and exit
 -p --private           Allow this torrent to only be used with the specified tracker(s)
 -o --outfile <file>    Save the generated .torrent to this filename
 -c --comment <comment> Add a comment
 -t --tracker <url>     Add a tracker's announce URL
 -V --version           Show version number and exit

an example could be:

transmission-create -o /var/lib/transmission-daemon/downloads/files.torrent -c "My comments" -t udp://tracker.openbittorrent.com:80 ~/torrent/complete/my_file_or_directory_to_share.extension

you can find more documentation here

| improve this answer | |
  • Note that transmission seems unable to create a Torrent file with Webseeds. – Frederick Nord Jun 27 '17 at 7:24


sudo apt-get install buildtorrent

From synaptic:

Description: command line torrent creation program

buildtorrent is a torrent file creation program. Given an announce url and an input file or directory, buildtorrent generates an output .torrent file that can be used by torrent clients.

| improve this answer | |



Create torrents via command line!

py3createtorrent is a comprehensive shell/commandline utility for creating torrents (Linux & Windows). It's a GPL-licensed Python v3.1 script.

| improve this answer | |
  • Your link 404s :( – Frederick Nord Jun 27 '17 at 7:24
  • @FrederickNord I updated the link. – robert Jun 27 '17 at 11:14
  • FTR: It seems to be unable to create a Torrent file with Webseeds – Frederick Nord Jun 27 '17 at 11:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.