Table of Contents
This tip is about the how to Run Etherpad Lite on Ubuntu 20.04 LTS. So read this free guide, How to Run Etherpad Lite on Ubuntu 20.04 LTS. If you have query related to same article you may contact us.
How to Run Etherpad Lite on Ubuntu 20.04 LTS – Guide
Etherpad is a real-time web-based online editor that allows authors to edit a text document and monitor all edits in real-time. It is open source, adjustable and capable of displaying each creator’s text in their own color. Likewise, it provides an HTTP API that you can coordinate with your applications to manage users and groups. It offers some plugins that help you coordinate email notifications, file uploads and video calls on Etherpad. In this instructional exercise, we will show you the best way to install the web-based Etherpad editor on the Ubuntu 20.04 server.
prerequisites
Log into the server and update the server operating system packages
First, log into your Ubuntu 20.04 server via SSH as root user:
ssh root @ IP_Address -p Port_number
You will need to replace ‘IP_Address’ and ‘Port_number’ with the respective server IP address and SSH port number. Also, replace ‘root’ with the username of the administrator account if necessary.
Before starting, you should make sure that all Ubuntu OS packages installed on the server are up Until the present date. You can do this by running the following commands:
apt-get update -yapt-get upgrade -y
Install the necessary packages
First, you will need to install all necessary dependencies to install Etherpad on your server. You can install them all with the following command:
apt-get install libssl-dev pkg-config git gcc g ++ make build-essential gnupg2 -y
Once all packages are installed, you will need to install Node.js on your system. As I write this tutorial, the latest version of Node.js is 14.15.0. By default, Node.js is not available in the Ubuntu 20.04 default repository. Therefore, you will need to install the Node.js repository on your system. You can add the Node.js repository with the following command:
curl -sL https://deb.nodesource.com/setup_14.x -o nodesource_setup.shbash nodesource_setup.sh
Once the repository is added, install Node.js with the following command:
apt-get install nodejs -y
After installing Node.js, check the installed version of Node.js with the following command:
node -v
You should get the following output:
v14.15.0
Install and configure the MariaDB database
Etherpad uses MySQL / MariaDB to store your data. Therefore, MariaDB server must be installed on your server. If it is not installed, you can install it with the following command:
apt-get install mariadb-server -y
Once installed, log into the MariaDB console with the following command:
mysql
After logging in, create a database and a user with the following command:
MariaDB [(none)]> create etherpaddb database; MariaDB [(none)]> grant all privileges on
etherpaddb. * for etherpad @ localhost identified by ‘secure password’;
Then release the privileges and exit MariaDB with the following command:
MariaDB [(none)]> release privileges; MariaDB [(none)]> exit;
Install and configure Etherpad
First, create a separate user to run Etherpad:
add user -home / opt / etherpad –shell / bin / bash etherpad
Then provide the appropriate permissions to Etherpad home directory with the following command:
install -d -m 755 -o etherpad -g etherpad / opt / etherpad
Then log in as the Etherpad user and check the Node.js version as an Etherpad user with the following command:
su – etherpadnode -v
Exit:
v14.15.0
Then download the latest version of Etherpad from the Git repository using the following command:
git clone –branch master https://github.com/ether/etherpad-lite.git
Then change directory to the downloaded directory and run Etherpad using the following command:
etherpad-litebin cd / run.sh
Once the Etherpad server has successfully started, press CTRL + C to stop the server.
Then edit the settings.json file and make some changes:
nano settings.json
Remove the following lines:
“DbType”: “dirty”, “dbSettings”: {“filename”: “var / dirty.db”},
Change the MySQL settings as shown below:
“DbType”: “mysql”, “dbSettings”: {“user”: “etherpad”, “host”: “localhost”, “port”: 3306, “password”: “secure password”, “database”: “ etherpaddb ”, “ charset ”: “ utf8mb4 ”},
Change the trustProxy line to true:
“TrustProxy”: true,
Set a password for the admin user:
“Users”: {“admin”: {“password”: “secure password”, “is_admin”: true},
Save and close the file and install the necessary dependencies with the following command:
./bin/installDeps.sh
Then exit the Etherpad user with the following command:
exit
Create a Systemd service file for Etherpad
Next, you will need to create a systemd service file to manage the Etherpad service.
nano /etc/systemd/system/etherpad.service
Add the following lines:
[Unit]Description = Etherpad-lite, the collaborative editor.After = syslog.target network.target
[Service]Type = simpleUser = etherpadGroup = etherpadWorkingDirectory = / opt / etherpad / etherpad-liteEnvironment = NODE_ENV = production
ExecStart = / usr / bin / node /opt/etherpad/etherpad-lite/src/node/server.js
restart = always
[Install]WantedBy = multi-user.target
Save and close the file and reload the systemd daemon to apply the changes:
systemctl daemon-reload
Then start the Etherpad service and enable it to start on system reboot with the following command:
systemctl start etherpadsystemctl enable etherpad
At this point, Etherpad is started and listening on port 9001. You can check it with the following command:
ss -plntu | grep 9001
Exit:
tcp LISTEN 0 511 0.0.0.0:9001
0.0.0.0:* users: ((“node”, pid = 14889, fd = 27))
Configure Nginx as a reverse proxy
Next, you will need to install and configure Nginx as a reverse proxy to access Etherpad.
First, install Nginx with the following command:
apt-get install nginx -y
Once installed, create a new Nginx virtual host configuration file:
nano /etc/nginx/sites-available/etherpad.conf
Add the following lines:
etherpad upstream {localhost server: 9001; keepalive 32;}
server {listen 80; server_name etherpad.example.com;
location / {client_max_body_size 50M; proxy_set_header X-Real-IP $remote_addr; proxy_http_version 1.1; proxy_pass http: // etherpad;}}
Save and close the file and launch the Nginx virtual host configuration file with the following command:
ln -s /etc/nginx/sites-available/etherpad.conf / etc / nginx / sites-enabled /
Then restart the Nginx service to apply the changes:
systemctl restart nginx
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 the name of your keyboard and click 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 need to install and configure Etherpad on Ubuntu 20.04 if you use one of our Ubuntu managed hosting solutions, in which case you can simply ask our expert Linux admins to set it up up and configure Etherpad on Ubuntu 18.20 for you. They are available 24 hours a day, 7 days a week and will respond to your request immediately.
PS. If you liked this post on how to install Etherpad on Ubuntu 20.04 VPS, please share with your friends on social media using share buttons below, or simply leave a comment in the comments section. Thanks.
Final note
I hope you like the guide How to Run Etherpad Lite on Ubuntu 20.04 LTS. In case if you have any query regards this article you may ask us. Also, please share your love by sharing this article with your friends.