node package manager
Painless code sharing. npm Orgs help your team discover, share, and reuse code. Create a free org »



A super simple, lightweight Node.JS deployer to be used with Bitbucket or Github POST service hooks.


Follow the instructions here to set up your remote web-server root, deploy user ssh access, and service hooks.

Install the stable npm version:

npm install deploy-hook

Install the development version:

git clone 
cd node-deploy-hook && npm install

Install the repo as www-data (for nginx) or apache user:

sudo -Hu www-data npm install --save node-deploy-hook
sudo -Hu www-data git clone 
cd node-deploy-hook && sudo -Hu www-data npm install

Add as a proxy to the deployment project's vhost in nginx or apache. For example in nginx, you could add:

    location /deploy/ {


Start the server as www-data or apache user:

cd /var/www/node-deploy-hook
sudo -Hu www-data nohup node deploy-hook.js > ./log/deploy.log 2>&1&

Change Log


  • Bitbucket hook is now working properly
  • Git pull replaced to git reset --hard