Installation guide

Pierre Bondoerffer edited this page Aug 2, 2017 · 4 revisions

Hello! This is the installation guide for CryptPad. Feel free to edit, add, or contribute if you feel anything is missing!

If you see anything that's missing, feel free to contribute and help us improve the documentation Let's get started!

Installing CryptPad

Pre-requisites

Before starting, please make sure you have the following installed on your system:

  • git
  • nodejs (we use 6.6.0)
    • We recommend using NVM
  • npm
  • bower
    • You can install this with npm install -g bower

Cloning

Clone the repository:

git clone https://github.com/xwiki-labs/cryptpad.git cryptpad

Dependencies

cd cryptpad
npm install
bower install

Configuration

Copy the example configuration:

cp config.example.js config.js

The defaults should be good enough for most cases, but you may want to edit them. We recommend you read over the example file and change the values to fit your needs.

Run CryptPad

You're almost done! You can now run CryptPad:

node server

If you plan on developing on CryptPad, please head over to the Developer guide.

You're done :tada:

That's it for basic usage. If you are using CryptPad locally, this is good enough and you don't need to do anything else. Navigate to http://localhost:3000/ to see your server live.

Going further

If you are planning to deploy CryptPad on public internet, you may want to run CryptPad as a daemon, put it behind a reverse proxy and configure CSP.

We also strongly recommend setting up HTTPS. The simplest way to do that is with certbot.

WARNING: CryptPad cannot run in a subfolder. Make sure you configure your server to access it through the root domain or a subdomain.

While we do have some example configuration files, please note this is not a guide on setting up Apache, nginx, or any other web server. This is beyond the scope of this document, we do offer a community wiki. Feel free to contribute!

The basic idea is you will want to redirect traffic from the domain you are running it on to the port you run node on (by default Cryptpad runs on port 3000).

Upgrading CryptPad

Upgrading CryptPad is rather simple (for example /var/www/cryptpad):

cd /var/www/cryptpad
git pull
npm update
bower update

We recommend that you always read the release notes before upgrading, as there may be changes that require special consideration.

Resetting CryptPad

If you would like to remove all the data from your CryptPad instance, a fresh install is the better option.

However, in some cases you may not want to clear out your entire installation, for example if you have made custom modifications. If that is the case, you can remove everything manually:

WARNING: This will delete all the data stored in CryptPad.

cd /var/www/cryptpad
rm -rf ./datastore

MongoDB

If you are using MongoDB, you will want to drop the relevant collection.

LevelDB

If you use the LevelDB adaptor, delete the datastore you configured.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.