How to use Etherpad Lite with PostgreSQL

Luiza Pagliari edited this page Sep 16, 2016 · 3 revisions

General

Resources

For Developers

How to's

Set up

Advanced steps

Integrating Etherpad in your web app

for Developers

Clone this wiki locally
  1. Connect to PostgreSQL by opening a command prompt and typing the following: psql
  2. Once logged in, issue the following command to create a new user : CREATE USER etherpad;̀
  3. Configure a password for the created user. Replace <password> with your own value : ALTER USER etherpad WITH PASSWORD '<password>';
  4. Create a new database which belongs to the new user : CREATE DATABASE etherpad OWNER etherpad;
  5. Leave the mysql client CTRL + D
  6. Install node-pg : apt install node-pg
  7. Edit settings.json in your Etherpad Lite root folder and change the database settings (if you have a non-default port configured for PostgreSQL you will have to add the "port" setting). It is strongly encouraged to set the option "charset" to "utf8mb4". Depending on your PostgreSQL configuration, you will have to set the "host" key to "localhost".
  8. Run etherpad lite

Example PostgreSQL Socket Config.

"dbType" : "postgres",
"dbSettings" : {
    "user"    : "etherpad",
    "host"    : "localhost",
    "password": "password",
    "database": "etherpad",
    "charset" : "utf8mb4"
}