Skip to content

Threadfin

Description / nameInput element
Your domain name

Overview

Threadfin is a M3U proxy server for Plex, Emby and any client and provider which supports the .TS and .M3U8 (HLS) streaming formats.


Deployment

sb install sandbox-threadfin

Usage

Visit https://threadfin.iYOUR_DOMAIN_NAMEi/web.

Basics

  • Access Threadfin web GUI at https://threadfin.iYOUR_DOMAIN_NAMEi/web

  • Run through the Configuration Wizard.

  • Use the following URLs when configuring your media server (e.g. Plex, Emby, Jellyfin)

  • HDHomerun Device Address (Plex) http://threadfin:34400

  • Playlist (Emby, Jellyfin) http://threadfin:34400/m3u/threadfin.m3u

  • EPG (all) http://threadfin:34400/xmltv/threadfin.xml

Role Defaults

Use the Inventory to customize variables. (1)

  1. Example override

    threadfin_name: "custom_value"
    

    Avoid overriding variables ending in _default

    When overriding variables that end in _default (like threadfin_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 threadfin_docker_envs_custom) to add your changes. Custom values are merged with defaults, ensuring you receive updates.

threadfin_name
# Type: string
threadfin_name: threadfin
threadfin_role_web_subdomain
# Type: string
threadfin_role_web_subdomain: "{{ threadfin_name }}"
threadfin_role_web_domain
# Type: string
threadfin_role_web_domain: "{{ user.domain }}"
threadfin_role_web_port
# Type: string
threadfin_role_web_port: "34400"
threadfin_role_web_url
# Type: string
threadfin_role_web_url: "{{ 'https://' + (lookup('role_var', '_web_subdomain', role='threadfin') + '.' + lookup('role_var', '_web_domain', role='threadfin')
                         if (lookup('role_var', '_web_subdomain', role='threadfin') | length > 0)
                         else lookup('role_var', '_web_domain', role='threadfin')) }}"
threadfin_role_dns_record
# Type: string
threadfin_role_dns_record: "{{ lookup('role_var', '_web_subdomain', role='threadfin') }}"
threadfin_role_dns_zone
# Type: string
threadfin_role_dns_zone: "{{ lookup('role_var', '_web_domain', role='threadfin') }}"
threadfin_role_dns_proxy
# Type: bool (true/false)
threadfin_role_dns_proxy: "{{ dns_proxied }}"
threadfin_role_traefik_sso_middleware
# Type: string
threadfin_role_traefik_sso_middleware: "{{ traefik_default_sso_middleware }}"
threadfin_role_traefik_middleware_default
# Type: string
threadfin_role_traefik_middleware_default: "{{ traefik_default_middleware }}"
threadfin_role_traefik_certresolver
# Type: string
threadfin_role_traefik_certresolver: "{{ traefik_default_certresolver }}"
threadfin_role_traefik_enabled
# Type: bool (true/false)
threadfin_role_traefik_enabled: true
threadfin_role_traefik_api_enabled
# Type: bool (true/false)
threadfin_role_traefik_api_enabled: true
threadfin_role_traefik_api_endpoint
# Type: string
threadfin_role_traefik_api_endpoint: "PathPrefix(`/api`) || PathPrefix(`/images`) || PathPrefix(`/data_images`)"

Container

threadfin_role_docker_container
# Type: string
threadfin_role_docker_container: "{{ threadfin_name }}"

Image

threadfin_role_docker_image_pull
# Type: bool (true/false)
threadfin_role_docker_image_pull: true
threadfin_role_docker_image_repo
# Type: string
threadfin_role_docker_image_repo: "fyb3roptik/threadfin"
threadfin_role_docker_image_tag
# Type: string
threadfin_role_docker_image_tag: "latest"
threadfin_role_docker_image
# Type: string
threadfin_role_docker_image: "{{ lookup('role_var', '_docker_image_repo', role='threadfin') }}:{{ lookup('role_var', '_docker_image_tag', role='threadfin') }}"

Envs

threadfin_role_docker_envs_default
# Type: dict
threadfin_role_docker_envs_default:
  TZ: "{{ tz }}"
  THREADFIN_BRANCH: "main"
  THREADFIN_DEBUG: "0"
threadfin_role_docker_envs_custom
# Type: dict
threadfin_role_docker_envs_custom: {}

Volumes

threadfin_role_docker_volumes_default
# Type: list
threadfin_role_docker_volumes_default:
  - "{{ lookup('role_var', '_paths_location', role='threadfin') }}:/home/threadfin/conf"
threadfin_role_docker_volumes_custom
# Type: list
threadfin_role_docker_volumes_custom: []

Hostname

threadfin_role_docker_hostname
# Type: string
threadfin_role_docker_hostname: "{{ threadfin_name }}"

Networks

threadfin_role_docker_networks_alias
# Type: string
threadfin_role_docker_networks_alias: "{{ threadfin_name }}"
threadfin_role_docker_networks_default
# Type: list
threadfin_role_docker_networks_default: []
threadfin_role_docker_networks_custom
# Type: list
threadfin_role_docker_networks_custom: []

Restart Policy

threadfin_role_docker_restart_policy
# Type: string
threadfin_role_docker_restart_policy: unless-stopped

State

threadfin_role_docker_state
# Type: string
threadfin_role_docker_state: started

User

threadfin_role_docker_user
# Type: string
threadfin_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

Resource Limits

threadfin_role_docker_blkio_weight
# Type: int
threadfin_role_docker_blkio_weight:
threadfin_role_docker_cpu_period
# Type: int
threadfin_role_docker_cpu_period:
threadfin_role_docker_cpu_quota
# Type: int
threadfin_role_docker_cpu_quota:
threadfin_role_docker_cpu_shares
# Type: int
threadfin_role_docker_cpu_shares:
threadfin_role_docker_cpus
# Type: string
threadfin_role_docker_cpus:
threadfin_role_docker_cpuset_cpus
# Type: string
threadfin_role_docker_cpuset_cpus:
threadfin_role_docker_cpuset_mems
# Type: string
threadfin_role_docker_cpuset_mems:
threadfin_role_docker_kernel_memory
# Type: string
threadfin_role_docker_kernel_memory:
threadfin_role_docker_memory
# Type: string
threadfin_role_docker_memory:
threadfin_role_docker_memory_reservation
# Type: string
threadfin_role_docker_memory_reservation:
threadfin_role_docker_memory_swap
# Type: string
threadfin_role_docker_memory_swap:
threadfin_role_docker_memory_swappiness
# Type: int
threadfin_role_docker_memory_swappiness:
threadfin_role_docker_shm_size
# Type: string
threadfin_role_docker_shm_size:

Security & Devices

threadfin_role_docker_cap_drop
# Type: list
threadfin_role_docker_cap_drop:
threadfin_role_docker_cgroupns_mode
# Type: string
threadfin_role_docker_cgroupns_mode:
threadfin_role_docker_device_cgroup_rules
# Type: list
threadfin_role_docker_device_cgroup_rules:
threadfin_role_docker_device_read_bps
# Type: list
threadfin_role_docker_device_read_bps:
threadfin_role_docker_device_read_iops
# Type: list
threadfin_role_docker_device_read_iops:
threadfin_role_docker_device_requests
# Type: list
threadfin_role_docker_device_requests:
threadfin_role_docker_device_write_bps
# Type: list
threadfin_role_docker_device_write_bps:
threadfin_role_docker_device_write_iops
# Type: list
threadfin_role_docker_device_write_iops:
threadfin_role_docker_devices
# Type: list
threadfin_role_docker_devices:
threadfin_role_docker_devices_default
# Type: string
threadfin_role_docker_devices_default:
threadfin_role_docker_groups
# Type: list
threadfin_role_docker_groups:
threadfin_role_docker_privileged
# Type: bool (true/false)
threadfin_role_docker_privileged:
threadfin_role_docker_security_opts
# Type: list
threadfin_role_docker_security_opts:
threadfin_role_docker_userns_mode
# Type: string
threadfin_role_docker_userns_mode:

Networking

threadfin_role_docker_dns_opts
# Type: list
threadfin_role_docker_dns_opts:
threadfin_role_docker_dns_search_domains
# Type: list
threadfin_role_docker_dns_search_domains:
threadfin_role_docker_dns_servers
# Type: list
threadfin_role_docker_dns_servers:
threadfin_role_docker_domainname
# Type: string
threadfin_role_docker_domainname:
threadfin_role_docker_exposed_ports
# Type: list
threadfin_role_docker_exposed_ports:
threadfin_role_docker_hosts
# Type: dict
threadfin_role_docker_hosts:
threadfin_role_docker_hosts_use_common
# Type: bool (true/false)
threadfin_role_docker_hosts_use_common:
threadfin_role_docker_ipc_mode
# Type: string
threadfin_role_docker_ipc_mode:
threadfin_role_docker_links
# Type: list
threadfin_role_docker_links:
threadfin_role_docker_network_mode
# Type: string
threadfin_role_docker_network_mode:
threadfin_role_docker_pid_mode
# Type: string
threadfin_role_docker_pid_mode:
threadfin_role_docker_ports
# Type: list
threadfin_role_docker_ports:
threadfin_role_docker_uts
# Type: string
threadfin_role_docker_uts:

Storage

threadfin_role_docker_keep_volumes
# Type: bool (true/false)
threadfin_role_docker_keep_volumes:
threadfin_role_docker_mounts
# Type: list
threadfin_role_docker_mounts:
threadfin_role_docker_storage_opts
# Type: dict
threadfin_role_docker_storage_opts:
threadfin_role_docker_tmpfs
# Type: list
threadfin_role_docker_tmpfs:
threadfin_role_docker_volume_driver
# Type: string
threadfin_role_docker_volume_driver:
threadfin_role_docker_volumes_from
# Type: list
threadfin_role_docker_volumes_from:
threadfin_role_docker_volumes_global
# Type: bool (true/false)
threadfin_role_docker_volumes_global:
threadfin_role_docker_working_dir
# Type: string
threadfin_role_docker_working_dir:

Monitoring & Lifecycle

threadfin_role_docker_auto_remove
# Type: bool (true/false)
threadfin_role_docker_auto_remove:
threadfin_role_docker_cleanup
# Type: bool (true/false)
threadfin_role_docker_cleanup:
threadfin_role_docker_force_kill
# Type: string
threadfin_role_docker_force_kill:
threadfin_role_docker_healthcheck
# Type: dict
threadfin_role_docker_healthcheck:
threadfin_role_docker_healthy_wait_timeout
# Type: int
threadfin_role_docker_healthy_wait_timeout:
threadfin_role_docker_init
# Type: bool (true/false)
threadfin_role_docker_init:
threadfin_role_docker_kill_signal
# Type: string
threadfin_role_docker_kill_signal:
threadfin_role_docker_log_driver
# Type: string
threadfin_role_docker_log_driver:
threadfin_role_docker_log_options
# Type: dict
threadfin_role_docker_log_options:
threadfin_role_docker_oom_killer
# Type: bool (true/false)
threadfin_role_docker_oom_killer:
threadfin_role_docker_oom_score_adj
# Type: int
threadfin_role_docker_oom_score_adj:
threadfin_role_docker_output_logs
# Type: bool (true/false)
threadfin_role_docker_output_logs:
threadfin_role_docker_paused
# Type: bool (true/false)
threadfin_role_docker_paused:
threadfin_role_docker_recreate
# Type: bool (true/false)
threadfin_role_docker_recreate:
threadfin_role_docker_restart_retries
# Type: int
threadfin_role_docker_restart_retries:
threadfin_role_docker_stop_timeout
# Type: int
threadfin_role_docker_stop_timeout:

Other Options

threadfin_role_docker_capabilities
# Type: list
threadfin_role_docker_capabilities:
threadfin_role_docker_cgroup_parent
# Type: string
threadfin_role_docker_cgroup_parent:
threadfin_role_docker_commands
# Type: list
threadfin_role_docker_commands:
threadfin_role_docker_create_timeout
# Type: int
threadfin_role_docker_create_timeout:
threadfin_role_docker_entrypoint
# Type: string
threadfin_role_docker_entrypoint:
threadfin_role_docker_env_file
# Type: string
threadfin_role_docker_env_file:
threadfin_role_docker_labels
# Type: dict
threadfin_role_docker_labels:
threadfin_role_docker_labels_use_common
# Type: bool (true/false)
threadfin_role_docker_labels_use_common:
threadfin_role_docker_read_only
# Type: bool (true/false)
threadfin_role_docker_read_only:
threadfin_role_docker_runtime
# Type: string
threadfin_role_docker_runtime:
threadfin_role_docker_sysctls
# Type: list
threadfin_role_docker_sysctls:
threadfin_role_docker_ulimits
# Type: list
threadfin_role_docker_ulimits:
threadfin_role_autoheal_enabled
# Enable or disable Autoheal monitoring for the container created when deploying
# Type: bool (true/false)
threadfin_role_autoheal_enabled: true
threadfin_role_depends_on
# List of container dependencies that must be running before the container start
# Type: string
threadfin_role_depends_on: ""
threadfin_role_depends_on_delay
# Delay in seconds before starting the container after dependencies are ready
# Type: string (quoted number)
threadfin_role_depends_on_delay: "0"
threadfin_role_depends_on_healthchecks
# Enable healthcheck waiting for container dependencies
# Type: string ("true"/"false")
threadfin_role_depends_on_healthchecks:
threadfin_role_diun_enabled
# Enable or disable Diun update notifications for the container created when deploying
# Type: bool (true/false)
threadfin_role_diun_enabled: true
threadfin_role_dns_enabled
# Enable or disable automatic DNS record creation for the container
# Type: bool (true/false)
threadfin_role_dns_enabled: true
threadfin_role_docker_controller
# Enable or disable Saltbox Docker Controller management for the container
# Type: bool (true/false)
threadfin_role_docker_controller: true
threadfin_role_docker_image_repo
# Type: string
threadfin_role_docker_image_repo:
threadfin_role_docker_image_tag
# Type: string
threadfin_role_docker_image_tag:
threadfin_role_docker_volumes_download
# Type: bool (true/false)
threadfin_role_docker_volumes_download:
threadfin_role_paths_location
# Type: string
threadfin_role_paths_location:
threadfin_role_themepark_addons
# Type: string
threadfin_role_themepark_addons:
threadfin_role_themepark_app
# Type: string
threadfin_role_themepark_app:
threadfin_role_themepark_theme
# Type: string
threadfin_role_themepark_theme:
threadfin_role_traefik_api_endpoint
# Type: dict/omit
threadfin_role_traefik_api_endpoint:
threadfin_role_traefik_api_middleware
# Type: string
threadfin_role_traefik_api_middleware:
threadfin_role_traefik_api_middleware_http
# Type: string
threadfin_role_traefik_api_middleware_http:
threadfin_role_traefik_autodetect_enabled
# Enable Traefik autodetect middleware for the container
# Type: bool (true/false)
threadfin_role_traefik_autodetect_enabled: false
threadfin_role_traefik_certresolver
# Type: string
threadfin_role_traefik_certresolver:
threadfin_role_traefik_crowdsec_enabled
# Enable CrowdSec middleware for the container
# Type: bool (true/false)
threadfin_role_traefik_crowdsec_enabled: false
threadfin_role_traefik_error_pages_enabled
# Enable custom error pages middleware for the container
# Type: bool (true/false)
threadfin_role_traefik_error_pages_enabled: false
threadfin_role_traefik_gzip_enabled
# Enable gzip compression middleware for the container
# Type: bool (true/false)
threadfin_role_traefik_gzip_enabled: false
threadfin_role_traefik_middleware_http
# Type: string
threadfin_role_traefik_middleware_http:
threadfin_role_traefik_middleware_http_api_insecure
# Type: bool (true/false)
threadfin_role_traefik_middleware_http_api_insecure:
threadfin_role_traefik_middleware_http_insecure
# Type: bool (true/false)
threadfin_role_traefik_middleware_http_insecure:
threadfin_role_traefik_priority
# Type: string
threadfin_role_traefik_priority:
threadfin_role_traefik_robot_enabled
# Enable robots.txt middleware for the container
# Type: bool (true/false)
threadfin_role_traefik_robot_enabled: true
threadfin_role_traefik_tailscale_enabled
# Enable Tailscale-specific Traefik configuration for the container
# Type: bool (true/false)
threadfin_role_traefik_tailscale_enabled: false
threadfin_role_traefik_wildcard_enabled
# Enable wildcard certificate for the container
# Type: bool (true/false)
threadfin_role_traefik_wildcard_enabled: true
threadfin_role_web_domain
# Type: string
threadfin_role_web_domain:
threadfin_role_web_fqdn_override
# Override the Traefik fully qualified domain name (FQDN) for the container
# Type: list
threadfin_role_web_fqdn_override:

Example Override

threadfin_role_web_fqdn_override:
  - "{{ traefik_host }}"
  - "threadfin2.{{ user.domain }}"
  - "threadfin.otherdomain.tld"

Note: Include {{ traefik_host }} to preserve the default FQDN alongside your custom entries

threadfin_role_web_host_override
# Override the Traefik web host configuration for the container
# Type: string
threadfin_role_web_host_override:

Example Override

threadfin_role_web_host_override: "Host(`{{ traefik_host }}`) || Host(`{{ 'threadfin2.' + user.domain }}`)"

Note: Use {{ traefik_host }} to include the default host configuration in your custom rule

threadfin_role_web_http_port
# Type: string (quoted number)
threadfin_role_web_http_port:
threadfin_role_web_http_scheme
# Type: string ("http"/"https")
threadfin_role_web_http_scheme:
threadfin_role_web_http_serverstransport
# Type: dict/omit
threadfin_role_web_http_serverstransport:
threadfin_role_web_scheme
# URL scheme to use for web access to the container
# Type: string ("http"/"https")
threadfin_role_web_scheme:
threadfin_role_web_serverstransport
# Type: dict/omit
threadfin_role_web_serverstransport:
threadfin_role_web_subdomain
# Type: string
threadfin_role_web_subdomain: