Capistrano recipe for deploying node.js apps
Latest commit 1c22792 Apr 27, 2014 @loopj Merge pull request #28 from sarenji/patch-1
Fix md5 hash never matching
Failed to load latest commit information.
.gitignore Update gitignore Mar 21, 2013
Gemfile Bump railsless-deploy requirement to ensure the create_symlink is ava… Oct 25, 2013
LICENSE.txt Initial commit to capistrano-node-deploy. Jun 10, 2012 Readme typo Oct 30, 2012
VERSION Version bump to 1.2.14 Mar 11, 2014
capistrano-node-deploy.gemspec Regenerate gemspec for version 1.2.14 Mar 11, 2014


Capistrano recipe for deploying node.js apps.


  • Provides cap deploy functionality for your node app
  • Installs node packages (npm install) during deploys, using a shared folder for speed
  • Automatically creates upstart scripts for your node apps
  • Provides tasks for starting (cap node:start) and stopping (cap node:stop) your node app


First install the gem:

sudo gem install capistrano-node-deploy

or add it to your Gemfile if you have one:

gem "capistrano-node-deploy"

Now add the following to your Capfile

require "capistrano/node-deploy"

Full Capfile Example

require "capistrano/node-deploy"

set :application, "my-node-app-name"
set :repository,  ""
set :user, "deploy"
set :scm, :git
set :deploy_to, "/var/apps/my-app-folder"

role :app, ""

Overriding Default Settings

# Set app command to run (defaults to index.js, or your `main` file from `package.json`)
set :app_command, ""

# Set additional environment variables for the app
set :app_environment, "PORT=8080"

# Set node binary to run (defaults to /usr/bin/node)
set :node_binary, "/usr/bin/coffee"
# Set node environment (defaults to production)
set :node_env, "staging"
# Set the user to run node as (defaults to deploy)
set :node_user, "james"

# Set the name of the upstart command (defaults to #{application}-#{node_env})
set :upstart_job_name, "myserver"

Contributing to capistrano-node-deploy

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
  • Fork the project.
  • Start a feature/bugfix branch.
  • Commit and push until you are happy with your contribution.
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.


Copyright (c) 2012 James Smith. See LICENSE.txt for further details.