Skip to content

Recyclarr

Overview

Recyclarr is a command-line application designed to automatically synchronize recommended settings from the TRaSH Guides to Sonarr and Radarr instances.


Deployment

sb install sandbox-recyclarr

Usage

Recyclarr runs as a server that stays up and syncs on a schedule. The role generates the API key the server requires, so there is nothing to set up for it.

Configuration

If no configuration file exists, the role creates a starter /opt/recyclarr/recyclarr.yml. It is not functional out of the box; edit it to provision your Sonarr/Radarr details and preferred settings.

  • Configure Sonarr section
sonarr:
  sonarr:
    base_url: http://sonarr:8989
    api_key: your_sonarr_api_key
  • Configure Radarr section
radarr:
  radarr:
    base_url: http://radarr:7878
    api_key: your_radarr_api_key

Follow the configuration reference to complete the configuration. Recyclarr picks up changes to this file within about a minute, without a restart.

Warning

Recyclarr checks every configuration file when it starts and refuses to start if any of them has an error, which shows up as the container restarting in a loop. Run docker logs recyclarr to see what needs fixing.

Schedule

Recyclarr syncs daily at midnight by default. To use a different schedule, set it in /opt/recyclarr/settings.yml using standard cron syntax.

server:
  schedule:
    cron: "0 4 * * *"

Restart the container for the change to take effect.

docker restart recyclarr

Manual sync

docker exec recyclarr recyclarr sync

Role Defaults

Variables can be customized using the Inventory. (1)

  1. Example override

    recyclarr_name: "custom_value"
    

    Avoid overriding variables ending in _default

    When overriding variables that end in _default (like recyclarr_docker_envs_default), you replace the entire default configuration. Future updates that add new default values will not be applied to your setup, potentially breaking functionality.

    Instead, use the corresponding _custom variable (like recyclarr_docker_envs_custom) to add your changes. Custom values are merged with defaults, ensuring you receive updates.

recyclarr_name
# Type: string
recyclarr_name: recyclarr
recyclarr_role_api_key
# Key that protects the Recyclarr server and that its command-line client
# uses to send commands to it. Must be at least 32 characters.
# Type: string
recyclarr_role_api_key: "{{ recyclarr_saltbox_facts.facts.api_key }}"

Container

recyclarr_role_docker_container
# Type: string
recyclarr_role_docker_container: "{{ recyclarr_name }}"

Image

recyclarr_role_docker_image_pull
# Type: bool (true/false)
recyclarr_role_docker_image_pull: true
recyclarr_role_docker_image_repo
# Type: string
recyclarr_role_docker_image_repo: "ghcr.io/recyclarr/recyclarr"
recyclarr_role_docker_image_tag
# Type: string
recyclarr_role_docker_image_tag: "9"
recyclarr_role_docker_image
# Type: string
recyclarr_role_docker_image: "{{ lookup('role_var', '_docker_image_repo', role='recyclarr') }}:{{ lookup('role_var', '_docker_image_tag', role='recyclarr') }}"

Envs

recyclarr_role_docker_envs_default
# Type: dict
recyclarr_role_docker_envs_default:
  TZ: "{{ tz }}"
  RECYCLARR_API_KEY: "{{ lookup('role_var', '_api_key', role='recyclarr') }}"
recyclarr_role_docker_envs_custom
# Type: dict
recyclarr_role_docker_envs_custom: {}

Volumes

recyclarr_role_docker_volumes_default
# Type: list
recyclarr_role_docker_volumes_default:
  - "{{ lookup('role_var', '_paths_location', role='recyclarr') }}:/config"
recyclarr_role_docker_volumes_custom
# Type: list
recyclarr_role_docker_volumes_custom: []

Hostname

recyclarr_role_docker_hostname
# Type: string
recyclarr_role_docker_hostname: "{{ recyclarr_name }}"

Networks

