Configuration File (presets.yaml)

Presets are defined in a YAML file named presets.yaml. mkbrr searches for this file in the following locations, using the first one it finds:

  1. Path specified by the --preset-file flag (if used)
  2. The current working directory (./presets.yaml)
  3. ~/.config/mkbrr/presets.yaml (or equivalent user config directory)
  4. ~/.mkbrr/presets.yaml (legacy location)

Structure

The presets.yaml file follows this structure:

# yaml-language-server: $schema=https://raw.githubusercontent.com/autobrr/mkbrr/main/schema/presets.json
version: 1

# Optional: Default settings applied to ALL presets unless overridden
default:
  private: true
  no_date: true
  no_creator: false
  skip_prefix: false
  # comment: "Default comment"
  # source: "DEFAULT_SRC"
  # exclude_patterns: ["*.bak", "temp.*"]
  # include_patterns: ["*.mkv", "*.mp4"]

presets:
  preset-name-1: # Name of the preset (used with -P flag)
    trackers:
      - "https://tracker-one.com/announce/..."
    source: "TRACKER1"
    comment: "Uploaded via mkbrr"
    private: true
    exclude_patterns:
      - "*.nfo"
      - "*sample*"

  preset-name-2:
    trackers:
      - "udp://tracker-two.org:6969/announce"
    private: false # Make these torrents public
    piece_length: 18 # Use 256 KiB pieces for this preset
    include_patterns:
      - "*.mkv"
      - "*.mp4"
      - "*.avi"
Configuration Fields
version
string
required

Must be 1

default
object

Optional settings applied to all presets unless explicitly overridden within a specific preset

presets
object
required

A map where each key is the preset name (e.g., ptp, public) and the value contains the options for that preset

Available Options

The following options can be used within the default section or any specific preset:

trackers
string[]

List of announce URLs. The first one is used as the primary tracker.

private
boolean

Whether the torrent should be private.

source
string

Source tag string.

comment
string

Torrent comment string.

You can find the formal JSON schema for validation here.

Using Presets

Specify the preset name using the -P (or --preset) flag with the create or modify commands:

mkbrr create /path/to/content -P preset-name-1

Overriding Presets

Command-line flags take precedence over preset settings. Most flags completely override their preset counterparts, but filtering options have special behavior:

  • Filtering patterns are additive: Command-line patterns combine with preset patterns

Standard command-line flags (like --private or --source) completely override their preset values, while filtering patterns combine additively.

For complete details on filter processing and pattern syntax, see the Filtering documentation.

mkbrr create /path/to/content -P preset-name-1 -s "CUSTOM_SRC"