Skip to main content

Application Configuration

This is where to learn what each config item is, the default values for each item, and the name to use in an environment variable. Expand the blue sections to see excerpts from the example docker-compose.yml and example config files.

Config

  • Setting a log file is strongly recommend. This makes it much easier to troubleshoot problems.
  • To use a config file in Docker, mount /config to the container and Unpackerr will write a config file.
    • Update the new file at /config/unpackerr.conf and restart the container.
  • When using a config file you must uncomment at minimum the [[header]] ex. [[radarr]], url and api_key.
  • Uncomment means remove the hash # at the beginning of the line.
  • The config file format is TOML.
    • Indentation is not important like YAML files, but it's used for ease of readability.
    • You may use " or ' or ''' or """ to wrap strings. Recommend ' for paths.

Generator

Notifiarr hosts a configuration file maker. Simply fill in a web form, and click a button to get a working config file.

Two+ Instances

When adding a second (or third+) instance to the config file, you just add another [[header]] ex. [[sonarr]] and the url/api_key/etc under it. When adding a second instance to the environment variables, you must increment the 0 to a 1. And to a 2 if you have 3 instances. There is no limit to the number of supported instances. This notation works for all starr apps, folders, command hooks, and web hooks.

Config examples with multiple instances.
  • Config File example with two Radarrs and two Folders.
[[radarr]]
url = "http://radarr"
api_key = "32characters"

[[radarr]]
url = "http://radarr4k"
api_key = "32morecharacters"

[[folder]]
path = "/data/downloads/software/"

[[folder]]
path = "/data/downloads/games/"
  • Environment Variable example with two Radarrs and two Folders setting the same values as above.
UN_RADARR_0_URL=http://radarr
UN_RADARR_0_API_KEY=32characters
UN_RADARR_1_URL=http://radarr4k
UN_RADARR_1_API_KEY=32morecharacters
UN_FOLDER_0_PATH=/data/downloads/software/
UN_FOLDER_1_PATH=/data/downloads/games/

Anything that has a header with double brackets [[..]] can be repeated as many times as you'd like.

Global Settings

Examples. Prefix: UN_
  • Using the config file:
#######################################################
## Unpackerr Example Configuration File ##
#######################################################
## The values are a mix of defaults and examples. ##
## Environment Variables may override all values. ##
## More configuration help: https://unpackerr.zip ##
## Config Generator: https://notifiarr.com/unpackerr ##
#######################################################

## Turn on debug messages in the output. Do not wrap this in quotes.
## Recommend trying this so you know what it looks like. I personally leave it on.
debug = false

## Disable writing messages to stdout/stderr. This silences the app. Set a log
## file below if you set this to true. Recommended when starting with systemctl.
quiet = false

## Send error output to stderr instead of stdout by setting error_stderr to true.
## Recommend leaving this at false. Ignored if quiet (above) is true.
error_stderr = false

## Setting activity to true will silence all app queue log lines with only zeros.
## Set this to true when you want less log spam.
activity = false

## The Starr-application activity queue is logged on an interval.
## Adjust that interval with this setting.
## Default is a minute. 2m, 5m, 10m, 30m, 1h are also perfectly acceptable.
log_queues = "1m"

## Write messages to a log file. This is the same data that is normally output to stdout.
## This setting is great for Docker users that want to export their logs to a file.
## The alternative is to use syslog to log the output of the application to a file.
## Default is no log file; this is unset.
## Except on macOS and Windows, the log file gets set to "~/.unpackerr/unpackerr.log"
## log_files=0 turns off auto-rotation.
## Default files is 10 and size(mb) is 10 Megabytes; both doubled if debug is true.
log_file = '/downloads/unpackerr.log'
log_files = 10
log_file_mb = 10

## How often to poll starr apps (sonarr, radarr, etc).
## Recommend 1m-5m. Uses Go Duration.
interval = "2m"

## How long an item must be queued (download complete) before extraction will start.
## One minute is the historic default and works well. Set higher if your downloads
## take longer to finalize (or transfer locally). Uses Go Duration.
start_delay = "1m"

## How long to wait before removing the history for a failed extraction.
## Once the history is deleted the item will be recognized as new and
## extraction will start again. Uses Go Duration.
retry_delay = "5m"

## How many times to retry a failed extraction. Pauses retry_delay between attempts.
max_retries = 3

## How many files may be extracted in parallel. 1 works fine.
## Do not wrap the number in quotes. Raise this only if you have fast disks and CPU.
parallel = 1

