### Enable and Start autobrr systemd Service (Bash) Source: https://autobrr.com/installation/linux This command enables the autobrr service to start on boot and starts it immediately. Replace `USERNAME` with the actual user for whom the service is being configured. ```bash sudo systemctl enable --now autobrr@USERNAME.service ``` -------------------------------- ### Install autobrr on Seedboxes (Bash) Source: https://autobrr.com/installation/linux Commands to install autobrr on different seedbox solutions. These commands leverage the respective seedbox management tools to install the autobrr application. ```bash sudo box install autobrr ``` ```bash sb install autobrr ``` ```bash qb install autobrr -u ${username} ``` -------------------------------- ### Install Autobrr using Homebrew Source: https://autobrr.com/installation/macos Installs the Autobrr application using the Homebrew package manager. This command assumes Homebrew has already been successfully installed. ```shell brew install autobrr ``` -------------------------------- ### TQM Configuration Example Source: https://autobrr.com/3rd-party-tools/manage-torrents This snippet shows an example configuration file for TQM, a CLI application used to manage torrent client queues. It demonstrates how to configure client connections (qBittorrent), define filtering rules (ignore, remove, label, tag), and set up periodic execution using cronjobs or Task Scheduler. ```yaml clients: qbt: download_path: /mnt/local/downloads/torrents/qbittorrent/completed download_path_mapping: /downloads/torrents/qbittorrent/completed: /mnt/local/downloads/torrents/qbittorrent/completed enabled: true filter: default type: qbittorrent url: https://qbittorrent.domain.com/ user: user password: password filters: default: ignore: # general - TrackerStatus contains "Tracker is down" - Downloaded == false && !IsUnregistered() - SeedingHours < 26 && !IsUnregistered() # permaseed / un-sorted (unless torrent has been deleted) - Label startsWith "permaseed-" && !IsUnregistered() # Filter based on qbittorrent tags (only qbit at the moment) - '"permaseed" in Tags && !IsUnregistered()' remove: # general - IsUnregistered() # imported - Label in ["sonarr-imported", "radarr-imported", "lidarr-imported"] && (Ratio > 4.0 || SeedingDays >= 15.0) # ipt - Label in ["autoremove-ipt"] && (Ratio > 3.0 || SeedingDays >= 15.0) # hdt - Label in ["autoremove-hdt"] && (Ratio > 3.0 || SeedingDays >= 15.0) # bhd - Label in ["autoremove-bhd"] && (Ratio > 3.0 || SeedingDays >= 15.0) # ptp - Label in ["autoremove-ptp"] && (Ratio > 3.0 || SeedingDays >= 15.0) # btn - Label in ["autoremove-btn"] && (Ratio > 3.0 || SeedingDays >= 15.0) # hdb - Label in ["autoremove-hdb"] && (Ratio > 3.0 || SeedingDays >= 15.0) # Qbit tag utilities - HasAllTags("480p", "bad-encode") # match if all tags are present - HasAnyTag("remove-me", "gross") # match if at least 1 tag is present label: # btn 1080p season packs to permaseed (all must evaluate to true) - name: permaseed-btn update: - Label == "sonarr-imported" - TrackerName == "landof.tv" - Name contains "1080p" - len(Files) >= 3 # cleanup btn season packs to autoremove-btn (all must evaluate to true) - name: autoremove-btn update: - Label == "sonarr-imported" - TrackerName == "landof.tv" - not (Name contains "1080p") - len(Files) >= 3 # Change qbit tags based on filters tag: - name: low-seed # This must be set # "mode: full" means tag will be added to # torrent if matched and removed from torrent if not # use `add` or `remove` to only add/remove respectivly # NOTE: Mode does not change the way torrents are flagged, # meaning, even with "mode: remove", # tags will be removed if the torrent does NOT match the conditions. # "mode: remove" simply means that tags will not be added # to torrents that do match. mode: full update: - Seeds <= 3 ``` -------------------------------- ### Install Homebrew on macOS Source: https://autobrr.com/installation/macos Installs the Homebrew package manager on macOS using a script downloaded from GitHub. This is a prerequisite for installing Autobrr and other software via Homebrew. ```shell /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` -------------------------------- ### Create autobrr systemd Service File (Bash) Source: https://autobrr.com/installation/linux Creates an empty systemd service file for autobrr. This file will be populated with the service configuration to manage autobrr as a background process. ```bash touch /etc/systemd/system/autobrr@.service ``` -------------------------------- ### Unpack autobrr Binaries to /usr/local/bin (Bash) Source: https://autobrr.com/installation/linux This command unpacks the downloaded autobrr tarball, placing the `autobrr` and `autobrrctl` binaries into the `/usr/local/bin` directory. This makes the executables available system-wide. ```bash sudo tar -C /usr/local/bin -xzf autobrr*.tar.gz ``` -------------------------------- ### Start Autobrr as a macOS Service Source: https://autobrr.com/installation/macos Starts the Autobrr service and configures it to automatically restart on system login. This ensures Autobrr runs in the background without user intervention. ```shell brew services start autobrr ``` -------------------------------- ### Install Nginx on macOS with Homebrew Source: https://autobrr.com/installation/macos Installs the Nginx web server on macOS using the Homebrew package manager. Nginx is recommended as a reverse proxy for Autobrr to enhance security and functionality. ```shell brew install nginx ``` -------------------------------- ### Initial ZNC Docker Compose Setup Source: https://autobrr.com/configuration/irc This Docker Compose configuration sets up the Linuxserver ZNC Docker image with essential environment variables, volume mappings for configuration, and port exposure. It ensures ZNC restarts automatically if it stops unexpectedly. ```yaml version: "2.1" services: znc: image: lscr.io/linuxserver/znc:latest container_name: znc environment: - PUID=1000 - PGID=1000 - TZ=Etc/UTC volumes: - /path/to/data:/config ports: - 6501:6501 restart: unless-stopped ``` -------------------------------- ### Dynamic Date and Time Variables Source: https://autobrr.com/filters/macros Provides examples of using dynamic date and time variables for creating save paths or other time-sensitive information. It shows how to access the current year and format the current month with leading zeros. ```Go Templating {{ .CurrentYear }} ``` ```Go Templating {{ .CurrentMonth | printf "%02d" }} ``` -------------------------------- ### autobrr systemd Service Configuration (systemd unit file) Source: https://autobrr.com/installation/linux This is the content for the autobrr systemd service file. It defines how the autobrr service should run, including user, group, and the command to execute. The `%i` placeholder is replaced by the username when enabling the service. ```systemd [Unit] Description=autobrr service for %i After=syslog.target network-online.target [Service] Type=simple User=%i Group=%i ExecStart=/usr/local/bin/autobrr --config=/home/%i/.config/autobrr/ [Install] WantedBy=multi-user.target ``` -------------------------------- ### Create autobrr Configuration Directory (Bash) Source: https://autobrr.com/installation/linux This command creates the necessary directory structure for autobrr's configuration files. The `-p` flag ensures that parent directories are created if they do not exist. ```bash mkdir -p ~/.config/autobrr ``` -------------------------------- ### NickServ Authentication Setup in ZNC Source: https://autobrr.com/configuration/irc This command is used within an IRC client connected to ZNC to configure NickServ authentication. It sets the bot's password for NickServ. This is an alternative or fallback method if SASL authentication fails. ```irc /query *nickserv set ``` -------------------------------- ### autobrr API Authentication Examples Source: https://autobrr.com/api Demonstrates how to authenticate API requests to autobrr using either an 'X-API-Token' header or an 'apikey' URL parameter. Authentication is required for all API interactions. ```shell curl -X GET 'http://127.0.0.1:7474/api/download_clients' -H 'X-API-Token: AUTOBRR_API_KEY' | jq ``` ```shell curl -X GET 'http://127.0.0.1:7474/api/download_clients?apikey=${AUTOBRR_API_KEY}' | jq ``` -------------------------------- ### Start Autobrr Container using Docker Compose Source: https://autobrr.com/installation/docker This command starts the Autobrr container in detached mode using Docker Compose. Ensure your `docker-compose.yml` file is correctly configured before running this command. ```bash docker compose up -d ``` -------------------------------- ### Install Node.js LTS and cross-seed with npm Source: https://autobrr.com/3rd-party-tools/cross-seed Installs Node.js LTS (v18.x) and the cross-seed package globally using npm. Requires root privileges and is recommended for users who prefer direct installation over Docker. Ensure Node.js 16 or greater is installed. ```bash sudo su - curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \ apt-get install -y nodejs npm install -g cross-seed ``` -------------------------------- ### Configure Sizechecker in Autobrr External Filter Source: https://autobrr.com/3rd-party-tools/sizechecker Example arguments for setting up Sizechecker as an 'Exec' type external tool within an autobrr filter. This example checks for at least 50GB of free space. ```bash --discord="YOUR_DISCORD_WEBHOOK_URL" --limit=50GB --runtype=a /path/to/check ``` -------------------------------- ### SASL Authentication Setup in ZNC Source: https://autobrr.com/configuration/irc This command is used within an IRC client connected to ZNC to set up SASL authentication. It requires the bot's username and optionally a password. After running this, a reconnect to the network is needed for the changes to take effect. ```irc /query *sasl Set [] ``` ```irc /query *status jump ``` -------------------------------- ### Download Latest autobrr Linux Release (Bash) Source: https://autobrr.com/installation/linux This command downloads the latest autobrr release binary for Linux x86_64 from GitHub's API. It uses `curl` to fetch the release information and `grep` to filter the download URL. ```bash wget $(curl -s https://api.github.com/repos/autobrr/autobrr/releases/latest | grep download | grep linux_x86_64 | cut -d\" -f4) ``` -------------------------------- ### autobrr Filter Management Examples Source: https://autobrr.com/api Illustrates common operations for managing filters within autobrr, including fetching all filters, enabling/disabling a specific filter, deleting a filter, and creating a new filter. ```shell curl -X GET 'http://127.0.0.1:7474/api/filters' -H 'X-API-Token: AUTOBRR_API_KEY' | jq '.[] | {id, name}' ``` ```shell curl -X PUT 'http://127.0.0.1:7474/api/filters/65/enabled' -H 'X-API-Token: AUTOBRR_API_KEY' \ -d '{"enabled":true}' ``` ```shell curl -X DELETE 'http://127.0.0.1:7474/api/filters/84' -H 'X-API-Token: AUTOBRR_API_KEY' ``` ```shell curl -X POST 'http://127.0.0.1:7474/api/filters' -H 'X-API-Token: AUTOBRR_API_KEY' \ -d '{ "name": "filter name", "enabled": false, "resolutions": [], "codecs": [], "sources": [], "containers": [], "origins": [] }' ``` -------------------------------- ### Download Sizechecker Binary for Linux (AMD64) Source: https://autobrr.com/3rd-party-tools/sizechecker Downloads the latest Sizechecker binary for Linux AMD64 architecture from GitHub releases using wget and curl. This is the first step to installing the tool. ```bash wget $(curl -s https://api.github.com/repos/s0up4200/sizechecker/releases/latest | grep download | grep linux_amd64 | cut -d" -f4) ``` -------------------------------- ### Update *arr Download Client via API Source: https://autobrr.com/api This example shows how to update an existing *arr application's configuration within Autobrr using the API. It allows for changes to the host, API key, and authentication details. The 'external_download_client_id' can also be modified. ```bash curl -X PUT 'http://127.0.0.1:7474/api/download_clients' -H 'X-API-Token: AUTOBRR_API_KEY' \ -d '{ \ "id": 21, \ "name": "Sonarr", \ "type": "SONARR", \ "enabled": true, \ "host": "http://sonarr4k:9990/sonarr4k", \ "settings": { \ "apikey": "ARR_API_KEY", \ "basic": { \ "auth": true, \ "username": "USERNAME", \ "password": "NEW_PASSWORD" \ }, \ "external_download_client_id": 1 \ } \ }' ``` -------------------------------- ### Dynamic Tags based on Indexer and Resolution Source: https://autobrr.com/filters/macros Illustrates the creation of dynamic tags using variables like Indexer and Resolution. This allows for automatic tagging of releases based on their source or other metadata, aiding in organization and filtering. ```Go Templating {{ .Indexer }} ``` ```Go Templating {{ .Resolution }} ``` -------------------------------- ### Dynamic Category for Movies with Resolution Source: https://autobrr.com/filters/macros Shows how to create dynamic categories in qBittorrent based on the release's resolution. This is useful for automatically sorting movies into folders corresponding to their resolution (e.g., 'movies-1080p'). ```Go Templating movies-{{ .Resolution }} ``` -------------------------------- ### Add qBittorrent Download Client via API Source: https://autobrr.com/api This snippet demonstrates how to add a new qBittorrent download client using the Autobrr API. It requires the API URL, an API token, and detailed client configuration including host, port, credentials, and specific qBittorrent settings. Ensure the AUTOBRR_API_KEY is valid and the provided host and port are accessible. ```bash curl -X POST 'http://127.0.0.1:7474/api/download_clients' -H 'X-API-Token: AUTOBRR_API_KEY' \ -d '{ \ "name": "qbit", \ "type": "QBITTORRENT", \ "enabled": true, \ "host": "http://172.17.0.1:10963", \ "port": 0, \ "tls": false, \ "tls_skip_verify": false, \ "username": "username", \ "password": "password", \ "settings": { \ "basic": { \ "auth": true, \ "username": "username", \ "password": "password" \ }, \ "rules": { \ "enabled": true, \ "max_active_downloads": 1, \ "ignore_slow_torrents": true, \ "ignore_slow_torrents_condition": "MAX_DOWNLOADS_REACHED", \ "download_speed_threshold": 10000, \ "upload_speed_threshold": 400 \ } \ } \ }' ``` -------------------------------- ### Run Autobrr Manually Source: https://autobrr.com/installation/macos Manually starts the Autobrr application without setting it up as a background service. This is an alternative for users who do not need Autobrr to run continuously in the background. ```shell /opt/homebrew/opt/autobrr/bin/autobrr --config /opt/homebrew/var/autobrr/ ``` -------------------------------- ### Qbittools CLI Commands Source: https://autobrr.com/3rd-party-tools/manage-torrents This section outlines various commands available in the qbittools CLI application for managing qBittorrent instances. It covers functionalities like adding torrents, pausing/unpausing, tagging, re-announcing, updating passkeys, exporting, moving files, and finding orphaned files. These commands can be scheduled using cronjobs or Task Scheduler. ```bash # Add torrents via CLI # qbittools add # Unpause torrents # qbittools unpause # Tagging torrents (e.g., unregistered, not working) # qbittools tagging --filter "unregistered" # Re-announce torrents # qbittools reannounce # Update passkey in bulk # qbittools update passkey # Export torrents by category or tags # qbittools export --category "movies" --output "movies.json" # qbittools export --tag "4k" --output "4k_torrents.csv" # Move torrent files (change category) # qbittools mover --torrent-id --destination "/new/path/" # Find orphaned files (files not associated with any torrent) # qbittools orphaned --check-only ``` -------------------------------- ### Stop autobrr systemd Service (Bash) Source: https://autobrr.com/installation/linux This command stops the autobrr service. This is typically done before upgrading the application. Replace `USERNAME` with the actual user. ```bash sudo systemctl stop autobrr@USERNAME.service ``` -------------------------------- ### Add *arr Download Client via API Source: https://autobrr.com/api This example shows how to add an *arr application (like Sonarr or Radarr) as a download client in Autobrr via the API. It requires the application's host, port, and an API key. Authentication details can also be provided if required by the *arr application. ```bash curl -X POST 'http://127.0.0.1:7474/api/download_clients' -H 'X-API-Token: AUTOBRR_API_KEY' \ -d '{ \ "name": "Sonarr", \ "type": "SONARR", \ "enabled": true, \ "host": "http://sonarr:9989/sonarr", \ "settings": { \ "apikey": "ARR_API_KEY", \ "basic": { \ "auth": true, \ "username": "USERNAME", \ "password": "PASSWORD" \ }, \ "external_download_client_id": 0 \ } \ }' ``` -------------------------------- ### Restart autobrr systemd Service (Bash) Source: https://autobrr.com/installation/linux Restarts the autobrr service. This is necessary after configuration changes, such as modifying the listen address. Replace `USERNAME` with the actual user. ```bash sudo systemctl restart autobrr@USERNAME.service ``` -------------------------------- ### Check autobrr systemd Service Status (Bash) Source: https://autobrr.com/installation/linux This command checks the current status of the autobrr service, indicating whether it is active, inactive, or has encountered errors. Replace `USERNAME` with the actual user. ```bash sudo systemctl status autobrr@USERNAME.service ``` -------------------------------- ### Caddy: Simple Subdomain Reverse Proxy for Autobrr Source: https://autobrr.com/installation/reverse-proxy/caddy This configuration sets up a simple reverse proxy for Autobrr using a subdomain. It forwards all traffic from `autobrr.example.com` to the Autobrr service running on port 7474. ```caddyfile autobrr.example.com { reverse_proxy :7474 } ``` -------------------------------- ### Dynamic Movie Filter with HDR/DV Information Source: https://autobrr.com/filters/macros Demonstrates how to construct a dynamic category filter for movies that includes resolution and HDR information. This allows for more specific organization of HDR or Dolby Vision content. ```Go Templating movies-{{ .Resolution }}{{ if .HDR }}-{{ .HDR }}{{ end }} ``` -------------------------------- ### Example Autobrr Filter Rejection Log Output Source: https://autobrr.com/usage/tips An example of a debug log message from autobrr indicating why a filter rejected an announce. This JSON-formatted output shows the filter name, release details, and specific rejection reasons such as episode mismatch or incorrect release group. ```json {"level":"debug","module":"filter","time":"2023-01-11T17:05:44Z","message":"filter.Service.CheckFilter: (Race - groups) for release: Teppen.Laughing.til.You.Cry.S01.720p.CR.WEB-DL.REPACK.AAC2.0.H.264-SubsPlease rejections: (episodes not matching. got: 0 want: 1-99, release groups not matching. got: SubsPlease want: ggez,glhf,DiRT,cinefeel,casstudio,cmrg,flux,smurf,ntb,kings,plzproper,gossip,playweb,cakes,bae,ggwp,rapidcows,trollhd,playhd,playtv,truffle)"} ``` -------------------------------- ### Read Autobrr Configuration Source: https://autobrr.com/api Retrieves the current autobrr configuration settings. Accepts GET request to '/api/config'. ```curl curl -X GET 'http://127.0.0.1:7474/api/config' -H 'X-API-Token: AUTOBRR_API_TOKEN' | jq ``` -------------------------------- ### List Notification Agents (GET /api/notification) Source: https://autobrr.com/api Retrieves a list of all notification agents configured in your Autobrr instance. ```APIDOC ## GET /api/notification ### Description Retrieves a list of all notification agents configured in your Autobrr instance. ### Method GET ### Endpoint /api/notification ### Parameters None ### Request Example ```bash curl -X GET 'http://127.0.0.1:7474/api/notification' -H 'X-API-Token: AUTOBRR_API_KEY' ``` ### Response #### Success Response (200) - **id** (integer) - Unique identifier for the notification agent. - **name** (string) - The name of the notification agent. - **type** (string) - The type of notification agent (e.g., "DISCORD", "EMAIL"). - **enabled** (boolean) - Whether the notification agent is enabled. - **events** (array) - A list of events the agent is configured to handle. #### Response Example ```json [ { "id": 1, "name": "General Notifications", "type": "DISCORD", "enabled": true, "events": [ "DOWNLOAD", "UPLOAD" ] }, { "id": 2, "name": "Failed Downloads", "type": "EMAIL", "enabled": false, "events": [ "DOWNLOAD_FAILED" ] } ] ``` ``` -------------------------------- ### Stop Autobrr Service Source: https://autobrr.com/installation/macos Stops the Autobrr background service if it is currently running. This is typically done before upgrading Autobrr or making significant configuration changes. ```shell brew services stop autobrr ``` -------------------------------- ### Configure cross-seed with Torznab, Torrent Directory, and Output Directory Source: https://autobrr.com/3rd-party-tools/cross-seed Generates a cross-seed configuration file and sets essential parameters. It requires at least one Torznab URL (from Prowlarr), a torrent directory for existing torrents, and an output directory for new torrent files. The action is set to 'inject' and qBittorrent connection details are provided. ```bash # Generate a cross-seed config file cross-seed gen-config # Open the file nano /home/$USER/.cross-seed/config.js # Make sure the following parameters are set within the config torznab: [ "http://127.0.0.1:9696/1/api?apikey=APIKEY&tracker=Tracker1", "http://127.0.0.1:9696/2/api?apikey=APIKEY&tracker=Tracker2" ], torrentDir: "/home/$USER/.local/share/qBittorrent/BT_backup", outputDir: "/home/$USER/torrentfiles", action: "inject", qbittorrentUrl: "http://user:pass@localhost:port", apiAuth: true ``` -------------------------------- ### List All API Keys Source: https://autobrr.com/api Retrieves a list of all API keys configured in the autobrr instance. Excludes scopes from the output using 'jq'. Accepts GET request to '/api/keys'. ```curl curl -X GET 'http://127.0.0.1:7474/api/keys' -H 'X-API-Token: AUTOBRR_API_KEY' | jq 'map(del(.scopes))' ``` -------------------------------- ### Upgrade Autobrr on macOS Source: https://autobrr.com/installation/macos Upgrades Autobrr to the latest version using Homebrew. This involves updating Homebrew's package lists, upgrading Autobrr, and then restarting the service. ```shell brew update brew upgrade autobrr brew services start autobrr ```