Installing Cryptpad on Ubuntu 16.04

Introduction

Cryptpad is an open-source real-time collaborative editing service, which is available at https://github.com/xwiki-labs/cryptpad

Installation

In order to install Cryptpad on Ubuntu 16.04, you need to install:

  1. NodeJS
  2. MongoDB
  3. Cryptpad

Install NodeJS

The tutorial of installing NodeJS via package manager is available at https://nodejs.org/en/download/package-manager/. However, after installing, you might be noticed that Ubuntu does not recognize node command.

node --version
node: command not found

If you are sure that nodejs is installed, you could do

which nodejs
/usr/bin/nodejs

# link nodejs as node
sudo ln -s /usr/bin/nodejs /usr/bin/node

Install MongoDB

You could follow this instruction. Note that, at the time of writing, following the instruction will let you own MongoDB 3.0.12, not the latest one.

After installing MongoDB, you could follow my old blog post to add collection and user to MongoDB.

Install cryptpad

Just follow the instruction at homepage of Cryptpad to install cryptpad. In my case, bower is required.

After installed Cryptpad, you should modify the config.js file:

  • comment two lines which start with storage: './storage/.lvl', and levelPath: ..
  • uncomment the line storage: './storage/mongo',
  • uncomment the line mongoCollectionName: 'cryptpad',
  • uncomment and modify the line start with mongoUri : as instructed in the above mentioned blog post.
  • In command line, type npm install mongodb
  • In command line again, node ./server.js
  • Now, point your browser to localhost:3000

It should be done like this.

Published: June 14 2016

blog comments powered by Disqus