## Use these configurations to control the file modes used for newly extracted
## files and folders. Recommend 0644/0755 or 0666/0777.
file_mode = "0644"
dir_mode = "0755"
  • Using environment variables:
## Global Settings
UN_DEBUG=false
UN_QUIET=false
UN_ERROR_STDERR=false
UN_ACTIVITY=false
UN_LOG_QUEUES=1m
UN_LOG_FILE=/downloads/unpackerr.log
UN_LOG_FILES=10
UN_LOG_FILE_MB=10
UN_INTERVAL=2m
UN_START_DELAY=1m
UN_RETRY_DELAY=5m
UN_MAX_RETRIES=3
UN_PARALLEL=1
UN_FILE_MODE=0644
UN_DIR_MODE=0755

These values must exist at the top of the config file. If you put them anywhere else they may be attached to a [header] inadvertently. When using environment variables, you can simply omit the ones you don't set or change from default.

Config NameVariable NameDefault / Note
debugUN_DEBUGfalse / Turns on more logs.
quietUN_QUIETfalse / Do not print logs to stdout or stderr.
error_stderrUN_ERROR_STDERRfalse / Print ERROR lines to stderr instead of stdout.
activityUN_ACTIVITYfalse / Setting true will print only queue counts with activity.
log_queuesUN_LOG_QUEUES"1m" / How often to print internal counters. Uses Go Duration.
log_fileUN_LOG_FILENo Default / Provide optional file path to write logs
log_filesUN_LOG_FILES10 / Log files to keep after rotating. 0 disables rotation
log_file_mbUN_LOG_FILE_MB10 / Max size of log files in megabytes
intervalUN_INTERVAL"2m" / How often apps are polled, recommend 1m to 5m.
start_delayUN_START_DELAY"1m" / Files are queued at least this long before extraction.
retry_delayUN_RETRY_DELAY"5m" / Failed extractions are retried after at least this long.
max_retriesUN_MAX_RETRIES3 / Failed extractions are retried after at least this long.
parallelUN_PARALLEL1 / Concurrent extractions, only recommend 1
file_modeUN_FILE_MODE"0644" / Extracted files are written with this mode.
dir_modeUN_DIR_MODE"0755" / Extracted folders are written with this mode

Secrets and Passwords

If a wrong password is provided, the entire archive must be read before we know it's a bad password. Providing many passwords here can drastically slow down extractions and cause extra disk IO. You may also specify a password file by providing a "password" in this format: filepath:/path/to/passwords.txt. The file must contain 1 password per line.

Other Secrets

You may store any string parameter (except time intervals) into a separate file by setting the value to filepath:/path/to/file.txt. In other words, if you want your Radarr API key to be read from a separate file, instead of storing it directly in the config file or environment variables you can do this:

[[radarr]]
url = "https://some.url/radarr"
api_key = "filepath:/etc/secrets/radarr.txt"

Or if using environment variables:

UN_RADARR_0_API_KEY=filepath:/etc/secrets/radarr.txt

Then store the API key (and only the API key) in /etc/secrets/radarr.txt.

This feature was added in Unpackerr v0.14.0.

Web Server

Examples. Prefix: UN_WEBSERVER_, Header: [webserver]
  • Using the config file:
[webserver]
## The web server currently only supports metrics; set this to true if you wish to use it.
metrics = false
## This may be set to a port or an ip:port to bind a specific IP. 0.0.0.0 binds ALL IPs.
listen_addr = "0.0.0.0:5656"
## Recommend setting a log file for HTTP requests. Otherwise, they go with other logs.
log_file = ''
## This app automatically rotates logs. Set these to the size and number to keep.
log_files = 10
log_file_mb = 10
## Set both of these to valid file paths to enable HTTPS/TLS.
ssl_cert_file = ''
ssl_key_file = ''
## Base URL from which to serve content.
urlbase = "/"
## Upstreams should be set to the IP or CIDR of your trusted upstream proxy.
## Setting this correctly allows X-Forwarded-For to be used in logs.
## In the future it may control auth proxy trust. Must be a list of strings.
## example: upstreams = [ "127.0.0.1/32", "10.1.2.0/24" ]
upstreams = []
  • Using environment variables:
