/var/www/  /var/www

Etherpad Lite & MongoDB

November 1st 2013

By default Etherpad support dirty, postgres, sqlite and mysql databases. But it can also be configured to use with MongoDB with a little hack. Thanks to UeberDB, the database abstraction layer used in Etherpad. This means, it can also be configured to use with level, redis, Cassandra or CouchDB. I will focus this tutorial for MongoDB integration, but same method can be used to make Etherpad work with other DataBase systems (Which are supported by UeberDB).

Change the directory to Etherpad installation, In my case

[email protected]:~$ cd etherpad-lite

Open up settings.json with any editor of your choice.

[email protected]:~/etherpad-lite$ gedit settings.json

Change database type to "mongodb" and update settings. Make sure you provide the correct user, password, host and port for mongoDB according to your local setup.

"dbType" : "mongodb",

"dbSettings" : {
  "user"    : "user",
  "host"    : "localhost",
  "port" : 43348,
  "password": "password",
  "dbname": "db_name"

Upon running etherpad at this moment, you may encouter an error "cannot find mongodb". You need to install Mongodb using NPM.

[email protected]:~/etherpad-lite$ npm install mongodb

Thats it. You are done. Now we can run Etherpad by issuing the following command.

[email protected]:~/etherpad-lite$ bin/run.sh

Your comments