Script: Immich
Reported by: @TheRealTomDavidson
Guidelines
- Read and understood guidelines: yes
- Verbose mode used: yes
Issue occurs during: Script Update
Environment
- Linux distribution: Debian
- Proxmox version: 9.1
- Default settings: Yes
- Advanced settings: No
- Exact command:
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/immich.sh)"
Description
Attempting to run both the curl script above or just the default "update" command at CLI inside an unprivileged LXC container (at Immich level 2.7.x) fails when attempting to execute a fchown on a tarball during the installation/build of sharp. This breaks the web server, and I'm not sure how to recover from it.
Steps to reproduce
Just run an update on an unprivileged LXC, in my experience.
Error output
Reading package lists...
Building dependency tree...
Reading state information...
libmimalloc3 is already the newest version (3.3.2+ds-1).
libde265-dev is already the newest version (1.1.1-1).
Summary:
Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 578
^M^[[K ✔️ ^[[1;92mInstalled/upgraded Testing repo packages^[[m
Already up to date.
^M^[[K ✔️ ^[[1;92mImage-processing libraries up to date^[[m
^M^[[K ✔️ ^[[1;92mUpdate available: Immich 1.3.3 → 3.0.3^[[m
^M^[[K ✔️ ^[[1;92mStopped Services^[[m
^M^[[K ✔️ ^[[1;92mNo update available: VectorChord (1.1.1) - update held back: updated together with Immich after testing^[[m
^M^[[K ✔️ ^[[1;92mDeployed: Immich (3.0.3)^[[m
Hit:1 http://security.debian.org trixie-security InRelease
Hit:2 http://deb.debian.org/debian trixie InRelease
Hit:3 http://deb.debian.org/debian trixie-updates InRelease
Hit:4 https://apt.postgresql.org/pub/repos/apt trixie-pgdg InRelease
Hit:5 https://deb.nodesource.com/node_24.x nodistro InRelease
Hit:6 https://mise.jdx.dev/deb stable InRelease
Hit:7 https://repo.jellyfin.org/debian trixie InRelease
Hit:8 http://deb.debian.org/debian testing InRelease
Reading package lists...
Building dependency tree...
Reading state information...
133 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists...
Building dependency tree...
Reading state information...
nodejs is already the newest version (24.18.0-1nodesource1).
0 upgraded, 0 newly installed, 0 to remove and 133 not upgraded.
^M^[[K ✔️ ^[[1;92mUpdate Node.js 24^[[m
changed 1 package in 157ms
^M^[[K ✔️ ^[[1;92mInstalled corepack^[[m
^M^[[K ✔️ ^[[1;92mEnabled corepack^[[m
Preparing pnpm@11.6.0 for immediate activation...
Scope: 3 of 12 workspace projects
Scope: all 12 workspace projects
✓ Lockfile passes supply-chain policies (verified 20h ago)
.. | Progress: resolved 1, reused 0, downloaded 0, added 0
.. | +2465 ++++++++++++++++++++++++++++
.. | Progress: resolved 2465, reused 2450, downloaded 0, added 2317
.. | Progress: resolved 2465, reused 2450, downloaded 0, added 2465, done
.../node_modules/@parcel/watcher install$ node scripts/build-from-source.js
.../core-js@3.49.0/node_modules/core-js postinstall$ node -e "try{require('./postinstall')}catch(e){}"
.../node_modules/@swc/core postinstall$ node postinstall.js
.../node_modules/protobufjs postinstall$ node scripts/postinstall
.../sharp@0.34.5/node_modules/sharp install$ node install/check.js || npm run build
.../core-js@3.49.0/node_modules/core-js postinstall: Done
.../node_modules/@parcel/watcher install: Done
.../node_modules/protobufjs postinstall: Done
.../node_modules/cpu-features install$ node buildcheck.js > buildcheck.gypi && node-gyp rebuild
.../node_modules/@swc/core postinstall: Done
.../node_modules/@scarf/scarf postinstall$ node ./report.js
.../sharp@0.34.5/node_modules/sharp install: Done
.../bcrypt@6.0.0/node_modules/bcrypt install$ node-gyp-build
.../es5-ext@0.10.64/node_modules/es5-ext postinstall$ node -e "try{require('./_postinstall')}catch(e){}" || exit 0
.../bcrypt@6.0.0/node_modules/bcrypt install: Done
.../es5-ext@0.10.64/node_modules/es5-ext postinstall: Done
.../node_modules/cpu-features install: gyp info it worked if it ends with ok
.../node_modules/cpu-features install: gyp info using node-gyp@12.3.0
.../node_modules/cpu-features install: gyp info using node@24.18.0 | linux | x64
.../node_modules/cpu-features install: gyp info find Python using Python version 3.13.5 found at "/bin/python3"
.../node_modules/cpu-features install: gyp http GET https://nodejs.org/download/release/v24.18.0/node-v24.18.0-headers.tar.gz
.../node_modules/cpu-features install: gyp http 200 https://nodejs.org/download/release/v24.18.0/node-v24.18.0-headers.tar.gz
.../node_modules/cpu-features install: gyp ERR! error while extracting tarball TAR_ENTRY_ERROR EINVAL: invalid argument, fchown
.../node_modules/cpu-features install: gyp ERR! error while extracting tarball TAR_ENTRY_ERROR EINVAL: invalid argument, fchown
.../node_modules/cpu-features install: gyp ERR! error while extracting tarball TAR_ENTRY_ERROR EINVAL: invalid argument, fchown
.../node_modules/cpu-features install: gyp ERR! error while extracting tarball TAR_ENTRY_ERROR EINVAL: invalid argument, fchown
.../node_modules/cpu-features install: gyp ERR! error while extracting tarball TAR_ENTRY_ERROR EINVAL: invalid argument, fchown
,,,
harp@0.34.5/node_modules/sharp install: gyp ERR! error while extracting tarball TAR_ENTRY_ERROR EINVAL: invalid argument, fchown
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! error while extracting tarball TAR_ENTRY_ERROR EINVAL: invalid argument, fchown
.../sharp@0.34.5/node_modules/sharp install: gyp WARN install got an error, rolling back install
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! configure error
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! stack Error: There was a fatal problem while downloading/extracting the tarball
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! stack at go (/opt/immich/app/node_modules/.pnpm/node-gyp@13.0.0/node_modules/node-gyp/lib/install.js:254:17)
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! stack at async install (/opt/immich/app/node_modules/.pnpm/node-gyp@13.0.0/node_modules/node-gyp/lib/install.js:63:18)
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! stack at async getNodeDir (/opt/immich/app/node_modules/.pnpm/node-gyp@13.0.0/node_modules/node-gyp/lib/configure.js:79:7)
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! stack at async run (/opt/immich/app/node_modules/.pnpm/node-gyp@13.0.0/node_modules/node-gyp/bin/node-gyp.js:81:18)
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! System Linux 6.17.13-2-pve
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! command "/usr/bin/node" "/opt/immich/app/node_modules/.pnpm/node-gyp@13.0.0/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--directory=src"
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! cwd /opt/immich/app/node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/src
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! node -v v24.18.0
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! node-gyp -v v13.0.0
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! $npm_package_name sharp
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! $npm_package_version 0.34.5
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! not ok
.../sharp@0.34.5/node_modules/sharp install: Failed
[WARN] Deployment with a shared lockfile has failed. If this is a bug, please report it at https://github.com/pnpm/pnpm/issues.
As a workaround, add the following to pnpm-workspace.yaml:
forceLegacyDeploy: true
[ELIFECYCLE] Command failed with exit code 1.
✖️ in line 192: exit code 1 (General error / Operation not permitted): while executing command pnpm --filter immich --prod --no-optional deploy "$APP_DIR"
--- Last 20 lines of log ---
[2026-07-16 14:44:38] [INFO] Installing/upgrading Testing repo packages
[2026-07-16 14:44:39] [OK] Installed/upgraded Testing repo packages
[2026-07-16 14:44:39] [WARN] Checking for updates to custom image-processing libraries (recompile time: 2-15min per library)
[2026-07-16 14:44:39] [OK] Image-processing libraries up to date
[2026-07-16 14:44:39] [INFO] Checking for update: Immich
[2026-07-16 14:44:39] [OK] Update available: Immich 1.7.3 → 3.0.3
[2026-07-16 14:44:39] [INFO] Stopping Services
[2026-07-16 14:44:39] [OK] Stopped Services
[2026-07-16 14:44:39] [INFO] Checking for update: VectorChord
[2026-07-16 14:44:39] [OK] No update available: VectorChord (1.1.1) - update held back: updated together with Immich after testing
[2026-07-16 14:44:40] [INFO] Fetching GitHub release: Immich (3.0.3)
[2026-07-16 14:44:46] [OK] Deployed: Immich (3.0.3)
[2026-07-16 14:44:46] [INFO] Update Node.js 24
[2026-07-16 14:44:48] [OK] Update Node.js 24
[2026-07-16 14:44:48] [INFO] Installing corepack
[2026-07-16 14:44:48] [OK] Installed corepack
[2026-07-16 14:44:48] [INFO] Enabling corepack
[2026-07-16 14:44:48] [OK] Enabled corepack
[2026-07-16 14:44:49] [INFO] Updating Immich web and microservices
[2026-07-16 14:45:14] [ERROR] in line 192: exit code 1 (General error / Operation not permitted): while executing command pnpm --filter immich --prod --no-optional deploy "$APP_DIR"
Additional context
I'm running Immich in an unprivileged LXC in Proxmox VE and have never had any difficulties before, but nothing I do now allows me to successfully build (or rebuild). I suspect there's a dependency that's being pulled along that doesn't play nicely -- probably sharp, given the error.
Script: Immich
Reported by: @TheRealTomDavidson
Guidelines
Issue occurs during: Script Update
Environment
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/immich.sh)"Description
Attempting to run both the curl script above or just the default "update" command at CLI inside an unprivileged LXC container (at Immich level 2.7.x) fails when attempting to execute a fchown on a tarball during the installation/build of sharp. This breaks the web server, and I'm not sure how to recover from it.
Steps to reproduce
Just run an update on an unprivileged LXC, in my experience.
Error output
Reading package lists...
Building dependency tree...
Reading state information...
libmimalloc3 is already the newest version (3.3.2+ds-1).
libde265-dev is already the newest version (1.1.1-1).
Summary:
Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 578
^M^[[K ✔️ ^[[1;92mInstalled/upgraded Testing repo packages^[[m
Already up to date.
^M^[[K ✔️ ^[[1;92mImage-processing libraries up to date^[[m
^M^[[K ✔️ ^[[1;92mUpdate available: Immich 1.3.3 → 3.0.3^[[m
^M^[[K ✔️ ^[[1;92mStopped Services^[[m
^M^[[K ✔️ ^[[1;92mNo update available: VectorChord (1.1.1) - update held back: updated together with Immich after testing^[[m
^M^[[K ✔️ ^[[1;92mDeployed: Immich (3.0.3)^[[m
Hit:1 http://security.debian.org trixie-security InRelease
Hit:2 http://deb.debian.org/debian trixie InRelease
Hit:3 http://deb.debian.org/debian trixie-updates InRelease
Hit:4 https://apt.postgresql.org/pub/repos/apt trixie-pgdg InRelease
Hit:5 https://deb.nodesource.com/node_24.x nodistro InRelease
Hit:6 https://mise.jdx.dev/deb stable InRelease
Hit:7 https://repo.jellyfin.org/debian trixie InRelease
Hit:8 http://deb.debian.org/debian testing InRelease
Reading package lists...
Building dependency tree...
Reading state information...
133 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists...
Building dependency tree...
Reading state information...
nodejs is already the newest version (24.18.0-1nodesource1).
0 upgraded, 0 newly installed, 0 to remove and 133 not upgraded.
^M^[[K ✔️ ^[[1;92mUpdate Node.js 24^[[m
changed 1 package in 157ms
^M^[[K ✔️ ^[[1;92mInstalled corepack^[[m
^M^[[K ✔️ ^[[1;92mEnabled corepack^[[m
Preparing pnpm@11.6.0 for immediate activation...
Scope: 3 of 12 workspace projects
Scope: all 12 workspace projects
✓ Lockfile passes supply-chain policies (verified 20h ago)
.. | Progress: resolved 1, reused 0, downloaded 0, added 0
.. | +2465 ++++++++++++++++++++++++++++
.. | Progress: resolved 2465, reused 2450, downloaded 0, added 2317
.. | Progress: resolved 2465, reused 2450, downloaded 0, added 2465, done
.../node_modules/@parcel/watcher install$ node scripts/build-from-source.js
.../core-js@3.49.0/node_modules/core-js postinstall$ node -e "try{require('./postinstall')}catch(e){}"
.../node_modules/@swc/core postinstall$ node postinstall.js
.../node_modules/protobufjs postinstall$ node scripts/postinstall
.../sharp@0.34.5/node_modules/sharp install$ node install/check.js || npm run build
.../core-js@3.49.0/node_modules/core-js postinstall: Done
.../node_modules/@parcel/watcher install: Done
.../node_modules/protobufjs postinstall: Done
.../node_modules/cpu-features install$ node buildcheck.js > buildcheck.gypi && node-gyp rebuild
.../node_modules/@swc/core postinstall: Done
.../node_modules/@scarf/scarf postinstall$ node ./report.js
.../sharp@0.34.5/node_modules/sharp install: Done
.../bcrypt@6.0.0/node_modules/bcrypt install$ node-gyp-build
.../es5-ext@0.10.64/node_modules/es5-ext postinstall$ node -e "try{require('./_postinstall')}catch(e){}" || exit 0
.../bcrypt@6.0.0/node_modules/bcrypt install: Done
.../es5-ext@0.10.64/node_modules/es5-ext postinstall: Done
.../node_modules/cpu-features install: gyp info it worked if it ends with ok
.../node_modules/cpu-features install: gyp info using node-gyp@12.3.0
.../node_modules/cpu-features install: gyp info using node@24.18.0 | linux | x64
.../node_modules/cpu-features install: gyp info find Python using Python version 3.13.5 found at "/bin/python3"
.../node_modules/cpu-features install: gyp http GET https://nodejs.org/download/release/v24.18.0/node-v24.18.0-headers.tar.gz
.../node_modules/cpu-features install: gyp http 200 https://nodejs.org/download/release/v24.18.0/node-v24.18.0-headers.tar.gz
.../node_modules/cpu-features install: gyp ERR! error while extracting tarball TAR_ENTRY_ERROR EINVAL: invalid argument, fchown
.../node_modules/cpu-features install: gyp ERR! error while extracting tarball TAR_ENTRY_ERROR EINVAL: invalid argument, fchown
.../node_modules/cpu-features install: gyp ERR! error while extracting tarball TAR_ENTRY_ERROR EINVAL: invalid argument, fchown
.../node_modules/cpu-features install: gyp ERR! error while extracting tarball TAR_ENTRY_ERROR EINVAL: invalid argument, fchown
.../node_modules/cpu-features install: gyp ERR! error while extracting tarball TAR_ENTRY_ERROR EINVAL: invalid argument, fchown
,,,
harp@0.34.5/node_modules/sharp install: gyp ERR! error while extracting tarball TAR_ENTRY_ERROR EINVAL: invalid argument, fchown
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! error while extracting tarball TAR_ENTRY_ERROR EINVAL: invalid argument, fchown
.../sharp@0.34.5/node_modules/sharp install: gyp WARN install got an error, rolling back install
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! configure error
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! stack Error: There was a fatal problem while downloading/extracting the tarball
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! stack at go (/opt/immich/app/node_modules/.pnpm/node-gyp@13.0.0/node_modules/node-gyp/lib/install.js:254:17)
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! stack at async install (/opt/immich/app/node_modules/.pnpm/node-gyp@13.0.0/node_modules/node-gyp/lib/install.js:63:18)
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! stack at async getNodeDir (/opt/immich/app/node_modules/.pnpm/node-gyp@13.0.0/node_modules/node-gyp/lib/configure.js:79:7)
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! stack at async run (/opt/immich/app/node_modules/.pnpm/node-gyp@13.0.0/node_modules/node-gyp/bin/node-gyp.js:81:18)
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! System Linux 6.17.13-2-pve
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! command "/usr/bin/node" "/opt/immich/app/node_modules/.pnpm/node-gyp@13.0.0/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--directory=src"
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! cwd /opt/immich/app/node_modules/.pnpm/sharp@0.34.5/node_modules/sharp/src
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! node -v v24.18.0
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! node-gyp -v v13.0.0
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! $npm_package_name sharp
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! $npm_package_version 0.34.5
.../sharp@0.34.5/node_modules/sharp install: gyp ERR! not ok
.../sharp@0.34.5/node_modules/sharp install: Failed
[WARN] Deployment with a shared lockfile has failed. If this is a bug, please report it at https://github.com/pnpm/pnpm/issues.
As a workaround, add the following to pnpm-workspace.yaml:
forceLegacyDeploy: true
[ELIFECYCLE] Command failed with exit code 1.
✖️ in line 192: exit code 1 (General error / Operation not permitted): while executing command pnpm --filter immich --prod --no-optional deploy "$APP_DIR"
--- Last 20 lines of log ---
[2026-07-16 14:44:38] [INFO] Installing/upgrading Testing repo packages
[2026-07-16 14:44:39] [OK] Installed/upgraded Testing repo packages
[2026-07-16 14:44:39] [WARN] Checking for updates to custom image-processing libraries (recompile time: 2-15min per library)
[2026-07-16 14:44:39] [OK] Image-processing libraries up to date
[2026-07-16 14:44:39] [INFO] Checking for update: Immich
[2026-07-16 14:44:39] [OK] Update available: Immich 1.7.3 → 3.0.3
[2026-07-16 14:44:39] [INFO] Stopping Services
[2026-07-16 14:44:39] [OK] Stopped Services
[2026-07-16 14:44:39] [INFO] Checking for update: VectorChord
[2026-07-16 14:44:39] [OK] No update available: VectorChord (1.1.1) - update held back: updated together with Immich after testing
[2026-07-16 14:44:40] [INFO] Fetching GitHub release: Immich (3.0.3)
[2026-07-16 14:44:46] [OK] Deployed: Immich (3.0.3)
[2026-07-16 14:44:46] [INFO] Update Node.js 24
[2026-07-16 14:44:48] [OK] Update Node.js 24
[2026-07-16 14:44:48] [INFO] Installing corepack
[2026-07-16 14:44:48] [OK] Installed corepack
[2026-07-16 14:44:48] [INFO] Enabling corepack
[2026-07-16 14:44:48] [OK] Enabled corepack
[2026-07-16 14:44:49] [INFO] Updating Immich web and microservices
[2026-07-16 14:45:14] [ERROR] in line 192: exit code 1 (General error / Operation not permitted): while executing command pnpm --filter immich --prod --no-optional deploy "$APP_DIR"
Additional context
I'm running Immich in an unprivileged LXC in Proxmox VE and have never had any difficulties before, but nothing I do now allows me to successfully build (or rebuild). I suspect there's a dependency that's being pulled along that doesn't play nicely -- probably sharp, given the error.