## Web Server
UN_WEBSERVER_METRICS=false
UN_WEBSERVER_LISTEN_ADDR=0.0.0.0:5656
UN_WEBSERVER_LOG_FILE=
UN_WEBSERVER_LOG_FILES=10
UN_WEBSERVER_LOG_FILE_MB=10
UN_WEBSERVER_SSL_CERT_FILE=
UN_WEBSERVER_SSL_KEY_FILE=
UN_WEBSERVER_URLBASE=/
UN_WEBSERVER_UPSTREAMS=
Metrics

The web server currently only provides prometheus metrics, which you can display in Grafana. It provides no UI. This may change in the future. The web server was added in v0.12.0.

Config NameVariable NameDefault / Note
metricsUN_WEBSERVER_METRICSfalse / Extracted folders are written with this mode
listen_addrUN_WEBSERVER_LISTEN_ADDR"0.0.0.0:5656" / ip:port to listen on; 0.0.0.0 is all IPs.
log_fileUN_WEBSERVER_LOG_FILENo Default / Provide optional file path to write HTTP logs.
log_filesUN_WEBSERVER_LOG_FILES10 / Log files to keep after rotating. 0 to disable.
log_file_mbUN_WEBSERVER_LOG_FILE_MB10 / Max size of HTTP log files in megabytes
ssl_cert_fileUN_WEBSERVER_SSL_CERT_FILENo Default / Path to SSL cert file to serve HTTPS.
ssl_key_fileUN_WEBSERVER_SSL_KEY_FILENo Default / Path to SSL key file to serve HTTPS.
urlbaseUN_WEBSERVER_URLBASE"/" / Base URL path to serve HTTP content.
upstreamsUN_WEBSERVER_UPSTREAMS[] / List of upstream proxy CIDRs or IPs to trust.

Folder Settings

Examples. Prefix: UN_FOLDERS_, Header: [folders]
  • Using the config file:
## Global Folder configuration that affects all watched folders.
[folders]
## How often poller checks for new folders.
## The default of `0s` will disable the poller on all systems except Docker.
## Set this value to `1ms` to disable it in Docker.
interval = "0s"
## How many new folder events can be immediately queued. Don't change this.
buffer = 20000
  • Using environment variables:
## Folder Settings
UN_FOLDERS_INTERVAL=1s
UN_FOLDERS_BUFFER=20000
Config NameVariable NameDefault / Note
intervalUN_FOLDERS_INTERVAL"0s" / How often poller checks for new folders. Use 1ms to disable it.
bufferUN_FOLDERS_BUFFER20000 / How many new folder events can be immediately queued.

Sonarr Settings

Examples. Prefix: UN_SONARR_, Header: [[sonarr]]
  • Using the config file:
## Leaving the [[sonarr]] header uncommented (no leading hash #) without also
## uncommenting the api_key (remove the hash #) will produce a startup warning.
[[sonarr]]
url = "http://127.0.0.1:8989"
api_key = "0123456789abcdef0123456789abcdef"
## List of paths where content is downloaded for this app.
## Used as fallback if the path the Starr app reports does not exist or is not accessible.
paths = ['/downloads']
## Default protocols is torrent. Alternative: "torrent,usenet"
protocols = "torrent"
## How long to wait for a reply from the backend.
timeout = "10s"
## How long to wait after import before deleting the extracted items.
delete_delay = "5m"
## If you use this app with NZB you may wish to delete archives after extraction.
## General recommendation is: do not enable this for torrent use.
## Setting this to true deletes the entire original download folder after import.
delete_orig = false
## If you use Syncthing, setting this to true will make unpackerr wait for syncs to finish.
syncthing = false
  • Using environment variables:
## Sonarr Settings
UN_SONARR_0_URL=http://sonarr:8989
UN_SONARR_0_API_KEY=0123456789abcdef0123456789abcdef
UN_SONARR_0_PATHS_0=/downloads
UN_SONARR_0_PROTOCOLS=torrent
UN_SONARR_0_TIMEOUT=10s
UN_SONARR_0_DELETE_DELAY=5m
UN_SONARR_0_DELETE_ORIG=false
UN_SONARR_0_SYNCTHING=false
Config NameVariable NameDefault / Note
urlUN_SONARR_URLNo Default / URL where this starr app can be accessed.
api_keyUN_SONARR_API_KEYNo Default / Provide URL and API key if you use this app.
pathsUN_SONARR_PATHS_0["/downloads"] / File system path where downloaded items are located.
protocolsUN_SONARR_PROTOCOLS"torrent" / Protocols to process. Alt: torrent,usenet
timeoutUN_SONARR_TIMEOUT"10s" / How long to wait for the app to respond.
delete_delayUN_SONARR_DELETE_DELAY"5m" / Extracts are deleted this long after import, -1s to disable.
delete_origUN_SONARR_DELETE_ORIGfalse / Delete archives after import? Recommend keeping this false.
syncthingUN_SONARR_SYNCTHINGfalse / Setting this to true makes unpackerr wait for syncthing to finish.

