The mkbrr create command is used to generate new .torrent files from local files or directories.

mkbrr create [path] [flags]

This command supports creating torrents for single files or entire directories. It also integrates with Presets and Batch Mode for more advanced workflows.

Smart Defaults

mkbrr automatically optimizes several settings for you:

Piece Size

Automatically calculated based on content size for optimal performance and tracker compatibility

File Name

Generated from tracker domain and content name if not specified (e.g., tracker-domain_content-name.torrent)

Private Flag

Enabled by default for private tracker compatibility. Use --private=false for public trackers

When you provide a tracker URL via the -t flag or presets, mkbrr automatically detects and applies the appropriate tracker-specific rules to ensure your torrents are compliant.

Arguments

  • [path]: (Required unless using -b) The path to the source file or directory you want to create a torrent from.

Flags

Input & Output

--tracker, -t
string

Tracker URL. Required unless using a preset with trackers defined.

--output, -o
string

Optional. Set output path (default: <n>.torrent or <tracker-prefix>_<n>.torrent).

--skip-prefix
boolean
default:false

Don’t add tracker domain prefix to output filename.

Advanced Input (Batch & Presets)

--batch, -b
string

Batch config file (YAML). Cannot be used with a path argument.

For creating multiple torrents in one go. See the Batch Mode documentation for details.

--preset, -P
string

Use preset from config.

For reusing common settings across torrents. See the Presets documentation for details.

--preset-file
string

Preset config file (default ~/.config/mkbrr/presets.yaml).

Set custom path to presets.yaml. See the Presets documentation for details.

Content Selection

--exclude
array

Exclude files matching these patterns (e.g., "*.nfo,*.jpg" or --exclude "*.nfo" --exclude "*.jpg").

Use this to filter out unwanted files like NFOs, samples, or extras that shouldn’t be in the torrent. See the filtering guide for detailed pattern rules and examples.

--include
array

Include only files matching these patterns (e.g., "*.mkv,*.mp4" or --include "*.mkv" --include "*.mp4").

Using include patterns activates whitelist mode. See the filtering guide for detailed pattern rules and examples.

Torrent Internals

--private, -p
boolean
default:true

Make torrent private.

Private flag is enabled by default for tracker compliance. Only disable if you’re creating a public torrent.

--piece-length, -l
number

Set piece length to 2^n bytes (16-27, automatic if not specified).

Let mkbrr automatically calculate the piece size unless you have specific requirements. The automatic calculation optimizes for both performance and compatibility.

--max-piece-length, -m
number

Limit maximum automatically calculated piece length to 2^n bytes (16-27).

--entropy, -e
boolean
default:false

Randomize the torrent’s info hash by adding or updating a unique, random entropy key in the info dictionary before hashing.

Cross-seeding is the practice of seeding the same content on multiple trackers. Using the entropy flag helps avoid conflicts between trackers.

Seeding & Metadata

--web-seed, -w
array

Specify web seed URLs. Can be used multiple times.

Web seeds provide an HTTP fallback source for the torrent content, improving availability.

--source, -s
string

Specify the source string.

Some trackers require or recommend specific source tags. Check your tracker’s rules.

--comment, -c
string

Specify a comment.

--no-date, -d
boolean
default:false

Omit the creation date from the torrent metadata.

--no-creator
boolean
default:false

Omit the creator string from the torrent metadata.

Execution & Output Control

--workers
number

Manually specify the number of concurrent goroutines used for hashing.

Experimenting with different worker values might yield better performance than the default automatic setting.

--verbose, -v
boolean
default:false

Be verbose.

--quiet
boolean
default:false

Enable quiet mode, printing only the final torrent file path upon success. Useful for scripts.

When mkbrr create encounters symbolic links (symlinks) within the source path:

  • Links are followed: mkbrr reads the content of the file or directory the link points to (the target).
  • Target content is hashed: The torrent pieces will contain the hash data of the target file’s content.
  • Link path is stored: The file path recorded inside the .torrent file’s metadata will be the path of the symbolic link itself, relative to the source path, not the path of the target.

This means the created torrent represents the file structure as it appears with the links, but the data integrity check (mkbrr check) will verify against the actual content pointed to by those links at the time of creation.

Important: When checking a torrent created with symlinks using mkbrr check, the check verifies against the original target content that was hashed during creation, not necessarily what the link points to currently if the target file has changed or been moved.

Examples

Create a private torrent for a single file:

mkbrr create /path/to/movie.mkv -t https://private-tracker.com/announce -s "MyTracker"

Create a public torrent for a directory:

mkbrr create /path/to/album-folder -t udp://public-tracker.org:6969/announce --private=false -c "Awesome Album"