recyclarr_role_docker_networks_alias
# Type: string
recyclarr_role_docker_networks_alias: "{{ recyclarr_name }}"
recyclarr_role_docker_networks_default
# Type: list
recyclarr_role_docker_networks_default: []
recyclarr_role_docker_networks_custom
# Type: list
recyclarr_role_docker_networks_custom: []

Restart Policy

recyclarr_role_docker_restart_policy
# Type: string
recyclarr_role_docker_restart_policy: unless-stopped

User

recyclarr_role_docker_user
# Type: string
recyclarr_role_docker_user: "{{ uid }}:{{ gid }}"

The following advanced options are available via create_docker_container but are not defined in the role. See: docker_container module

A blank value is YAML null and inherits any lower-precedence role or shared default. Explicit Ansible omit is accepted only for optional Docker settings; default-backed and required settings reject it. Use the documented typed empty value, such as "", [], or {}, when disabling a guaranteed setting.

GPU

recyclarr_role_docker_gpu_enabled
# Set this to true to let the app use a GPU.
# Intel access also requires gpu.intel: true.
# NVIDIA access also requires nvidia_enabled: true.
# This setting does not install or enable GPU support on the server.
# Type: bool (true/false)
recyclarr_role_docker_gpu_enabled: false
recyclarr_role_docker_nvidia_disabled
# Set this to true to turn off automatic NVIDIA access for this app.
# It only has an effect when the app's _docker_gpu_enabled option and
# nvidia_enabled are both true.
# Automatic /dev/dri access may remain.
# Type: bool (true/false)
recyclarr_role_docker_nvidia_disabled: false
recyclarr_role_docker_dev_dri_disabled
# Set this to true to stop Saltbox from automatically sharing the
# server's /dev/dri video devices with this app.
# It only has an effect when the app's _docker_gpu_enabled option is true
# and either gpu.intel or nvidia_enabled is true.
# NVIDIA-specific access may remain.
# Type: bool (true/false)
recyclarr_role_docker_dev_dri_disabled: false

Resource Limits

recyclarr_role_docker_blkio_weight
# Type: int
recyclarr_role_docker_blkio_weight:
recyclarr_role_docker_cpu_period
# Type: int
recyclarr_role_docker_cpu_period:
recyclarr_role_docker_cpu_quota
# Type: int
recyclarr_role_docker_cpu_quota:
recyclarr_role_docker_cpu_shares
# Type: int
recyclarr_role_docker_cpu_shares:
recyclarr_role_docker_cpus
# CPU allocation accepted as a numeric string, such as 1.5
# Type: string (quoted number)
recyclarr_role_docker_cpus:
recyclarr_role_docker_cpuset_cpus
# Type: string
recyclarr_role_docker_cpuset_cpus:
recyclarr_role_docker_cpuset_mems
# Type: string
recyclarr_role_docker_cpuset_mems:
recyclarr_role_docker_kernel_memory
# Type: string
recyclarr_role_docker_kernel_memory:
recyclarr_role_docker_memory
# Type: string
recyclarr_role_docker_memory:
recyclarr_role_docker_memory_reservation
# Type: string
recyclarr_role_docker_memory_reservation:
recyclarr_role_docker_memory_swap
# Type: string
recyclarr_role_docker_memory_swap:
recyclarr_role_docker_memory_swappiness
# Type: int
recyclarr_role_docker_memory_swappiness:
recyclarr_role_docker_shm_size
# Type: string
recyclarr_role_docker_shm_size:

Security & Devices