Radarr Settings

Examples. Prefix: UN_RADARR_, Header: [[radarr]]
  • Using the config file:
## Leaving the [[radarr]] header uncommented (no leading hash #) without also
## uncommenting the api_key (remove the hash #) will produce a startup warning.
[[radarr]]
url = "http://127.0.0.1:7878"
api_key = "0123456789abcdef0123456789abcdef"
## List of paths where content is downloaded for this app.
## Used as fallback if the path the Starr app reports does not exist or is not accessible.
paths = ['/downloads']
## Default protocols is torrent. Alternative: "torrent,usenet"
protocols = "torrent"
## How long to wait for a reply from the backend.
timeout = "10s"
## How long to wait after import before deleting the extracted items.
delete_delay = "5m"
## If you use this app with NZB you may wish to delete archives after extraction.
## General recommendation is: do not enable this for torrent use.
## Setting this to true deletes the entire original download folder after import.
delete_orig = false
## If you use Syncthing, setting this to true will make unpackerr wait for syncs to finish.
syncthing = false
  • Using environment variables:
## Radarr Settings
UN_RADARR_0_URL=http://radarr:7878
UN_RADARR_0_API_KEY=0123456789abcdef0123456789abcdef
UN_RADARR_0_PATHS_0=/downloads
UN_RADARR_0_PROTOCOLS=torrent
UN_RADARR_0_TIMEOUT=10s
UN_RADARR_0_DELETE_DELAY=5m
UN_RADARR_0_DELETE_ORIG=false
UN_RADARR_0_SYNCTHING=false
Config NameVariable NameDefault / Note
urlUN_RADARR_URLNo Default / URL where this starr app can be accessed.
api_keyUN_RADARR_API_KEYNo Default / Provide URL and API key if you use this app.
pathsUN_RADARR_PATHS_0["/downloads"] / File system path where downloaded items are located.
protocolsUN_RADARR_PROTOCOLS"torrent" / Protocols to process. Alt: torrent,usenet
timeoutUN_RADARR_TIMEOUT"10s" / How long to wait for the app to respond.
delete_delayUN_RADARR_DELETE_DELAY"5m" / Extracts are deleted this long after import, -1s to disable.
delete_origUN_RADARR_DELETE_ORIGfalse / Delete archives after import? Recommend keeping this false.
syncthingUN_RADARR_SYNCTHINGfalse / Setting this to true makes unpackerr wait for syncthing to finish.

Lidarr Settings

Examples. Prefix: UN_LIDARR_, Header: [[lidarr]]
  • Using the config file:
[[lidarr]]
url = "http://127.0.0.1:8686"
api_key = "0123456789abcdef0123456789abcdef"
## List of paths where content is downloaded for this app.
## Used as fallback if the path the Starr app reports does not exist or is not accessible.
paths = ['/downloads']
## Default protocols is torrent. Alternative: "torrent,usenet"
protocols = "torrent"
## How long to wait for a reply from the backend.
timeout = "10s"
## How long to wait after import before deleting the extracted items.
delete_delay = "5m"
## If you use this app with NZB you may wish to delete archives after extraction.
## General recommendation is: do not enable this for torrent use.
## Setting this to true deletes the entire original download folder after import.
delete_orig = false
## If you use Syncthing, setting this to true will make unpackerr wait for syncs to finish.
syncthing = false
  • Using environment variables:
## Lidarr Settings
UN_LIDARR_0_URL=http://lidarr:8686
UN_LIDARR_0_API_KEY=0123456789abcdef0123456789abcdef
UN_LIDARR_0_PATHS_0=/downloads
UN_LIDARR_0_PROTOCOLS=torrent
UN_LIDARR_0_TIMEOUT=10s
UN_LIDARR_0_DELETE_DELAY=5m
UN_LIDARR_0_DELETE_ORIG=false
UN_LIDARR_0_SYNCTHING=false
Config NameVariable NameDefault / Note
urlUN_LIDARR_URLNo Default / URL where this starr app can be accessed.
api_keyUN_LIDARR_API_KEYNo Default / Provide URL and API key if you use this app.
pathsUN_LIDARR_PATHS_0["/downloads"] / File system path where downloaded items are located.
protocolsUN_LIDARR_PROTOCOLS"torrent" / Protocols to process. Alt: torrent,usenet
timeoutUN_LIDARR_TIMEOUT"10s" / How long to wait for the app to respond.
delete_delayUN_LIDARR_DELETE_DELAY"5m" / Extracts are deleted this long after import, -1s to disable.
delete_origUN_LIDARR_DELETE_ORIGfalse / Delete archives after import? Recommend keeping this false.
syncthingUN_LIDARR_SYNCTHINGfalse / Setting this to true makes unpackerr wait for syncthing to finish.

