I debugged this on my instance with Claude Code and found what looks like the actual root cause, sharing here in case it helps.
Root cause (confirmed via docker exec):
/home/cloudron inside the container is owned by 998:998 with mode 750:
$ docker exec <cid> ls -lan /home/
drwxr-xr-x 1 998 998 4096 Aug 7 14:46 .
drwxr-x--- 1 998 998 4096 Sep 1 10:59 cloudron
But start.sh runs gosu cloudron:cloudron npm install ... and that user is uid=1000(cloudron) gid=1000(cloudron). Since 998:998 isn't in that user's groups and the dir is 750, UID 1000 has zero traversal access to /home/cloudron - it fails on the very first path component, not just on _cacache ownership. That's also why the chown -R 1000:1000 ~/.npm suggestion in the npm error message doesn't actually help here.
On top of that, /home/cloudron is baked into a read-only image layer: chown as root inside the running container fails with "Read-only file system" on every file under it. So it can't be patched at runtime - it needs a fix in the image build (chown /home/cloudron to 1000:1000 at build time, or align the cloudron user's UID/GID with 998).
Workaround that avoids touching /home/cloudron entirely, added to env.sh:
export NPM_CONFIG_CACHE="/run/n8n/custom-node-modules/.npm-cache"
This redirects npm's cache to a path start.sh already chowns to cloudron:cloudron before running the install step. Confirmed working on my instance - install succeeds and n8n starts normally with this in place.
Hope this saves someone some time, happy for the team to take it from here.




