Several services in the docker-compose.yml run as the default root user inside the container, which causes permission issues on the host filesystem when using bind mounts. When these containers create files, they appear as owned by root:root (UID 0) on the host, making them inaccessible to the host user.
Affected Services
The following services are missing the user: directive and run as root:
- elementsd (bind mounts ./data/elements:/root/.elements)
- boltz-client (bind mounts various data directories)
- electrs (bind mounts ./data/bitcoind:/root/.bitcoin)
- electrs-liquid (bind mounts ./data/elements:/root/.elements)
- nbxplorer (bind mounts ./data/bitcoind:/app/bitcoin)
Proposed Solution:
Add the user: directive to the affected services, matching the pattern used by other services like bitcoind and lnd:
elementsd:
user: '${UID:-1000}:${GID:-1000}'