Skip to content

Funkwhale

Description / nameInput element
Your domain name

Overview

Funkwhale is a modern, self-hosted, free and open-source music server.


Deployment

sb install sandbox-funkwhale

Usage

Visit https://funkwhale.iYOUR_DOMAIN_NAMEi.

Basics

  • First create the superuser

  • docker exec -it funkwhale manage createsuperuser
    (for ease of access, set it as your Saltbox user and password.)

  • enter the exit command when finished to return to your server's shell.

  • Now configure these settings via the web GUI

  • Access Funkwhale, visit https://funkwhale.iYOUR_DOMAIN_NAMEi and log in with the user and password you just created.

  • Enter Music->Add Content->Create a new Library and fill out the information.
  • Enter your new Library and Details. There will be a sharing link such as: https://funkwhale.domain.com/federation/music/libraries/da8bd97b-3c3f-4e7b-92cb-6ba45721837b
  • Copy out the last portion: da8bd97b-3c3f-4e7b-92cb-6ba45721837b

  • Return to the shell session to import music library

  • docker exec -it funkwhale /usr/bin/python3 /app/api/manage.py import_files da8bd97b-3c3f-4e7b-92cb-6ba45721837b "/music/Media/Audio/Music/**/**/*.flac" --in-place --async --recursive