recyclarr_role_docker_cap_drop
# Type: list
recyclarr_role_docker_cap_drop:
recyclarr_role_docker_cgroupns_mode
# Type: string
recyclarr_role_docker_cgroupns_mode:
recyclarr_role_docker_device_cgroup_rules
# Type: list
recyclarr_role_docker_device_cgroup_rules:
recyclarr_role_docker_device_read_bps
# Type: list
recyclarr_role_docker_device_read_bps:
recyclarr_role_docker_device_read_iops
# Type: list
recyclarr_role_docker_device_read_iops:
recyclarr_role_docker_device_requests
# Type: list
recyclarr_role_docker_device_requests:
recyclarr_role_docker_device_write_bps
# Type: list
recyclarr_role_docker_device_write_bps:
recyclarr_role_docker_device_write_iops
# Type: list
recyclarr_role_docker_device_write_iops:
recyclarr_role_docker_devices
# Type: list
recyclarr_role_docker_devices:
recyclarr_role_docker_groups
# Type: list
recyclarr_role_docker_groups:
recyclarr_role_docker_privileged
# Type: bool (true/false)
recyclarr_role_docker_privileged:
recyclarr_role_docker_security_opts
# Type: list
recyclarr_role_docker_security_opts:
recyclarr_role_docker_userns_mode
# Type: string
recyclarr_role_docker_userns_mode:

Networking

recyclarr_role_docker_dns_opts
# Type: list
recyclarr_role_docker_dns_opts:
recyclarr_role_docker_dns_search_domains
# Type: list
recyclarr_role_docker_dns_search_domains:
recyclarr_role_docker_dns_servers
# Type: list
recyclarr_role_docker_dns_servers:
recyclarr_role_docker_domainname
# Type: string
recyclarr_role_docker_domainname:
recyclarr_role_docker_exposed_ports
# Type: list
recyclarr_role_docker_exposed_ports:
recyclarr_role_docker_hosts
# Type: dict
recyclarr_role_docker_hosts:
recyclarr_role_docker_hosts_use_common
# Type: bool (true/false)
recyclarr_role_docker_hosts_use_common:
recyclarr_role_docker_ipc_mode
# Type: string
recyclarr_role_docker_ipc_mode:
recyclarr_role_docker_links
# Type: list
recyclarr_role_docker_links:
recyclarr_role_docker_network_mode
# Type: string
recyclarr_role_docker_network_mode:
recyclarr_role_docker_pid_mode
# Type: string
recyclarr_role_docker_pid_mode:
recyclarr_role_docker_ports
# Type: list
recyclarr_role_docker_ports:
recyclarr_role_docker_uts
# Type: string
recyclarr_role_docker_uts:

Storage

recyclarr_role_docker_keep_volumes
# Type: bool (true/false)
recyclarr_role_docker_keep_volumes:
recyclarr_role_docker_mounts
# Type: list
recyclarr_role_docker_mounts:
recyclarr_role_docker_storage_opts
# Type: dict
recyclarr_role_docker_storage_opts:
recyclarr_role_docker_tmpfs
# Type: list
recyclarr_role_docker_tmpfs:
recyclarr_role_docker_volume_driver
# Type: string
recyclarr_role_docker_volume_driver:
recyclarr_role_docker_volumes_from
# Type: list
recyclarr_role_docker_volumes_from:
recyclarr_role_docker_volumes_global
# Type: bool (true/false)
recyclarr_role_docker_volumes_global:
recyclarr_role_docker_working_dir
# Type: string
recyclarr_role_docker_working_dir:

Monitoring & Lifecycle

recyclarr_role_docker_auto_remove
# Type: bool (true/false)
recyclarr_role_docker_auto_remove:
recyclarr_role_docker_cleanup
# Type: bool (true/false)
recyclarr_role_docker_cleanup:
recyclarr_role_docker_force_kill
# Type: bool (true/false)
recyclarr_role_docker_force_kill:
recyclarr_role_docker_healthcheck
# Type: dict
recyclarr_role_docker_healthcheck:
recyclarr_role_docker_healthy_wait_timeout
# Healthy-state wait timeout in seconds
# Type: int
recyclarr_role_docker_healthy_wait_timeout:
recyclarr_role_docker_init
# Type: bool (true/false)
recyclarr_role_docker_init:
recyclarr_role_docker_kill_signal
# Type: string
recyclarr_role_docker_kill_signal:
recyclarr_role_docker_log_driver
# Type: string
recyclarr_role_docker_log_driver:
recyclarr_role_docker_log_options
# Type: dict
recyclarr_role_docker_log_options:
recyclarr_role_docker_oom_killer
# Type: bool (true/false)
recyclarr_role_docker_oom_killer:
recyclarr_role_docker_oom_score_adj
# Type: int
recyclarr_role_docker_oom_score_adj:
recyclarr_role_docker_output_logs
# Type: bool (true/false)
recyclarr_role_docker_output_logs:
recyclarr_role_docker_paused
# Type: bool (true/false)
recyclarr_role_docker_paused:
recyclarr_role_docker_recreate
# Type: bool (true/false)
recyclarr_role_docker_recreate:
recyclarr_role_docker_restart_retries
# Type: int
recyclarr_role_docker_restart_retries:
recyclarr_role_docker_stop_signal
# Type: string
recyclarr_role_docker_stop_signal:
recyclarr_role_docker_stop_timeout
# Type: int
recyclarr_role_docker_stop_timeout:

Other Options

recyclarr_role_docker_capabilities
# Type: list
recyclarr_role_docker_capabilities:
recyclarr_role_docker_cgroup_parent
# Type: string
recyclarr_role_docker_cgroup_parent:
recyclarr_role_docker_commands
# Type: list
recyclarr_role_docker_commands:
recyclarr_role_docker_create_timeout
# Type: int
recyclarr_role_docker_create_timeout:
recyclarr_role_docker_entrypoint
# Type: list
recyclarr_role_docker_entrypoint:
recyclarr_role_docker_env_file
# Type: string
recyclarr_role_docker_env_file:
recyclarr_role_docker_labels
# Type: dict
recyclarr_role_docker_labels:
recyclarr_role_docker_labels_use_common
# Type: bool (true/false)
recyclarr_role_docker_labels_use_common:
recyclarr_role_docker_read_only
# Type: bool (true/false)
recyclarr_role_docker_read_only:
recyclarr_role_docker_runtime
# Type: string
recyclarr_role_docker_runtime:
recyclarr_role_docker_sysctls
# Type: dict
recyclarr_role_docker_sysctls:
recyclarr_role_docker_ulimits
# Type: list
recyclarr_role_docker_ulimits:
recyclarr_role_autoheal_enabled
# Enable or disable Autoheal monitoring for the container created when deploying
# Type: bool (true/false)
recyclarr_role_autoheal_enabled: true
recyclarr_role_depends_on
# List of container dependencies that must be running before the container start
# Type: string
recyclarr_role_depends_on: ""
recyclarr_role_depends_on_delay
# Delay in seconds before starting the container after dependencies are ready
# Type: string (quoted number)
recyclarr_role_depends_on_delay: "0"
recyclarr_role_depends_on_healthchecks
# Enable healthcheck waiting for container dependencies
# Type: string ("true"/"false")
recyclarr_role_depends_on_healthchecks:
recyclarr_role_diun_enabled
# Enable or disable Diun update notifications for the container created when deploying
# Type: bool (true/false)
recyclarr_role_diun_enabled: true
recyclarr_role_docker_controller
# Enable or disable Saltbox Docker Controller management for the container
# Type: bool (true/false)
recyclarr_role_docker_controller: true
recyclarr_role_docker_networks_alias_custom
# Type: list
recyclarr_role_docker_networks_alias_custom:
recyclarr_role_docker_volumes_download
# Type: bool (true/false)
recyclarr_role_docker_volumes_download:
recyclarr_role_paths_folders_list_custom
# Extra directories to create
# Type: list
recyclarr_role_paths_folders_list_custom:
recyclarr_role_paths_group
# Group for directories created by the role
# Type: string
recyclarr_role_paths_group:
recyclarr_role_paths_owner
# Owner for directories created by the role
# Type: string
recyclarr_role_paths_owner:
recyclarr_role_paths_permissions
# Permissions for directories created by the role
# Type: string
recyclarr_role_paths_permissions:
recyclarr_role_paths_recursive
# Apply owner and group recursively without changing child modes
# Type: bool (true/false)
recyclarr_role_paths_recursive: