You will use headphone's web interface to specify it's settings. Main settings seem to be written to the file
/config/config.ini. Which can be backed up / restored by using docker's build context and the
Map your Media folder to the /downloads volume
Headphones may be given read-only access to your top-level media folder. It should be bind:mounted to
/downloads. You may selectively grant write access in subfolders of that folder. Depending upon your configuration.
It may help if the source + destination paths are are inside the same mountpoint. To avoid lots of copying large files across different drives. And that is the reason we mount the parent folder
/media into a docker volume.
If you have other unrelated folders inside your
/media folder (music, games etc). Then set the uid/gid and folder permissions to ensure that
headphones user cannot read or write to the other folders.
By default headphones will run as the
headphones user and group. With a default
8181:8181. Same as it's web interface TCP port number. So you will never forget.
You can change it's UID and GID to your liking by setting the following docker env vars:
By specifying an alternative uid and gid as a number, this lets you control which folder(s) headphones has read/write access to.
Add your host user account to the headphones group
If you do not change the headphones gid number to match your other accounts, then you can instead permit your own host account(s) file access to the delueg folders by making the group permissions writable e.g. chmod
On the host side you will need to create a
headphones group, adding your own user account to be a member of the same group gid (the default value of the headphones gid is
8181). Copy-paste these commands:
sudo groupadd -g 8181 headphones sudo usermod -a -G headphones $(id -un)
Sorry there is no example for Compose at this time. But it is something like this:
cp: image: dreamcat4/headphones run: ip: 22.214.171.124 volume: - /my/headphones/config/folder:/config - /my/media/folder:/downloads env: # - hp_uid=65534 # - hp_gid=44 detach: true