• We value your experience with Plesk during 2025
    Plesk strives to perform even better in 2026. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2025.
    Please take this short survey:

    https://survey.webpros.com/
  • On Plesk for Linux mod_status is disabled on upgrades to improve Apache security.
    This is a one-time operation that occurs during an upgrade. You can manually enable mod_status later if needed.

Issue NPM build actions in Deploy Actions w the Git Extension

yyc2006

New Pleskian
Server operating system version
Ubuntu 24
Plesk version and microupdate number
18.0.75 #2
"NPM build actions in Deploy Actions w the Git Extension"
I've been attempting to add npm install & npm run build to the deploy actions section of the git extension. This is a ubuntu server so its a chrooted environment.

After attempting explicit paths and a deploy script, I run into the same problems. Claude recommends removing the chrooted restrictions but I don't expect thats the best.

Are there any recommendations for accessing node, npm and particularily nodenv commands as part "deploy script" in the Git extension?

Claude Solutions

Option 1: Disable chroot for Git actions (Recommended) <Doesnt seem great>

In Plesk:
1. Go to Domains →[DOMAIN] → Hosting Settings
2. Find SSH access or Shell access
3. Change from /bin/bash (chrooted) to /bin/bash

Option 2: Use Plesk's Node.js feature for deployment <Looking for something automated, not a bunch of extra manual clicks>

Instead of a custom deploy script, configure Plesk's built-in Node.js:
1. Go to Domains →[DOMAIN] → Node.js
2. Enable Node.js
3. Set Application startup file: dist/main.js
4. Use Plesk's built-in "NPM install" action instead of custom script

Option 3: Run deploy via SSH (outside chroot)

Create a wrapper that SSHs to the server without chroot restrictions:
ssh user@[DOMAIN] 'cd /var/www/vhosts/[DOMAIN]/mcpserver && ./deploy.sh'
 
The simplest approach is moving from the chrooted shell to /bin/bash.

If you must use the chrooted shell, you will need to copy the Node.js dependencies to the chrooted shell.
 
Back
Top