Readarr Settings

Examples. Prefix: UN_READARR_, Header: [[readarr]]
  • Using the config file:
[[readarr]]
url = "http://127.0.0.1:8787"
api_key = "0123456789abcdef0123456789abcdef"
## List of paths where content is downloaded for this app.
## Used as fallback if the path the Starr app reports does not exist or is not accessible.
paths = ['/downloads']
## Default protocols is torrent. Alternative: "torrent,usenet"
protocols = "torrent"
## How long to wait for a reply from the backend.
timeout = "10s"
## How long to wait after import before deleting the extracted items.
delete_delay = "5m"
## If you use this app with NZB you may wish to delete archives after extraction.
## General recommendation is: do not enable this for torrent use.
## Setting this to true deletes the entire original download folder after import.
delete_orig = false
## If you use Syncthing, setting this to true will make unpackerr wait for syncs to finish.
syncthing = false
  • Using environment variables:
## Readarr Settings
UN_READARR_0_URL=http://readarr:8787
UN_READARR_0_API_KEY=0123456789abcdef0123456789abcdef
UN_READARR_0_PATHS_0=/downloads
UN_READARR_0_PROTOCOLS=torrent
UN_READARR_0_TIMEOUT=10s
UN_READARR_0_DELETE_DELAY=5m
UN_READARR_0_DELETE_ORIG=false
UN_READARR_0_SYNCTHING=false
Config NameVariable NameDefault / Note
urlUN_READARR_URLNo Default / URL where this starr app can be accessed.
api_keyUN_READARR_API_KEYNo Default / Provide URL and API key if you use this app.
pathsUN_READARR_PATHS_0["/downloads"] / File system path where downloaded items are located.
protocolsUN_READARR_PROTOCOLS"torrent" / Protocols to process. Alt: torrent,usenet
timeoutUN_READARR_TIMEOUT"10s" / How long to wait for the app to respond.
delete_delayUN_READARR_DELETE_DELAY"5m" / Extracts are deleted this long after import, -1s to disable.
delete_origUN_READARR_DELETE_ORIGfalse / Delete archives after import? Recommend keeping this false.
syncthingUN_READARR_SYNCTHINGfalse / Setting this to true makes unpackerr wait for syncthing to finish.

Whisparr Settings

Examples. Prefix: UN_WHISPARR_, Header: [[whisparr]]
  • Using the config file:
[[whisparr]]
url = "http://127.0.0.1:6969"
api_key = "0123456789abcdef0123456789abcdef"
## List of paths where content is downloaded for this app.
## Used as fallback if the path the Starr app reports does not exist or is not accessible.
paths = ['/downloads']
## Default protocols is torrent. Alternative: "torrent,usenet"
protocols = "torrent"
## How long to wait for a reply from the backend.
timeout = "10s"
## How long to wait after import before deleting the extracted items.
delete_delay = "5m"
## If you use this app with NZB you may wish to delete archives after extraction.
## General recommendation is: do not enable this for torrent use.
## Setting this to true deletes the entire original download folder after import.
delete_orig = false
## If you use Syncthing, setting this to true will make unpackerr wait for syncs to finish.
syncthing = false
  • Using environment variables:
## Whisparr Settings
UN_WHISPARR_0_URL=http://whisparr:6969
UN_WHISPARR_0_API_KEY=0123456789abcdef0123456789abcdef
UN_WHISPARR_0_PATHS_0=/downloads
UN_WHISPARR_0_PROTOCOLS=torrent
UN_WHISPARR_0_TIMEOUT=10s
UN_WHISPARR_0_DELETE_DELAY=5m
UN_WHISPARR_0_DELETE_ORIG=false
UN_WHISPARR_0_SYNCTHING=false
Config NameVariable NameDefault / Note
urlUN_WHISPARR_URLNo Default / URL where this starr app can be accessed.
api_keyUN_WHISPARR_API_KEYNo Default / Provide URL and API key if you use this app.
pathsUN_WHISPARR_PATHS_0["/downloads"] / File system path where downloaded items are located.
protocolsUN_WHISPARR_PROTOCOLS"torrent" / Protocols to process. Alt: torrent,usenet
timeoutUN_WHISPARR_TIMEOUT"10s" / How long to wait for the app to respond.
delete_delayUN_WHISPARR_DELETE_DELAY"5m" / Extracts are deleted this long after import, -1s to disable.
delete_origUN_WHISPARR_DELETE_ORIGfalse / Delete archives after import? Recommend keeping this false.
syncthingUN_WHISPARR_SYNCTHINGfalse / Setting this to true makes unpackerr wait for syncthing to finish.

Watch Folders

Examples. Prefix: UN_FOLDER_, Header: [[folder]]
  • Using the config file:
##################################################################################
### ### STOP HERE ### STOP HERE ### STOP HERE ### STOP HERE #### STOP HERE ### #
### Only using Starr apps? The things above. The below configs are OPTIONAL. ### #
##################################################################################


##-Folders-#######################################################################
## This application can also watch folders for things to extract. If you copy a ##
## subfolder into a watched folder (defined below) any extractable items in the ##
## folder will be decompressed. This has nothing to do with Starr applications. ##
##################################################################################
[[folder]]
path = '/downloads/auto_extract'
## Path to extract files to. The default (leaving this blank) is the same as `path` (above).
extract_path = ''
## Delete extracted or original files this long after extraction.
## The default is 0. Set to 0 to disable all deletes. Uncomment it to enable deletes. Uses Go Duration.
delete_after = "10m"
## Unpackerr extracts archives inside archives. Set this to true to disable recursive extractions.
disable_recursion = false
## Delete extracted files after successful extraction? Honors delete_after.
delete_files = false
## Delete original items after successful extraction? Honors delete_after.
delete_original = false
## Disable extraction log (unpackerred.txt) file creation?
disable_log = false
## Move extracted files into original folder? If false, files go into an _unpackerred folder.
move_back = false
## Set this to true if you want this app to extract ISO files with .iso extension.
extract_isos = false
  • Using environment variables:
## Watch Folders
UN_FOLDER_0_PATH=/downloads/auto_extract
UN_FOLDER_0_EXTRACT_PATH=
UN_FOLDER_0_DELETE_AFTER=10m
UN_FOLDER_0_DISABLE_RECURSION=false
UN_FOLDER_0_DELETE_FILES=false
UN_FOLDER_0_DELETE_ORIGINAL=false
UN_FOLDER_0_DISABLE_LOG=false
UN_FOLDER_0_MOVE_BACK=false
UN_FOLDER_0_EXTRACT_ISOS=false

Folders are a way to watch a folder for things to extract. You can use this to monitor your download client's "move to" path if you're not using it with an Starr app.

Config NameVariable NameDefault / Note
pathUN_FOLDER_PATHNo Default / Folder to watch for archives. Not for Starr apps.
extract_pathUN_FOLDER_EXTRACT_PATHNo Default / Where to extract to. Uses path if not set.
delete_afterUN_FOLDER_DELETE_AFTER"10m" / Delete requested files after this duration; 0 disables.
disable_recursionUN_FOLDER_DISABLE_RECURSIONfalse / Setting this to true disables extracting archives inside archives.
delete_filesUN_FOLDER_DELETE_FILESfalse / Delete extracted files after successful extraction.
delete_originalUN_FOLDER_DELETE_ORIGINALfalse / Delete archives after successful extraction.
disable_logUN_FOLDER_DISABLE_LOGfalse / Turns off creation of extraction logs files for this folder.
move_backUN_FOLDER_MOVE_BACKfalse / Move extracted items back into original folder.
extract_isosUN_FOLDER_EXTRACT_ISOSfalse / Setting this to true enables .iso file extraction.

Web Hooks

Examples. Prefix: UN_WEBHOOK_, Header: [[webhook]]
  • Using the config file:
################
### Webhooks ###
################
# Sends a webhook when an extraction queues, starts, finishes, and/or is deleted.
# Created to integrate with notifiarr.com.
# Also works natively with Discord.com, Telegram.org, and Slack.com webhooks.
# Can possibly be used with other services by providing a custom template_path.
###### Don't forget to uncomment [[webhook]] and url at a minimum !!!!
[[webhook]]
url = "https://notifiarr.com/api/v1/notification/unpackerr/api_key_from_notifiarr_com"
## Provide an optional name to hide the URL in logs.
## If a name is not provided then the URL is used.
name = ""
## Do not log success (less log spam).
silent = false
## List of event ids to send notification for, [0] for all.
## The default is [0] and this is an example:
events = [1, 4, 6]
## ===> Advanced Optional Webhook Configuration <===
## Used in Discord and Slack templates as bot name, in Telegram as chat_id.
nickname = "Unpackerr"
## Also passed into templates. Used in Slack templates for destination channel.
channel = ""
## List of apps to exclude. None by default. This is an example:
exclude = ["readarr", "lidarr"]
## Override internal webhook template for discord.com or other hooks.
template_path = ''
## Override automatic template detection. Values: notifiarr, discord, telegram, gotify, pushover, slack
template = ""
## Set this to true to ignore the SSL certificate on the server.
ignore_ssl = false
## You can adjust how long to wait for a server response.
timeout = "10s"
## If your custom template uses another MIME type, set this.
content_type = "application/json"
  • Using environment variables:
## Web Hooks
UN_WEBHOOK_0_URL=https://notifiarr.com/api/v1/notification/unpackerr/api_key_from_notifiarr_com
UN_WEBHOOK_0_NAME=
UN_WEBHOOK_0_SILENT=false
UN_WEBHOOK_0_EVENTS_0=1
UN_WEBHOOK_0_EVENTS_1=4
UN_WEBHOOK_0_EVENTS_2=6
UN_WEBHOOK_0_NICKNAME=Unpackerr
UN_WEBHOOK_0_CHANNEL=
UN_WEBHOOK_0_EXCLUDE_0=readarr
UN_WEBHOOK_0_EXCLUDE_1=lidarr
UN_WEBHOOK_0_TEMPLATE_PATH=
UN_WEBHOOK_0_TEMPLATE=
UN_WEBHOOK_0_IGNORE_SSL=false
UN_WEBHOOK_0_TIMEOUT=10s
UN_WEBHOOK_0_CONTENT_TYPE=application/json

This application can send a POST webhook to a URL when an extraction begins, and again when it finishes. Configure 1 or more webhook URLs with the parameters below. Works great with notifiarr.com. You can use requestbin.com to test and see the payload.

Config NameVariable NameDefault / Note
urlUN_WEBHOOK_URLNo Default / URL to send POST webhook to.
nameUN_WEBHOOK_NAMENo Default / Provide an optional name to hide the URL in logs.
silentUN_WEBHOOK_SILENTfalse / Hide successful POSTs from logs.
eventsUN_WEBHOOK_EVENTS_0[0] / List of event ids to send notification for, 0 for all.
nicknameUN_WEBHOOK_NICKNAME"Unpackerr" / Passed into templates for telegram, discord and slack hooks.
channelUN_WEBHOOK_CHANNELNo Default / Passed into templates for slack.com webhooks.
excludeUN_WEBHOOK_EXCLUDE_0[] / List of apps to exclude: radarr, sonarr, folders, etc.
template_pathUN_WEBHOOK_TEMPLATE_PATHNo Default / Instead of an internal template, provide your own.
templateUN_WEBHOOK_TEMPLATENo Default / Instead of auto template selection, force a built-in template.
ignore_sslUN_WEBHOOK_IGNORE_SSLfalse / Ignore invalid SSL certificates.
timeoutUN_WEBHOOK_TIMEOUT"10s" / How long to wait for server response.
content_typeUN_WEBHOOK_CONTENT_TYPE"application/json" / Content-Type header sent to webhook.

Notes for Web Hooks

  • Nickname should equal the chat_id value in Telegram webhooks.
  • Channel is used as destination channel for Slack. It's not used in others.
  • Nickname and Channel may be used as custom values in custom templates.
  • Name is only used in logs, but it's also available as a template value as {{name}}.
  • Built-In Templates: pushover, telegram, discord, notifiarr, slack, gotify.

Command Hooks

Examples. Prefix: UN_CMDHOOK_, Header: [[cmdhook]]
  • Using the config file:
#####################
### Command Hooks ###
#####################
# Executes a script or command when an extraction queues, starts, finishes, and/or is deleted.
# All data is passed in as environment variables. Try /usr/bin/env to see what variables are available.
###### Don't forget to uncomment [[cmdhook]] at a minimum !!!!
[[cmdhook]]
command = '/downloads/scripts/command.sh'
## Provide an optional name to hide the URL in logs.
## If a name is not provided the first word in the command is used.
name = ""
## Runs the command inside /bin/sh ('nix) or cmd.exe (Windows).
shell = false
## Do not log command's output.
silent = false
## List of event ids to run command for, [0] for all.
## The default is [0] and this is an example:
events = [1, 4, 7]
## ===> Optional Command Hook Configuration <===
## List of apps to exclude. None by default. This is an example:
exclude = ["readarr", "lidarr"]
## You can adjust how long to wait for the command to run.
timeout = "10s"
  • Using environment variables:
## Command Hooks
UN_CMDHOOK_0_COMMAND=/downloads/scripts/command.sh
UN_CMDHOOK_0_NAME=
UN_CMDHOOK_0_SHELL=false
UN_CMDHOOK_0_SILENT=false
UN_CMDHOOK_0_EVENTS_0=1
UN_CMDHOOK_0_EVENTS_1=4
UN_CMDHOOK_0_EVENTS_2=7
UN_CMDHOOK_0_EXCLUDE_0=readarr
UN_CMDHOOK_0_EXCLUDE_1=lidarr
UN_CMDHOOK_0_TIMEOUT=10s

Unpackerr can execute commands (or scripts) before and after an archive extraction. The only thing required is a command. Name is optional, and used in logs only. Setting shell to true executes your command after /bin/sh -c or cmd.exe /c on Windows.

Config NameVariable NameDefault / Note
commandUN_CMDHOOK_COMMANDNo Default / Command to run.
nameUN_CMDHOOK_NAMENo Default / Name for logs, otherwise uses first word in command.
shellUN_CMDHOOK_SHELLfalse / Run command inside a shell.
silentUN_CMDHOOK_SILENTfalse / Hide command output from logs.
eventsUN_CMDHOOK_EVENTS_0[0] / List of event ids to run command for, 0 for all.
excludeUN_CMDHOOK_EXCLUDE_0[] / List of apps to exclude: radarr, sonarr, folders, etc.
timeoutUN_CMDHOOK_TIMEOUT"10s" / How long to wait for the command to run.

All extraction data is input to the command using environment variables, see example below. Extracted files variables names begin with UN_DATA_FILES_. Try /usr/bin/env as an example command to see what variables are available.

Example Output Variables
UN_DATA_OUTPUT=folder/subfolder_unpackerred
UN_PATH=folder/subfolder
UN_DATA_START=2021-10-04T23:04:27.849216-07:00
UN_REVISION=
UN_EVENT=extracted
UN_GO=go1.17
UN_DATA_ARCHIVES=folder/subfolder_unpackerred/Funjetting.rar,folder/subfolder_unpackerred/Funjetting.r00,folder/subfolder/files.zip
UN_DATA_ARCHIVE_2=folder/subfolder/files.zip
UN_DATA_ARCHIVE_1=folder/subfolder_unpackerred/Funjetting.r00
UN_DATA_ARCHIVE_0=folder/subfolder_unpackerred/Funjetting.rar
UN_DATA_FILES=folder/subfolder/Funjetting.mp3,folder/subfolder/Funjetting.r00,folder/subfolder/Funjetting.rar,folder/subfolder/_unpackerred.subfolder.txt
UN_DATA_FILE_1=folder/subfolder/Funjetting.r00
UN_DATA_BYTES=2407624
PWD=/Users/david/go/src/github.com/Unpackerr/unpackerr
UN_DATA_FILE_0=folder/subfolder/Funjetting.mp3
UN_OS=darwin
UN_DATA_FILE_3=folder/subfolder/_unpackerred.subfolder.txt
UN_DATA_FILE_2=folder/subfolder/Funjetting.rar
UN_BRANCH=
UN_TIME=2021-10-04T23:04:27.869613-07:00
UN_VERSION=
UN_DATA_QUEUE=0
SHLVL=1
UN_APP=Folder
UN_STARTED=2021-10-04T23:03:22.849253-07:00
UN_ARCH=amd64
UN_DATA_ELAPSED=20.365752ms
UN_DATA_ERROR=

Event IDs

Event IDs are needed/used in command hooks and webhooks.

0 = all, 1 = queued, 2 = extracting, 3 = extract failed, 4 = extracted, 5 = imported, 6 = deleting, 7 = delete failed, 8 = deleted, 9 = nothing extracted

The 'nothing extracted' event (9) only fires for the folder watcher, not starr apps.


This page was generated automatically, 12 SEP 2024 23:48 UTC