
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
pm2-deploy
Advanced tools
This is the module that allows to do pm2 deploy.
Documentation: http://pm2.keymetrics.io/docs/usage/deployment/
$ npm install pm2-deploy
var deployForEnv = require('pm2-deploy').deployForEnv;
// Define deploy configuration with target environments
var deployConfig = {
prod: {
user: 'node',
host: '212.83.163.168',
ref: 'origin/master',
repo: 'git@github.com:Unitech/eip-vitrine.git',
path: '/var/www/test-deploy'
},
dev: {
user: 'node',
host: '212.83.163.168',
ref: 'origin/master',
repo: 'git@github.com:Unitech/eip-vitrine.git',
path: '/var/www/test-dev'
}
};
// Invoke deployment for `dev` environment
deployForEnv(deployConfig, 'dev', [], function (err, args) {
if (err) {
console.error('Deploy failed:', err.message);
return console.error(err.stack);
}
console.log('Success!');
});
// Rollback `prod` environment
deployForEnv(deployConfig, 'prod', ['revert', 1], function (err, args) {
if (err) {
console.error('Rollback failed:', err.message);
return console.error(err.stack);
}
console.log('Success!');
});
Deploy to a single environment
deployConfig object object containing deploy configs for all environmentsenv string the name of the environment to deploy toargs array custom deploy command-line argumentscb DeployCallback done callbackReturns boolean return value is always false
Type: Function
Shipit is an automation engine and a deployment tool that offers a similar feature set to pm2-deploy. It provides easy rollbacks, task definitions, and workflow automation. Unlike pm2-deploy, which is tightly coupled with PM2, Shipit can be used independently of any process manager.
Capistrano is a remote server automation and deployment tool written in Ruby. It supports scripting and task automation and is often used for deploying web applications. It is more established than pm2-deploy but requires Ruby environment, whereas pm2-deploy is specific to Node.js environments.
Deployer is a PHP deployment tool with support for several popular frameworks. It is similar to pm2-deploy in that it automates deployment tasks but is used in PHP environments. Deployer offers parallel deployment, atomic deployment, and zero downtime deployments.
FAQs
Deployment system for PM2
The npm package pm2-deploy receives a total of 1,621,199 weekly downloads. As such, pm2-deploy popularity was classified as popular.
We found that pm2-deploy demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.