Skip to content

init-plex-chown/run: use TMPDIR instead of hardcoded /run/plex-temp#448

Merged
thespad merged 2 commits intolinuxserver:masterfrom
evan314159:readonly-tmpdir
Mar 21, 2026
Merged

init-plex-chown/run: use TMPDIR instead of hardcoded /run/plex-temp#448
thespad merged 2 commits intolinuxserver:masterfrom
evan314159:readonly-tmpdir

Conversation

@evan314159
Copy link
Contributor

linuxserver.io


  • I have read the contributing guideline and understand that I have made the correct modifications

Description:

Changes init-plex-chown/run to use TMPDIR instead of hardcoded /run/plex-temp

Plex uses TMPDIR to store transcodes of music to WAV format for music
analysis (and maybe other things).

LS.io container sets TMPDIR=/run/plex-temp in Dockerfile. With read-only root this
means the /run tmpfs needs to have enough memory to store music analysis
transcodes.

LS.io container hardcoded /run/plex-temp in init so TMPDIR could not be
flexibly changed -- changed to use TMPDIR and clean on restart in case
of unclean shutdown.

Plex container is marked as supporting read-only root.

Benefits of this PR and context:

Compatibility with read-only root with /run as a small tmpfs and TMPDIR moved to a non-tmpfs to service transcoding.

How Has This Been Tested?

Tested (1) with default TMPDIR (2) with TMPDIR set to /transcode/temp with /transcode being a bind mount.

Source / References:

@LinuxServer-CI
Copy link
Contributor

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/plex/1.43.0.10492-121068a07-pkg-e0b85fd1-dev-6dcdb82d800f940a60b8908f296a17d62f89a06b-pr-448/index.html
https://ci-tests.linuxserver.io/lspipepr/plex/1.43.0.10492-121068a07-pkg-e0b85fd1-dev-6dcdb82d800f940a60b8908f296a17d62f89a06b-pr-448/shellcheck-result.xml

Tag Passed
amd64-1.43.0.10492-121068a07-pkg-e0b85fd1-dev-6dcdb82d800f940a60b8908f296a17d62f89a06b-pr-448
arm64v8-1.43.0.10492-121068a07-pkg-e0b85fd1-dev-6dcdb82d800f940a60b8908f296a17d62f89a06b-pr-448

@thespad
Copy link
Member

thespad commented Mar 15, 2026

Please rebase this against master and then I'm think I'm happy to merge it.

Changes init-plex-chown/run to use TMPDIR instead of hardcoded /run/plex-temp

Plex uses TMPDIR to store transcodes of music to WAV format for music
analysis (and maybe other things).

LS.io container sets TMPDIR=/run/plex-temp.  With read-only root this
means the /run tmpfs needs to have enough memory to store music analysis
transcodes.

LS.io container hardcoded /run/plex-temp in init so TMPDIR could not be
flexibly changed -- changed to use TMPDIR and clean on restart in case
of unclean shutdown.

Plex container is marked as supporting read-only root.
@evan314159
Copy link
Contributor Author

Rebased against master -- thank you!

@LinuxServer-CI
Copy link
Contributor

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/plex/1.43.0.10492-121068a07-pkg-e0b85fd1-dev-094d2071e2c9af11847c1ebaabe0d80b10901e34-pr-448/index.html
https://ci-tests.linuxserver.io/lspipepr/plex/1.43.0.10492-121068a07-pkg-e0b85fd1-dev-094d2071e2c9af11847c1ebaabe0d80b10901e34-pr-448/shellcheck-result.xml

Tag Passed
amd64-1.43.0.10492-121068a07-pkg-e0b85fd1-dev-094d2071e2c9af11847c1ebaabe0d80b10901e34-pr-448
arm64v8-1.43.0.10492-121068a07-pkg-e0b85fd1-dev-094d2071e2c9af11847c1ebaabe0d80b10901e34-pr-448

@LinuxServer-CI
Copy link
Contributor

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/plex/1.43.0.10492-121068a07-pkg-e0b85fd1-dev-a56f4d3e85b425f79aaa4a9260c63d8b29d94de4-pr-448/index.html
https://ci-tests.linuxserver.io/lspipepr/plex/1.43.0.10492-121068a07-pkg-e0b85fd1-dev-a56f4d3e85b425f79aaa4a9260c63d8b29d94de4-pr-448/shellcheck-result.xml

Tag Passed
amd64-1.43.0.10492-121068a07-pkg-e0b85fd1-dev-a56f4d3e85b425f79aaa4a9260c63d8b29d94de4-pr-448
arm64v8-1.43.0.10492-121068a07-pkg-e0b85fd1-dev-a56f4d3e85b425f79aaa4a9260c63d8b29d94de4-pr-448

@github-project-automation github-project-automation bot moved this from PRs to PRs Approved in Issue & PR Tracker Mar 21, 2026
@thespad thespad merged commit 468a499 into linuxserver:master Mar 21, 2026
5 checks passed
@LinuxServer-CI LinuxServer-CI moved this from PRs Approved to Done in Issue & PR Tracker Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants