Skip to content

[BUG] USER environment variable overridden by shell - rpc-username always set to "root" #320

@giovaboy

Description

@giovaboy

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

The USER environment variable defined in the compose file is ignored. The settings.json is always written with rpc-username: "root" regardless of the value set in the compose environment, causing 401 Unauthorized errors when trying to authenticate with the custom username.

Expected Behavior

The USER environment variable should correctly set rpc-username in settings.json to the value defined in the compose file.

Steps To Reproduce

  1. Set USER=myuser and PASS=mypassword in compose environment
  2. Start the container
  3. Check /config/settings.json → rpc-username is "root" instead of "myuser"
  4. Try to authenticate with myuser/mypassword → 401 Unauthorized
  5. Authenticating with root/mypassword works correctly

Environment

- OS: Debian 13 (Trixie)
- Docker install: official Docker repository
- Image version: 4.1.1-r1-ls338

CPU architecture

x86-64

Docker creation

services:
  transmission:
    image: lscr.io/linuxserver/transmission:latest
    container_name: transmission
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
      - USER=myuser
      - PASS=mypassword
    volumes:
      - /path/to/config:/config
      - /path/to/downloads:/downloads
    ports:
      - 9091:9091
    restart: unless-stopped

Container logs

issue is reproducible by inspecting /config/settings.json after container start.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Issues

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions