
Etherpad is a free, open-source, web-based, and multi-user collaboration tool. It is used for editing a document through a web browser in real-time. It allows you to edit, review, and type documents simultaneously. It comes with tons of plugins that help you to customize your instance to suit your needs. With Etherpad, you can write articles, press releases, and to-do lists with your friends, students, or colleagues at the same time.
In this tutorial, we will show you how to install Etherpad on Ubuntu 20.04.
Table of Contents
Prerequisites
- An Ubuntu 20.04 VPS (we’ll be using our SSD 2 VPS plan)
- Access to the root user account (or access to an admin account with root privileges)
Step 1: Log in to the Server & Update the Server OS Packages
First, log in to your Ubuntu 20.04 server via SSH as the root user:
You will need to replace ‘IP_Address‘ and ‘Port_number‘ with your server’s respective IP address and SSH port number. Additionally, replace ‘root’ with the username of the admin account if necessary.
Before starting, you have to make sure that all Ubuntu OS packages installed on the server are up to date. You can do this by running the following commands:
Step 2: Install the Required Packages
First, you will need to install all dependencies required to install Etherpad in your server. You can install all of them with the following command:
Once all the packages are installed, you will need to install Node.js in your system. At the time of writing this tutorial, the latest version of Node.js is 14.15.0. By default, Node.js is not available in the Ubuntu 20.04 standard repository. So you will need to install the Node.js repository to your system. You can add the Node.js repository with the following command:
Once the repository is added, install the Node.js with the following command:
After installing Node.js, verify the installed version of Node.js with the following command:
You should get the following output:
Step 3: Install and Configure MariaDB Database
Etherpad uses MySQL/MariaDB to store its data. So MariaDB server must be installed in your server. If not installed, you can install it with the following command:
Once installed, log in to the MariaDB console with the following command:
Once login, create a database and user with the following command:
Next, flush the privileges and exit from the MariaDB with the following command:
Step 4: Install and Configure Etherpad
First, create a separate user to run the Etherpad:
Next, provide proper permissions to the Etherpad home directory with the following command:
Next, login with Etherpad user and verify the Node.js version as a Etherpad user with the following command:
Output:
Next, download the latest version of Etherpad from the Git repository using the following command:
Next, change the directory to the downloaded directory and run the Etherpad using the following command:
Once the Etherpad server started successfully, press CTRL + C to stop the server.
Next, edit the settings.json file and make some changes:
Remove the following lines:
Change the MySQL settings as shown below:
Change the line trustProxy to true:
Define a password for the admin user:
Save and close the file then install the required dependencies with the following command:
Next, exit from the Etherpad user with the following command:
Step 5: Create a Systemd Service File for Etherpad
Next, you will need to create a systemd service file to manage the Etherpad service.
Add the following lines:
Save and close the file then reload the systemd daemon to apply the changes:
Next, start the Etherpad service and enable it to start at system reboot with the following command:
At this point, Etherpad is started and listening on port 9001. You can verify it with the following command:
Output:
Step 6: Configure Nginx as a Reverse Proxy
Next, you will need to install and configure Nginx as a reverse proxy to access the Etherpad.
First, install the Nginx with the following command:
Once installed, create a new Nginx virtual host configuration file:
Add the following lines:
Save and close the file then activate the Nginx virtual host configuration file with the following command:
Next, restart the Nginx service to apply the changes:
Step 7: Access Etherpad
Now, open your web browser and access the Etherpad web interface using the URL http://etherpad.example.com
. You will be redirected to the Etherpad dashboard:
Provide your pad name and click on the OK button. You will be redirected to the Etherpad editor as shown below:
Congratulations! you have successfully installed and configured Etherpad with Nginx as a reverse proxy on Ubuntu 20.04.
Of course, you don’t have to install and configure Etherpad on Ubuntu 20.04, if you use one of our Managed Ubuntu Hosting solutions, in which case you can simply ask our expert Linux admins to set up and configure Etherpad on Ubuntu 18.20 for you. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post on how to install Etherpad on an Ubuntu 20.04 VPS, please share it with your friends on the social networks using the share buttons below, or simply leave a comment down in the comments section. Thanks.