Skip to main content
Batch mode is ideal for creating multiple torrents in one go.

Configuration File (batch.yaml)

Batch operations are defined in a YAML file, typically named batch.yaml.
While batch.yaml is a common convention, you can use any filename. Just be sure to specify it with -b.

Configuration Structure

Configuration Options

Required Fields

  • version: Must be 1
  • jobs: List of torrent creation tasks
  • output: Path for the .torrent file
  • path: Source file/directory path

Optional Settings

  • trackers: Announce URLs list
  • webseeds: Web seed URLs list
  • private: Set to true or false. The default is true.
  • piece_length: Piece size exponent
  • max_piece_length: Maximum piece size exponent
  • target_piece_count: Target number of pieces (mutually exclusive with piece_length)
In mkbrr v1.26.0 and earlier, a job without private made a public torrent. Now it makes a private torrent. Set private: false to make a public torrent.
  • comment: Torrent comment string
  • source: Source tag string. If you do not set it, mkbrr uses the default source of the first tracker, when that tracker has one. Set source: "" to add no source.
  • entropy: Set true to randomize info hash for cross-seeding
  • no_date: Set true to omit creation date
  • no_creator: Set true to omit the creator string
  • skip_prefix: Set true to prevent adding tracker domain prefix to output filename
  • fail_on_season_warning: Set true to exit with error on missing episodes in season packs
  • exclude_patterns: Glob patterns to exclude files
  • include_patterns: Glob patterns to include files
You can find the formal JSON schema for validation here.

Failed jobs

When a job fails, mkbrr continues with the other jobs. The torrents from the jobs that succeed stay on disk. After all jobs run, mkbrr exits with a non-zero code and prints N of M batch jobs failed. A script can use this exit code to find a missing torrent. With --quiet, mkbrr prints each failed job to stderr as Failed: <output>: <error>. Without --quiet, use --verbose to see the error for each job.
In mkbrr v1.26.0 and earlier, a batch with failed jobs exited with code 0.

Command-line flags

You cannot provide a source path argument directly to mkbrr create when using the -b flag. All source paths must be defined within the batch file jobs.
With -b, mkbrr create accepts only -v, -q, and -i. These flags change only the output, not the torrents. Each job takes its settings from the batch file. If you give another create flag, such as -t, -s, -P, or --exclude, mkbrr stops with an error that names each flag to remove. In mkbrr v1.26.0 and earlier, mkbrr ignored these flags and gave no warning.