Setup Ubuntu server
Follow the link here to setup a basic Ubuntu server droplet on DigitalOcean.
There are two methods to install Nodejs, directly or through nvm. For a quick test, I used method 1 to install Nodejs version 0.10.x.
Directly install Nodejs
Follow the instruction here to install Node.js and Nodejs package manager
$ sudo apt-get update $ sudo apt-get install nodejs $ sudo apt-get install npm
Install with nvm package
$ nvm install stable
nvm to manage and use different Nodejs versions. Here is how to use it.
Installing Node.js by this method makes it available for any user, not only root, which is unlike the one in the Nodejs application image available on DigitalOcean Control Panel.
There will be an issue of naming with both methods. Because of a conflict with another package,
node, the executable Nodejs from the Ubuntu repositories is called nodejs instead of node.
Because most of other Nodejs-based applications use
node instead of
nodejs to run Nodejs apps, a symbolic link may require
$ sudo ln -s /usr/bin/nodejs /usr/bin/node
or install this
$ sudo apt-get install nodejs-legacy
Check if nodejs is installed correctly
$ node -v $ npm -v
You may want to make another snapshot at this step
See more about
nodejs naming here.