I’ve been running Nginx Proxy Manager on TrueNAS SCALE successfully for a while, but updating to NPM 2.12.4 through the TrueNAS Apps system has caused several critical issues. Here’s a breakdown of what I experienced and what steps I took to fix or work around them:
Problem 1: Cloudflare plugin fails to work because plugin definition is broken
Cause: The file /app/global/certbot-dns-plugins.json gets rewritten at startup and the cloudflare plugin entry is stripped or malformed
Fix: Run this command after container start to repair the JSON entry:
Problem 2: Nginx fails to start due to permission denied on nginx.pid
Cause: Running the container with non-root PUID and PGID (such as 568) prevents it from writing to /run/nginx/nginx.pid
Fix: Set User ID and Group ID in the app configuration to 0 so the container runs as root
Problem 3: Cloudflare plugin support breaks due to stripped ownership script
Cause: The startup script /etc/s6-overlay/s6-rc.d/prepare/30-ownership.sh gets fully stripped of content, removing necessary lines for certbot plugins
Fix: Set the following environment variable in the app config:
S6_STAGE2_HOOK = sed -i 2,$d /etc/s6-overlay/s6-rc.d/prepare/30-ownership.sh
This keeps the shebang line and prevents plugin wipe
Problem 4: Container marked unhealthy due to DNS failures
Cause: DNS servers like 217.169.20.21 and 217.169.20.20 are unreachable from inside the container, even though they work fine in older NPM versions
Fix: Not resolved yet. Rolling back to NPM version 2.11.1 avoids the issue. Possibly caused by new container network behavior in 2.12.4
Current Status:
After applying all known fixes and verifying container networking and resolver behavior, this issue remains unresolved in 2.12.4.
Can anyone suggest how i might best proceed?
ATM i’m hoping that it will be fixed but it seems that most people are saying that just the first problem’s resolution is fixing the entire thing for them, but it is not the case for me, i have at least 4 different problems (as described)?
No, the 1.2.5 update only altered the description somewhat and addresses this issue. If you still have an issue you should probably report it in the issue tracker on github.
Oh, you really are on a new setup then. It looks like you have never had version 2.12.3 (1.2.3) installed at all.
I can not help you with installing an older version of NPM that is not offered in the App’s store. You may have to do it manually with SSH & Docker etc. Im not sure.
Also had the failure to deploy problem after the update. The log was showing an error that the UID needed to be between 1000 snd 60000, and I was using the default 568. Made a user above 1000 but still wouldn’t deploy as there was a second error in the log about the 30-ownership.sh file being incomplete. (note this was showing up before i changed the user)
Searching on this error found that the S6_STAGE2_HOOK environment variable was supposedly fixed in the latest release, so I removed that, however, I’m not using the Cloudflare plugin. The app deploys now but takes 30 minutes to get past the setting ownership part of startup. Hope I don’t have to restart it often.
I tried again since I assumed 1.2.3. to 1.2.4 was bad and 1.2.5 fixed it all but nope. The latest is still broken for me, looping some junk about Cloudflare in the logs. Maybe 1.2.6 lol.
tested leaving the sed -i $d /etc/s6-overlay/s6-rc.d/prepare/30-ownership.sh
got console output
2025-07-07 09:04:10.632922+00:00e[1;34m❯ e[1;36mConfiguring npm user ...e[0m
2025-07-07 09:04:11.542509+00:00useradd warning: npm's uid 568 outside of the UID_MIN 1000 and UID_MAX 60000 range.
2025-07-07 09:04:12.447397+00:00e[1;34m❯ e[1;36mConfiguring npm group ...e[0m
2025-07-07 09:04:12.662400+00:00e[1;34m❯ e[1;36mChecking paths ...e[0m
2025-07-07 09:04:12.892216+00:00e[1;34m❯ e[1;36mSetting ownership ...e[0m
2025-07-07 09:04:15.826341+00:00/etc/s6-overlay/s6-rc.d/prepare/30-ownership.sh: line 41: syntax error: unexpected end of file
2025-07-07 09:04:15.826813+00:00s6-rc: warning: unable to start service prepare: command exited 2
2025-07-07 09:04:15.828907+00:00/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
Tried with the new sed line
sed -i 2,$d /etc/s6-overlay/s6-rc.d/prepare/30-ownership.sh
I love it because it works and I know where stuff is, but two subversions in a row failing…maybe time to shop around since other containers can do this job (caddy, traefik, etc.).