Cryptpad

Cryptpad is a Zero Knowledge realtime collaborative editor. It is based on Node.js and comes with encryption. It relies on the ChainPad.


Note

For this guide you need some tools:

Prerequisites

Set up the backends:

[isabell@stardust ~]$ uberspace web backend set / --http --port 3000
Set backend for / to port 3000; please make sure something is listening!
You can always check the status of your backend using "uberspace web backend list".
[isabell@stardust ~]$

Now let’s get started with Cryptpad.

We’re using Node.js in the stable version 10:

[isabell@stardust ~]$ uberspace tools version use node 10
Selected Node.js version 10
[isabell@stardust ~]$

We also need Bower:

[isabell@stardust ~]$ npm install -g bower
[isabell@stardust ~]$

Installation

Start with cloning the Cryptpad source code from Github and be sure to replace the branch 2.19.0 with the current release number from the feed:

[isabell@stardust ~]$ git clone --branch 2.19.0 https://github.com/xwiki-labs/cryptpad.git ~/cryptpad
Cloning into '~/cryptpad'...
remote: Enumerating objects: 172, done.
remote: Counting objects: 100% (172/172), done.
remote: Compressing objects: 100% (105/105), done.
remote: Total 43165 (delta 99), reused 109 (delta 67), pack-reused 42993
Receiving objects: 100% (43165/43165), 85.51 MiB | 4.81 MiB/s, done.
Resolving deltas: 100% (30989/30989), done.
Note: checking out 'dcabff7c08a10930692e13d3f82e2b7e7b764efa'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

Checking out files: 100% (4319/4319), done.
[isabell@stardust ~]$

Now we need to install some dependencies:

[isabell@stardust ~]$ cd ~/cryptpad
[isabell@stardust cryptpad]$ npm install
[isabell@stardust cryptpad]$ bower install

Configuration

Copy example configuration

[isabell@stardust cryptpad]$ cp config.example.js config.js

Edit config.js and change the value of the variable _domain to your domain.

Setup daemon

Create ~/etc/services.d/cryptpad.ini with the following content:

[program:cryptpad]
directory=%(ENV_HOME)s/cryptpad
command=node server
autorestart=yes

Now let’s start the service:

[isabell@stardust html]$ supervisorctl reread
[isabell@stardust html]$ supervisorctl update
[isabell@stardust html]$ supervisorctl status
cryptpad                         RUNNING   pid 23323, uptime 0:07:29

Customization

For any futher configuration or customization you should have a look at the Cryptpad Wiki.

Updates

Note

Check the update feed regularly to stay informed about the newest version.

If there is a new version available, you can get the code using git. Replace the version number 2.19.0 with the latest version number you got from the release feed:

[isabell@stardust ~]$ cd ~/cryptpad
[isabell@stardust cryptpad]$ git pull origin 2.19.0
From https://github.com/xwiki-labs/cryptpad
 * tag                 2.19.0     -> FETCH_HEAD
Already up to date.
[isabell@stardust cryptpad]$

Then you need to restart the service, so the new code is used by the webserver:

[isabell@stardust cryptpad]$ supervisorctl restart cryptpad
[isabell@stardust cryptpad]$

Tested with Cryptpad 2.19.0 and Uberspace 7.2.4.0

Written by: humbug <uberspace@humbug.pw>