TNS
VOXPOP
Where are you using WebAssembly?
Wasm promises to let developers build once and run anywhere. Are you using it yet?
At work, for production apps
0%
At work, but not for production apps
0%
I don’t use WebAssembly but expect to when the technology matures
0%
I have no plans to use WebAssembly
0%
No plans and I get mad whenever I see the buzzword
0%
Containers / Operations

Deploy Etherpad for an In-House Alternative to Google Docs

The only things you'll need for this are a running instance of Ubuntu Server and a user with sudo privileges.
Aug 12th, 2023 6:00am by
Featued image for: Deploy Etherpad for an In-House Alternative to Google Docs

If your developers (or any team in your business) need to make use of an in-house solution to house things like documentation, code, YAML files, or just about anything, there are a vast array of options to choose from.

One such option is Etherpad, which is a web-based text editor that offers real-time collaboration, versioning, and formatting. Etherpad also supports plugins for things like alignment, headings, markdown, image uploads, comments, font colors, TOC, hyperlink embedding, spellcheck, and more. To find a complete list of plugins, check out the official listing here.

Etherpad is also available in 105 languages and is used by millions around the globe.

With this tool, your teams could easily collaborate on many different types of documents, without having to rely on a third-party service.

I’m going to demonstrate deploying Etherpad by way of Docker on Ubuntu Server 22.04. You can deploy Etherpad in-house or even on your third-party cloud host.

What You’ll Need

The only things you’ll need for this are a running instance of Ubuntu Server and a user with sudo privileges. Because we’re deploying this as an in-house service, it doesn’t require a domain name. If, however, you want to access Etherpad from outside your LAN, you’ll have to take the extra steps to configure the server for a domain and make sure your network hardware is configured to route traffic to the Etherpad server.

Installing Docker

Because we’re going to deploy Etherpad as a container, you’ll want to have the Docker runtime engine installed on your machine, which means you can deploy on any platform that supports Docker. Of course, being that Ubuntu Server is my go-to platform of choice, I’ll demonstrate on that OS.

Log into your instance of Ubuntu Server. If your server has a GUI, open a terminal window. Once logged in, the first thing to do is add the official Docker GPG key with the command:


Next, add the official Docker repository with:


Install the necessary dependencies with:


Update apt with the command:


You can now install the latest version of the Docker engine with the command:


Add your to the docker group (so you can work with Docker without having to use sudo…which can be a security risk) with the command:


Log out and log back in, so the changes take effect.

With Docker installed, you’re ready to deploy Etherpad.

Deploying Etherpad with Docker

It’s now time to deploy Etherpad. First, let’s pull the latest official image with the command:


After the image pulls, you can deploy the container with the command:


Give the container a minute to spin up. You can check its status with the command:


The output should include healthy, which indicates the container is up and running and ready for connections.

Accessing Etherpad

At this point, Etherpad is ready. Point a web browser (that’s connected to the same network hosting Etherpad) to http://SERVER:9001 (where SERVER is the IP address of the hosting server. You’ll be greeted by the New Pad create button (Figure 1).

Figure 1: A fresh Etherpad instance, ready for collaboration.

You can either click New Pad or type a name for a new pad and click OK. Since this is your first time working with Etherpad, there won’t be any Pads to work with. Once Etherpad loads, you’ll see a quick note on the first pad.

The Full Install Route

One thing to keep in mind, however, is that the Docker version of Etherpad uses DirtyDB, which isn’t generally recommended for production. You can suppress this warning (as instructed by the initial Pad) or you can skip the Docker deployment and do a full installation. Here are the steps for installing Etherpad on Ubuntu Server 22.04.

  1. If you already deployed the container, stop it with docker stop ID (where ID is the ID of the Etherpad container, which can be found with docker ps -a |grep etherpad).
  2. Add the Nodejs repository with curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash –
  3. Install Nodejs with sudo apt-get install nodejs -y
  4. Install MariaDB server with sudo apt-get ijnstall mariadb-server -y
  5. Log into the MariaDB console with sudo mysql
  6. Create the database with CREATE DATABASE etherpad_db;
  7. Create a user with CREATE USER etherpaduser@localhost IDENTIFIED By ‘PASSWORD’; (Where PASSWORD is a strong password).
  8. Grant the necessary privileges with GRANT ALL PRIVILEGES ON etherpad_db.* TO etherpaduser@localhost;
  9. Flush the privilege table with FLUSH PRIVILEGES;
  10. Exit the MariaDB console with EXIT
  11. Add a dedicated user with sudo adduser ether
  12. Change to the new user with su ether
  13. Clone the Etherpad source with git clone –branch master https://github.com/ether/etherpad-lite.git
  14. Change into the newly-created directory with cd etherpad-lite
  15. Set a necessary environment variable with export NODE_ENV=production
  16. Install Etherpad with src/bin/run.sh
  17. Open the firewall with sudo ufw allow 9001.

The above steps will install and start Etherpad but won’t return your bash prompt. There’s still some work to do. Cancel the running service with the [Ctrl]+[C] keyboard shortcut. Open the Etherpad settings file with the command:

nano etherpad-lite/settings.json

Change this section:


To this:


Next, locate the “dbType“: “mysql“, section and remove the /* and */ lines. In that same section, change the user option to etherpaduser and the password option to the password you set for the etherpad database user and change the database entry to etherpad_db. Next, locate the trustProxy line and change it from false to true.

In the same file, locate the requireAuthentication variable and change it from false to true.

Finally, locate the user section (it starts with “users”: {) and remove the /* and */ lines. In that same section, change the password (which defaults to changeme1) to something strong and unique.

Save and close the file.

Install the necessary dependencies by issuing the command:


When that completes, exit from the current user with the exit command.

Next, we must create a systemd service file with the command:


Paste the following lines into the file:


Save and close the file.

Reload the systemd daemon with the command:


Start and enable the service with:


You should now be able to access Etherpad in the same way as you did after deploying it with Docker.

Either way, your teams will enjoy an in-house, real-time collaboration tool where they can work together on documentation, code, YAML files, or just anything that can be created within a text editor.

Group Created with Sketch.
TNS owner Insight Partners is an investor in: Unit, Docker.
THE NEW STACK UPDATE A newsletter digest of the week’s most important stories & analyses.