LinuxCommandLibrary

mktorrent

A CLI utility to create BitTorrent metainfo files.

TLDR

Create a torrent with 2^21 KB as the piece size

$ mktorrent -a [tracker_announce_url] -l [21] -o [path/to/example.torrent] [path/to/file_or_directory]
copy


Create a private torrent with a 2^21 KB piece size
$ mktorrent -p -a [tracker_announce_url] -l [21] -o [path/to/example.torrent] [path/to/file_or_directory]
copy


Create a torrent with a comment
$ mktorrent -c "[comment]" -a [tracker_announce_url] -l [21] -o [path/to/example.torrent] [path/to/file_or_directory]
copy


Create a torrent with multiple trackers
$ mktorrent -a [tracker_announce_url,tracker_announce_url_2] -l [21] -o [path/to/example.torrent] [path/to/file_or_directory]
copy


Create a torrent with web seed URLs
$ mktorrent -a [tracker_announce_url] -w [web_seed_url] -l [21] -o [path/to/example.torrent] [path/to/file_or_directory]
copy

SYNOPSIS

mktorrent [OPTIONS] <target directory or filename>

DESCRIPTION

mktorrent is a command line utility to create BitTorrent metainfo files used by trackers and torrent clients. It can create metainfo files for single files or complete directories in a fast way.

OPTIONS

-a, --announce=<url>[,<url>...]

Specify the full announce URLs. Additional -a adds backup trackers.

-c, --comment=<comment>

Add a comment to the metainfo.

-d, --no-date

Don't write the creation date.

-h, --help

Show this help screen.

-l, --piece-length=<n>

Set the piece length to 2^n bytes. Default is 18, that is 2^18 = 256kB.

-n, --name=<name>

Set the name of the torrent. Default is the basename of the target.

-o, --output=<filename>

Set the path and filename of the created file. Default is <name>.torrent.

-p, --private

Set the private flag.

-s, --source=<source>

Add source string embedded in infohash.

-t, --threads=<n>

Use <n> threads for calculating hashes. Default is the number of CPU cores.

-v, --verbose

Be verbose.

-w, --web-seed=<url>[,<url>...]

Add web seed URLs. Additional -w adds more URLs.

AUTHORS

Written by Emil Renner Berthing <esmil@mailme.dk>. As of May 2016 the upstream maintainer is Kai Nilsen <mktorrent@rudde.org>.

This manpage was written for the Debian mktorrent package by Paride Legovini <pl@ninthfloor.org> and Nico Golde <nion@debian.org>.

REPORTING BUGS

Please send bug reports, patches, feature requests, praise and general gossip about the program to: <mktorrent@rudde.org>.

COPYRIGHT

This program is Free Software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.

SEE ALSO

More documentation at: <https://github.com/Rudde/mktorrent/wiki>.

Copied to clipboard