Skip to content

Docker bind mount permission issues - some services run as root causing host filesystem permission errors #94

@RCasatta

Description

@RCasatta

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}'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions