Created: 2012-03-26 16:31
Updated: 2018-07-26 06:46
License: mit


Capistrano tasks for deploying Node projects.

What does it do?

  • Skips migrations
  • Installs NPM packages on deploy
  • Manages multiple node versions using package.json


In your deploy.rb

require 'capistrano/node'

set :multi_node, true # To use multiple node versions
set :node_dir, '/opt/nodejs/versions' # Node dirs
set :version_prefix, 'v'

Node Version Management

capistrano-node can manage multiple Node versions when multi_node variable is set to true. In this case, it assumes that node_dir contains compiled Node binaries for multiple versions each. For example, the directory could contain files in following structure (assuming version prefix 'v'):

  - v0.6.10
    - bin
      - node
      - node-waf
      - npm
      - npm_g
      - npm-g
  - v0.6.9
    - bin
      - node

If multiple Node versions are used, capistrano-node reads used Node version from package.json:

"engines": {
  "node": ">= 0.6.14"

We've also published our Chef recipes for installing and distributing multiple Node versions.


© Flowdock. See LICENSE.txt for further details.

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more