The above line explained:

  • docker exec -it funkwhale /usr/bin/python3 /app/api/manage.py import_files tells funkwhale to import music.
  • da8bd97b-3c3f-4e7b-92cb-6ba45721837b is your library id
  • "/music/Media/Audio/Music/**/**/*.flac" is the path to your media.
  • --in-place means do not copy the media into Funkwhale and leave it where it is.
  • --async means it will import the music first and then pull the metadata`
  • --recursive will recursively scan the folders

If everything goes as planned you'll get prompted like this:

> Checking imported paths against settings.MUSIC_DIRECTORY_PATH
> Import summary:
> - 149828 files found matching this pattern: ['/music/Media/Audio/Music/**/**/*.flac']

> - 0 files already found in database
> - 149828 new files
> Selected options: in place
> Are you sure you want to do this?
> Type 'yes' to continue, or 'no' to cancel:
  • Answer yes at the prompt and the import will begin.

Info

Useful URLs
Libraries URL: https://funkwhale.domain.com/content/libraries/
Admin Account Edit Page: https://funkwhale.domain.com/api/admin/users/user/1/change/

Info

If you want to use subsonic clients then you'll need to set a password here:
https://funkwhale.domain.com/settings (subsonic protocol requires storing password in cleartext, so to avoid compromising your Funkwhale account, we use a different password).

Role Defaults

Use the Inventory to customize variables. (1)

  1. Example override

    funkwhale_name: "custom_value"
    

    Avoid overriding variables ending in _default

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

funkwhale_name
# Type: string
funkwhale_name: funkwhale
funkwhale_role_web_subdomain
# Type: string
funkwhale_role_web_subdomain: "{{ funkwhale_name }}"
funkwhale_role_web_domain
# Type: string
funkwhale_role_web_domain: "{{ user.domain }}"
funkwhale_role_web_port
# Type: string
funkwhale_role_web_port: "80"
funkwhale_role_web_url
# Type: string
funkwhale_role_web_url: "{{ 'https://' + (lookup('role_var', '_web_subdomain', role='funkwhale') + '.' + lookup('role_var', '_web_domain', role='funkwhale')
                         if (lookup('role_var', '_web_subdomain', role='funkwhale') | length > 0)
                         else lookup('role_var', '_web_domain', role='funkwhale')) }}"
funkwhale_role_dns_record
# Type: string
funkwhale_role_dns_record: "{{ lookup('role_var', '_web_subdomain', role='funkwhale') }}"
funkwhale_role_dns_zone
# Type: string
funkwhale_role_dns_zone: "{{ lookup('role_var', '_web_domain', role='funkwhale') }}"
funkwhale_role_dns_proxy
# Type: bool (true/false)
funkwhale_role_dns_proxy: "{{ dns_proxied }}"
funkwhale_role_traefik_sso_middleware
# Type: string
funkwhale_role_traefik_sso_middleware: ""
funkwhale_role_traefik_middleware_default
# Type: string
funkwhale_role_traefik_middleware_default: "{{ traefik_default_middleware }}"
funkwhale_role_traefik_middleware_custom
# Type: string
funkwhale_role_traefik_middleware_custom: ""
funkwhale_role_traefik_certresolver
# Type: string
funkwhale_role_traefik_certresolver: "{{ traefik_default_certresolver }}"
funkwhale_role_traefik_enabled
# Type: bool (true/false)
funkwhale_role_traefik_enabled: true
funkwhale_role_traefik_api_enabled
# Type: bool (true/false)
funkwhale_role_traefik_api_enabled: false
funkwhale_role_traefik_api_endpoint
# Type: string
funkwhale_role_traefik_api_endpoint: ""

Container

funkwhale_role_docker_container
# Type: string
funkwhale_role_docker_container: "{{ funkwhale_name }}"

Image

funkwhale_role_docker_image_pull
# Type: bool (true/false)
funkwhale_role_docker_image_pull: true
funkwhale_role_docker_image_repo
# Type: string
funkwhale_role_docker_image_repo: "funkwhale/all-in-one"
funkwhale_role_docker_image_tag
# Type: string
funkwhale_role_docker_image_tag: "latest"
funkwhale_role_docker_image
# Type: string
funkwhale_role_docker_image: "{{ lookup('role_var', '_docker_image_repo', role='funkwhale') }}:{{ lookup('role_var', '_docker_image_tag', role='funkwhale') }}"

Envs

funkwhale_role_docker_envs_default
# Type: dict
funkwhale_role_docker_envs_default:
  FUNKWHALE_HOSTNAME: "{{ lookup('role_var', '_web_subdomain', role='funkwhale') + '.' + lookup('role_var', '_web_domain', role='funkwhale') }}"
  NESTED_PROXY: "1"
  PUID: "{{ uid }}"
  PGID: "{{ gid }}"
  TZ: "{{ tz }}"
funkwhale_role_docker_envs_custom
# Type: dict
funkwhale_role_docker_envs_custom: {}

Volumes

funkwhale_role_docker_volumes_default
# Type: list
funkwhale_role_docker_volumes_default:
  - "{{ lookup('role_var', '_paths_location', role='funkwhale') }}/data:/data"
  - "/mnt/unionfs:/music:ro"
funkwhale_role_docker_volumes_custom
# Type: list
funkwhale_role_docker_volumes_custom: []

Hostname

funkwhale_role_docker_hostname
# Type: string
funkwhale_role_docker_hostname: "{{ funkwhale_name }}"

Networks

funkwhale_role_docker_networks_alias
# Type: string
funkwhale_role_docker_networks_alias: "{{ funkwhale_name }}"
funkwhale_role_docker_networks_default
# Type: list
funkwhale_role_docker_networks_default: []
funkwhale_role_docker_networks_custom
# Type: list
funkwhale_role_docker_networks_custom: []

Restart Policy

funkwhale_role_docker_restart_policy
# Type: string
funkwhale_role_docker_restart_policy: unless-stopped

State

funkwhale_role_docker_state
# Type: string
funkwhale_role_docker_state: started

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

Resource Limits

funkwhale_role_docker_blkio_weight
# Type: int
funkwhale_role_docker_blkio_weight:
funkwhale_role_docker_cpu_period
# Type: int
funkwhale_role_docker_cpu_period:
funkwhale_role_docker_cpu_quota
# Type: int
funkwhale_role_docker_cpu_quota:
funkwhale_role_docker_cpu_shares
# Type: int
funkwhale_role_docker_cpu_shares:
funkwhale_role_docker_cpus
# Type: string
funkwhale_role_docker_cpus:
funkwhale_role_docker_cpuset_cpus
# Type: string
funkwhale_role_docker_cpuset_cpus:
funkwhale_role_docker_cpuset_mems
# Type: string
funkwhale_role_docker_cpuset_mems:
funkwhale_role_docker_kernel_memory
# Type: string
funkwhale_role_docker_kernel_memory:
funkwhale_role_docker_memory
# Type: string
funkwhale_role_docker_memory:
funkwhale_role_docker_memory_reservation
# Type: string
funkwhale_role_docker_memory_reservation:
funkwhale_role_docker_memory_swap
# Type: string
funkwhale_role_docker_memory_swap:
funkwhale_role_docker_memory_swappiness
# Type: int
funkwhale_role_docker_memory_swappiness:
funkwhale_role_docker_shm_size
# Type: string
funkwhale_role_docker_shm_size:

Security & Devices

funkwhale_role_docker_cap_drop
# Type: list
funkwhale_role_docker_cap_drop:
funkwhale_role_docker_cgroupns_mode
# Type: string
funkwhale_role_docker_cgroupns_mode:
funkwhale_role_docker_device_cgroup_rules
# Type: list
funkwhale_role_docker_device_cgroup_rules:
funkwhale_role_docker_device_read_bps
# Type: list
funkwhale_role_docker_device_read_bps:
funkwhale_role_docker_device_read_iops
# Type: list
funkwhale_role_docker_device_read_iops:
funkwhale_role_docker_device_requests
# Type: list
funkwhale_role_docker_device_requests:
funkwhale_role_docker_device_write_bps
# Type: list
funkwhale_role_docker_device_write_bps:
funkwhale_role_docker_device_write_iops
# Type: list
funkwhale_role_docker_device_write_iops:
funkwhale_role_docker_devices
# Type: list
funkwhale_role_docker_devices:
funkwhale_role_docker_devices_default
# Type: string
funkwhale_role_docker_devices_default:
funkwhale_role_docker_groups
# Type: list
funkwhale_role_docker_groups:
funkwhale_role_docker_privileged
# Type: bool (true/false)
funkwhale_role_docker_privileged:
funkwhale_role_docker_security_opts
# Type: list
funkwhale_role_docker_security_opts:
funkwhale_role_docker_user
# Type: string
funkwhale_role_docker_user:
funkwhale_role_docker_userns_mode
# Type: string
funkwhale_role_docker_userns_mode:

Networking

funkwhale_role_docker_dns_opts
# Type: list
funkwhale_role_docker_dns_opts:
funkwhale_role_docker_dns_search_domains
# Type: list
funkwhale_role_docker_dns_search_domains:
funkwhale_role_docker_dns_servers
# Type: list
funkwhale_role_docker_dns_servers:
funkwhale_role_docker_domainname
# Type: string
funkwhale_role_docker_domainname:
funkwhale_role_docker_exposed_ports
# Type: list
funkwhale_role_docker_exposed_ports:
funkwhale_role_docker_hosts
# Type: dict
funkwhale_role_docker_hosts:
funkwhale_role_docker_hosts_use_common
# Type: bool (true/false)
funkwhale_role_docker_hosts_use_common:
funkwhale_role_docker_ipc_mode
# Type: string
funkwhale_role_docker_ipc_mode:
funkwhale_role_docker_links
# Type: list
funkwhale_role_docker_links:
funkwhale_role_docker_network_mode
# Type: string
funkwhale_role_docker_network_mode:
funkwhale_role_docker_pid_mode
# Type: string
funkwhale_role_docker_pid_mode:
funkwhale_role_docker_ports
# Type: list
funkwhale_role_docker_ports:
funkwhale_role_docker_uts
# Type: string
funkwhale_role_docker_uts:

Storage

funkwhale_role_docker_keep_volumes
# Type: bool (true/false)
funkwhale_role_docker_keep_volumes:
funkwhale_role_docker_mounts
# Type: list
funkwhale_role_docker_mounts:
funkwhale_role_docker_storage_opts
# Type: dict
funkwhale_role_docker_storage_opts:
funkwhale_role_docker_tmpfs
# Type: list
funkwhale_role_docker_tmpfs:
funkwhale_role_docker_volume_driver
# Type: string
funkwhale_role_docker_volume_driver:
funkwhale_role_docker_volumes_from
# Type: list
funkwhale_role_docker_volumes_from:
funkwhale_role_docker_volumes_global
# Type: bool (true/false)
funkwhale_role_docker_volumes_global:
funkwhale_role_docker_working_dir
# Type: string
funkwhale_role_docker_working_dir:

Monitoring & Lifecycle

funkwhale_role_docker_auto_remove
# Type: bool (true/false)
funkwhale_role_docker_auto_remove:
funkwhale_role_docker_cleanup
# Type: bool (true/false)
funkwhale_role_docker_cleanup:
funkwhale_role_docker_force_kill
# Type: string
funkwhale_role_docker_force_kill:
funkwhale_role_docker_healthcheck
# Type: dict
funkwhale_role_docker_healthcheck:
funkwhale_role_docker_healthy_wait_timeout
# Type: int
funkwhale_role_docker_healthy_wait_timeout:
funkwhale_role_docker_init
# Type: bool (true/false)
funkwhale_role_docker_init:
funkwhale_role_docker_kill_signal
# Type: string
funkwhale_role_docker_kill_signal:
funkwhale_role_docker_log_driver
# Type: string
funkwhale_role_docker_log_driver:
funkwhale_role_docker_log_options
# Type: dict
funkwhale_role_docker_log_options:
funkwhale_role_docker_oom_killer
# Type: bool (true/false)
funkwhale_role_docker_oom_killer:
funkwhale_role_docker_oom_score_adj
# Type: int
funkwhale_role_docker_oom_score_adj:
funkwhale_role_docker_output_logs
# Type: bool (true/false)
funkwhale_role_docker_output_logs:
funkwhale_role_docker_paused
# Type: bool (true/false)
funkwhale_role_docker_paused:
funkwhale_role_docker_recreate
# Type: bool (true/false)
funkwhale_role_docker_recreate:
funkwhale_role_docker_restart_retries
# Type: int
funkwhale_role_docker_restart_retries:
funkwhale_role_docker_stop_timeout
# Type: int
funkwhale_role_docker_stop_timeout:

Other Options

funkwhale_role_docker_capabilities
# Type: list
funkwhale_role_docker_capabilities:
funkwhale_role_docker_cgroup_parent
# Type: string
funkwhale_role_docker_cgroup_parent:
funkwhale_role_docker_commands
# Type: list
funkwhale_role_docker_commands:
funkwhale_role_docker_create_timeout
# Type: int
funkwhale_role_docker_create_timeout:
funkwhale_role_docker_entrypoint
# Type: string
funkwhale_role_docker_entrypoint:
funkwhale_role_docker_env_file
# Type: string
funkwhale_role_docker_env_file:
funkwhale_role_docker_labels
# Type: dict
funkwhale_role_docker_labels:
funkwhale_role_docker_labels_use_common
# Type: bool (true/false)
funkwhale_role_docker_labels_use_common:
funkwhale_role_docker_read_only
# Type: bool (true/false)
funkwhale_role_docker_read_only:
funkwhale_role_docker_runtime
# Type: string
funkwhale_role_docker_runtime:
funkwhale_role_docker_sysctls
# Type: list
funkwhale_role_docker_sysctls:
funkwhale_role_docker_ulimits
# Type: list
funkwhale_role_docker_ulimits:
funkwhale_role_autoheal_enabled
# Enable or disable Autoheal monitoring for the container created when deploying
# Type: bool (true/false)
funkwhale_role_autoheal_enabled: true
funkwhale_role_depends_on
# List of container dependencies that must be running before the container start
# Type: string
funkwhale_role_depends_on: ""
funkwhale_role_depends_on_delay
# Delay in seconds before starting the container after dependencies are ready
# Type: string (quoted number)
funkwhale_role_depends_on_delay: "0"
funkwhale_role_depends_on_healthchecks
# Enable healthcheck waiting for container dependencies
# Type: string ("true"/"false")
funkwhale_role_depends_on_healthchecks:
funkwhale_role_diun_enabled
# Enable or disable Diun update notifications for the container created when deploying
# Type: bool (true/false)
funkwhale_role_diun_enabled: true
funkwhale_role_dns_enabled
# Enable or disable automatic DNS record creation for the container
# Type: bool (true/false)
funkwhale_role_dns_enabled: true
funkwhale_role_docker_controller
# Enable or disable Saltbox Docker Controller management for the container
# Type: bool (true/false)
funkwhale_role_docker_controller: true
funkwhale_role_docker_image_repo
# Type: string
funkwhale_role_docker_image_repo:
funkwhale_role_docker_image_tag
# Type: string
funkwhale_role_docker_image_tag:
funkwhale_role_docker_volumes_download
# Type: bool (true/false)
funkwhale_role_docker_volumes_download:
funkwhale_role_paths_location
# Type: string
funkwhale_role_paths_location:
funkwhale_role_themepark_addons
# Type: string
funkwhale_role_themepark_addons:
funkwhale_role_themepark_app
# Type: string
funkwhale_role_themepark_app:
funkwhale_role_themepark_theme
# Type: string
funkwhale_role_themepark_theme:
funkwhale_role_traefik_api_endpoint
# Type: dict/omit
funkwhale_role_traefik_api_endpoint:
funkwhale_role_traefik_api_middleware
# Type: string
funkwhale_role_traefik_api_middleware:
funkwhale_role_traefik_api_middleware_http
# Type: string
funkwhale_role_traefik_api_middleware_http:
funkwhale_role_traefik_autodetect_enabled
# Enable Traefik autodetect middleware for the container
# Type: bool (true/false)
funkwhale_role_traefik_autodetect_enabled: false
funkwhale_role_traefik_certresolver
# Type: string
funkwhale_role_traefik_certresolver:
funkwhale_role_traefik_crowdsec_enabled
# Enable CrowdSec middleware for the container
# Type: bool (true/false)
funkwhale_role_traefik_crowdsec_enabled: false
funkwhale_role_traefik_error_pages_enabled
# Enable custom error pages middleware for the container
# Type: bool (true/false)
funkwhale_role_traefik_error_pages_enabled: false
funkwhale_role_traefik_gzip_enabled
# Enable gzip compression middleware for the container
# Type: bool (true/false)
funkwhale_role_traefik_gzip_enabled: false
funkwhale_role_traefik_middleware_http
# Type: string
funkwhale_role_traefik_middleware_http:
funkwhale_role_traefik_middleware_http_api_insecure
# Type: bool (true/false)
funkwhale_role_traefik_middleware_http_api_insecure:
funkwhale_role_traefik_middleware_http_insecure
# Type: bool (true/false)
funkwhale_role_traefik_middleware_http_insecure:
funkwhale_role_traefik_priority
# Type: string
funkwhale_role_traefik_priority:
funkwhale_role_traefik_robot_enabled
# Enable robots.txt middleware for the container
# Type: bool (true/false)
funkwhale_role_traefik_robot_enabled: true
funkwhale_role_traefik_tailscale_enabled
# Enable Tailscale-specific Traefik configuration for the container
# Type: bool (true/false)
funkwhale_role_traefik_tailscale_enabled: false
funkwhale_role_traefik_wildcard_enabled
# Enable wildcard certificate for the container
# Type: bool (true/false)
funkwhale_role_traefik_wildcard_enabled: true
funkwhale_role_web_domain
# Type: string
funkwhale_role_web_domain:
funkwhale_role_web_fqdn_override
# Override the Traefik fully qualified domain name (FQDN) for the container
# Type: list
funkwhale_role_web_fqdn_override:

Example Override

funkwhale_role_web_fqdn_override:
  - "{{ traefik_host }}"
  - "funkwhale2.{{ user.domain }}"
  - "funkwhale.otherdomain.tld"

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

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

Example Override

funkwhale_role_web_host_override: "Host(`{{ traefik_host }}`) || Host(`{{ 'funkwhale2.' + user.domain }}`)"

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

funkwhale_role_web_http_port
# Type: string (quoted number)
funkwhale_role_web_http_port:
funkwhale_role_web_http_scheme
# Type: string ("http"/"https")
funkwhale_role_web_http_scheme:
funkwhale_role_web_http_serverstransport
# Type: dict/omit
funkwhale_role_web_http_serverstransport:
funkwhale_role_web_scheme
# URL scheme to use for web access to the container
# Type: string ("http"/"https")
funkwhale_role_web_scheme:
funkwhale_role_web_serverstransport
# Type: dict/omit
funkwhale_role_web_serverstransport:
funkwhale_role_web_subdomain
# Type: string
funkwhale_role_web_subdomain: