cryptpad installation on Debian Stretch

CryptPad is a zero knowledge realtime collaborative editor. Encryption carried out in your web browser protects the data from the server, the cloud and the NSA. This project uses the CKEditor Visual Editor and the ChainPad realtime engine. The secret key is stored in the URL fragment identifier which is never sent to the server but is available to javascript so by sharing the URL, you give authorization to others who want to participate.

Code is hosted at Github and the license is AGPLv3.

Collaborate in Confidence. Grow your ideas together with shared documents while Zero Knowledge technology secures your privacy; even from us.

Cryptpad combines various functionalities in a single application.

  • pad
  • paste
  • drive
  • poll
  • whiteboard
  • presentations
  • contacts

 

Cryptpad can be used with a registered user and password, or also without.

Install NodeJS v6.x on Debian 9 Stretch

Log in to your server with root to install the missing packages. (from linuxconfig.org on NodeJS install)

root@cryptpad:~# apt-get install curl git-core
root@cryptpad:~# curl -sL https://deb.nodesource.com/setup_6.x | bash -
root@cryptpad:~# apt install nodejs
root@cryptpad:~# node -v
v6.11.1

Now the requirement for nodeJS v6.x.x regarding the official install instructions should be met.

Install Cryptpad

First create a dedicated user for your cryptpad server. And add your public ssh key to authorized_keys.

root@cryptpad:~# useradd cryptpad -d /home/cryptpad/ -s /bin/bash
root@cryptpad:~# mkdir /home/cryptpad
root@cryptpad:~# chown cryptpad:cryptpad /home/cryptpad
root@cryptpad:~# passwd cryptpad
root@cryptpad:~# su cryptpad
cryptpad@cryptpad:/root$ cd
cryptpad@cryptpad:/home/cryptpad$ 
cryptpad@cryptpad:/home/cryptpad$ mkdir .ssh
cryptpad@cryptpad:/home/cryptpad$ chmod 0700 .ssh
cryptpad@cryptpad:/home/cryptpad$ cd .ssh
cryptpad@cryptpad:/home/cryptpad/.ssh$ vi authorized_keys

And now login with your newly created user and install cryptpad.

cryptpad@cryptpad:~$ git clone <this repo>
cryptpad@cryptpad:~$ cd cryptpad
cryptpad@cryptpad:~/cryptpad$ npm install
cryptpad@cryptpad:~/cryptpad$ npm install -g bower ## if necessary
cryptpad@cryptpad:~/cryptpad$ bower install

cryptpad@cryptpad:~/cryptpad$ cp config.example.js config.js

CryptPad should work with an unmodified configuration file, though there are many things which you may want to customize. Attributes in the config should have comments indicating how they are used.

cryptpad@cryptpad:~/cryptpad$ vi config.js

## Run your node

cryptpad@cryptpad:~/cryptpad$ node ./server.js 
loading rpc module...

[2017-07-30T08:58:36.817Z] server available http://[::]:3000
Cryptpad is customizable, see customize.dist/readme.md for details

Ready, your cryptpad should be available on port 3000 on your server.

Do not forget to use strong https for example with a reverse proxy e.g.: Apache SSL vHost , nginx or HAProxy SSL termination

In future post’s i’ll feature how to use a separate storage backend, put the file storage to different directory’s and have a systemd service for the nodejs application.

Comments are closed.