How to Install Etherpad on Ubuntu Linux

Install Etherpad on Ubuntu Linux background

This article explains how to install Etherpad on Ubuntu Linux.

Etherpad is an open-source and customizable online editor that provides real-time collaborative editing.

Users can write articles and other documents with their friends, fellow students, or colleagues, working on the same documents simultaneously.

Whether you want to use your server or any available public instances, you can run and manage Etherpad quickly. The steps below show you how to install Etherpad on the Ubuntu Linux server.

Install prerequisites

Before installing Etherpad packages, run the commands below to install some helpful packages that may be needed to install Etherpad successfully.

To do that, run the commands below.

sudo apt update
sudo apt install gnupg2 git curl unzip libssl-dev pkg-config gcc g++ make build-essential

Install the MariaDB database server

Etherpad requires a database server to store its content. The best open-source database server is the MariaDB database server.

To install the MariaDB database server, use the instructions below.

sudo apt update
sudo apt install mariadb-server

Once the MariaDB database server is installed, use the commands below to stop, start and enable the MariaDB server to start up when the server boots automatically.

sudo systemctl stop mariadb
sudo systemctl start mariadb
sudo systemctl enable mariadb

Setup Etherpad database

Now that you have installed the MariaDB database log on to the database server and create a blank database for Etherpad.

sudo mariadb

Run the commands below to create a database called etherdb. Also, create a database account etheruser with a password and grant all privileges to manage the database.

GRANT ALL PRIVILEGES on etherdb.* to etheruser@localhost IDENTIFIED BY 'type_password_here';

Exit and flush changes.


Install Node.js

Etherpad uses Node.js and requires Node.js to be installed. Use the commands below to install Node.js packages on Ubuntu Linux.

sudo apt-get install -y nodejs

The commands above will install the latest version of Node.js on Ubuntu Linux.

Install Etherpad

Now we have prepared Ubuntu Linux, go and download Etherpad and install it. But first, create a system account for Etherpad with a password.

sudo useradd --system -d /opt/etherpad --shell=/bin/bash etherpad
sudo passwd etherpad
sudo install -d -m 755 -o etherpad -g etherpad /opt/etherpad

Next, change the Etherpad directory and download the Etherpad packages.

cd /opt/etherpad
su - etherpad
git clone --branch master

After downloading, run the commands below to configure the Etherpad environment.

cd etherpad-lite

Next, open the settings.json file.

nano settings.json

Make the changes below and save the file. Type in the database name and user account created above with the password.

Also, change the trustProxy line to true. Finally, type in an admin password when you want to configure Etherpad.

 "dbType" : "mysql",
  "dbSettings" : {
    "user":     "etheruser",
    "host":     "localhost",
    "port":     3306,
    "password": "type_password_here",
    "database": "etherdb",
    "charset":  "utf8mb4"

   * When you use NGINX or another proxy/load-balancer set this to true.
   * This is especially necessary when the reverse proxy performs SSL
   * termination, otherwise the cookies will not have the "secure" flag.
   * The other effect will be that the logs will contain the real client's IP,
   * instead of the reverse proxy's IP.
  "trustProxy": true,

  "users": {
    "admin": {
      // 1) "password" can be replaced with "hash" if you install ep_hash_auth
      // 2) please note that if password is null, the user will not be created
      "password": "type_password_here",
      "is_admin": true

Run the commands below after saving the file above. The commands below will install dependencies.


Exit using the Etherpad account.


Next, create a service account for Etherpad.

sudo nano /etc/systemd/system/etherpad.service

Type the content below into the file and save it.

Description=Etherpad-lite, the collaborative editor.


ExecStart=/usr/bin/node /opt/etherpad/etherpad-lite/src/node/server.js



Reload and start the Etherpad services.

sudo systemctl daemon-reload
sudo systemctl start etherpad
sudo systemctl enable etherpad

Install Nginx

You can use Etherpad without Nginx or Apache webserver. Howerver, the best way to run Etherpad is using a proxy server.

We can use Nginx for that.

sudo apt install nginx

Create an Nginx server block config file.

sudo nano /etc/nginx/sites-available/etherpad.conf

Copy the content below and paste it into the file, then save it.

upstream etherpad {
   server localhost:9001;
   keepalive 32;

server {
   listen 80;

   location / {
       client_max_body_size 50M;
       proxy_set_header X-Real-IP $remote_addr;
       proxy_http_version 1.1;
       proxy_pass http://etherpad;

Enable the site and reload.

sudo ln -s /etc/nginx/sites-available/etherpad.conf /etc/nginx/sites-enabled/
sudo systemctl restart nginx

Access Etnerpad portal

At this point, you are all done. Open your browser and browse to the domain name in the Nginx server block to access the Etherpad portal.

You will see a welcome page for Etherpad. You can create a new Pad or enter or open an existing page using a link.

Begin using Etherpad

That should do it!



This post showed you how to install Etherpad on Ubuntu Linux. If you find any errors above or have something to add, please use the comments form below.

Posted by

I love computers; maybe way too much. What I learned I try to share at

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: