Linux MintUbuntu Based

How To Install Etherpad on Linux Mint 22

Install Etherpad on Linux Mint 22

In this tutorial, we will show you how to install Etherpad on Linux Mint 22. Etherpad is a powerful, open-source solution for real-time collaborative editing. It allows teams to work together on documents, brainstorming sessions, and note-taking tasks simultaneously, offering immediate feedback and visibility into what everyone is contributing. This makes Etherpad particularly valuable for educational institutions, open-source teams, or businesses that need a fast and transparent way to manage shared text documents.

When installed on Linux Mint 22, Etherpad can become an indispensable part of a productivity workflow. The platform provides a user-friendly web interface, enabling editors to format text, add hyperlinks, import or export documents, and even integrate plugins that extend functionality. Whether you manage large projects or small group collaborations, Etherpad delivers a quick and easy way to streamline writing sessions.

Below is a thorough, step-by-step guide on how to install and configure Etherpad on Linux Mint 22. Follow each section carefully to get Etherpad running smoothly.

Prerequisites and System Preparation

System Requirements

Before moving forward, ensure that your system meets a few basic requirements. Etherpad is mostly resource-light, but for the best performance, the system should have at least:

  • A 64-bit processor
  • 2 GB of RAM (4 GB recommended if multiple users will be editing documents simultaneously)
  • Adequate disk space (20 GB free is a safe baseline, especially if using a database and storing many documents)
  • An active internet connection for downloading dependencies and updates

Most modern machines running Linux Mint 22 will meet these requirement levels comfortably. Still, it is good practice to confirm memory and CPU capabilities before starting.

Initial Setup

Once the requirements are verified, it is advisable to update the system to ensure up-to-date packages and security patches:

sudo apt update
sudo apt upgrade -y

Stay informed that updating the package list and upgrading the system packages helps avoid compatibility issues when installing new software. After upgrading, reboot if necessary. This step ensures that the entire system has the latest stable versions of libraries required by Etherpad dependencies.

Installing Node.js

Etherpad is built on Node.js, so having the correct version of Node.js installed is essential. By default, Linux Mint 22 may offer a distribution-specific version of Node.js through the standard repository. However, it is recommended to install a recent Long-Term Support (LTS) version of Node.js for maximum compatibility and security.

Adding the Node.js Repository

Use the official NodeSource repository to install Node.js. This repository typically provides newer releases than the default system repositories. The following commands will add the repository, update package lists, and install Node.js:

curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt update

The above script fetches and adds the NodeSource GPG key and repository details to your system, ensuring you have a current, maintained version of Node.js available for installation.

Installing Node.js and npm

Run:

sudo apt install nodejs -y

This command will install both Node.js and npm, the Node Package Manager.

Verifying Installation

Once the installation completes, check the version:

node -v
npm -v

If the versions show up properly (e.g., Node.js LTS release and npm), then the Node.js environment is ready.

Having an updated Node.js ensures a smooth setup of Etherpad and smooth performance going forward.

Creating Etherpad User and Directory Structure

For a clean, organized system, it is best practice to run Etherpad under a dedicated user account. This approach reduces the risk of security issues and file permission conflicts.

Creating a Dedicated Etherpad User

Create a new user named etherpad (or any meaningful username) without login privileges:

sudo adduser --system --home /opt/etherpad --group etherpad

The --system option creates a system account, --home specifies the home directory, and --group ensures a group with the same name is also created.

Setting Up Directory Permissions

Navigate to the /opt directory:

cd /opt

Then create a directory that will store Etherpad’s files and logs if needed. In some configurations, the /opt/etherpad directory might already exist. Confirm ownership:

sudo chown -R etherpad:etherpad /opt/etherpad

This command ensures the new etherpad user has full rights, keeping other accounts restricted. Such an arrangement helps protect Etherpad’s data and configuration files.

Installing Etherpad

After preparing the user and environment, it is time to install Etherpad itself. This involves downloading the Etherpad source code, installing essential dependencies, and performing fundamental configuration steps.

Download and Setup

Switch to the etherpad user account:

sudo su - etherpad

Once inside the user’s home directory (e.g., /opt/etherpad), clone the Etherpad repository from Git:

git clone --branch master https://github.com/ether/etherpad-lite.git ~/etherpad-lite

Navigate to the newly cloned folder:

cd ~/etherpad-lite

Etherpad requires several Node.js modules. To install them, run:

bin/installDeps.sh

This script automatically fetches all the necessary packages. Depending on system speed and internet connectivity, the process could take a few minutes. When completed, the core setup of Etherpad is essentially in place.

Configuration Steps

Configuring Etherpad is managed through a settings file, typically named settings.json. A default settings file is included in the repo, labeled settings.json.template or similar. To begin customizing:

cp settings.json.template settings.json

Open the settings.json file in a text editor (e.g., Nano or Vim):

nano settings.json

Within this configuration file, pay close attention to:

  • IP and Port: By default, Etherpad listens on 127.0.0.1:9001. Adjust if needed for external access or if other services conflict.
  • Admin Password: Protect the admin panel by setting a secure password.
  • Database Configuration: Specify if you want to connect Etherpad to a MySQL, PostgreSQL, or other database. This is optional but beneficial for multi-user production setups.
  • Trust Proxy Settings: Enable trust proxy if Etherpad is placed behind a reverse proxy or load balancer.

Save and exit when done. The platform is now ready to be tested, although it is best to set up a system-wide service and handle database configuration before finalizing.

Setting Up Systemd Service

To ensure Etherpad starts automatically at boot and stays running reliably, configure it as a systemd service. This step is particularly important for production environments, where you need minimal downtime.

First, exit the etherpad user session to return to the root or sudo-capable account:

exit

Create a service file at /etc/systemd/system/etherpad.service:

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

Inside the file, add:

[Unit]
Description=Etherpad Lite Service
After=syslog.target network.target

[Service]
Type=simple
User=etherpad
Group=etherpad
WorkingDirectory=/opt/etherpad/etherpad-lite
ExecStart=/usr/bin/node /opt/etherpad/etherpad-lite/bin/run.sh
Restart=always

[Install]
WantedBy=multi-user.target

Ensure the WorkingDirectory and ExecStart paths match your actual installation directories.

Next, reload systemd to apply the new service configuration:

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

Verify the service status:

sudo systemctl status etherpad

If everything is correct, you should see Etherpad running. This systemd service will automatically launch Etherpad on every system startup.

Database Integration

Etherpad can store documents either in a “DirtyDB”—which is default for testing—and ephemeral usage—or in a more robust database solution like MySQL, MariaDB, or PostgreSQL. Using a real database enhances the reliability of data storage and keeps performance stable under high usage.

Installing a Database Server

If MySQL or MariaDB is preferred, install it with:

sudo apt update
sudo apt install mariadb-server -y

After installation, secure the database environment:

sudo mysql_secure_installation

Creating a Database and User

Within the MySQL or MariaDB shell, create a database and user for Etherpad:

sudo mysql
CREATE DATABASE etherpad_db;
CREATE USER 'etherpad_user'@'localhost' IDENTIFIED BY 'strong_password';
GRANT ALL PRIVILEGES ON etherpad_db.* TO 'etherpad_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Configuring Database Connection

In the settings.json file, specify the newly created database details under the dbType (e.g., "mysql" or "postgres") and relevant dbSettings. For MySQL, an example snippet might look like:

"dbType" : "mysql",
"dbSettings" : {
    "user"    : "etherpad_user",
    "host"    : "localhost",
    "password": "strong_password",
    "database": "etherpad_db"
},

Restart Etherpad to apply changes:

sudo systemctl restart etherpad

Security Configuration

Security is a critical aspect of hosting any collaborative service. Since Etherpad is a web-facing platform, it is important to secure traffic, limit unauthorized access, and safeguard user credentials.

Using HTTPS/SSL Certificates is strongly advised. One way is to deploy a reverse proxy (e.g., Nginx or Apache) in front of Etherpad, handling the SSL certificate. By routing all traffic through the proxy, it becomes easier to manage SSL certificates from issuers like Let’s Encrypt.

Additionally, configure the following:

  • Firewall Rules: Allow incoming connections only on the necessary ports (e.g., port 443 if using HTTPS behind a proxy) and block everything else.
  • Admin Password: Use a unique, complex password for the Etherpad admin interface.
  • Plugin Management: Only install plugins from reputable sources to minimize vulnerability risks.

Implementing these measures ensures data integrity and user protection in a shared editing environment.

Testing and Verification

With everything in place, it is time to verify that Etherpad is operational. Open a web browser and navigate to the server’s IP address or domain name with the configured port, for example:

http://your-server-ip:9001

You should see Etherpad’s initial interface. Create a new pad, and begin typing. Invite another user or open a second browser window to test real-time edits. If you see all changes instantly appear, Etherpad is working as intended.

Install Etherpad on Linux Mint 22

For further confirmation, log in to the admin interface (if you set an admin password). This area provides additional controls for plugins, pad management, and more.

If everything appears normal, then the basic setup is complete. To finalize, ensure the systemd service is enabled and monitor logs for errors or warnings.

Troubleshooting Common Issues

Although Etherpad generally installs smoothly, certain issues might arise. Below are some common problems and quick fixes:

1. Port Conflicts

If Etherpad fails to start, check whether port 9001 is in use by another service. Update settings.json or reconfigure any conflicting application. Then restart Etherpad:

sudo systemctl restart etherpad

2. Permission Issues

Pay attention to the directory ownership. Ensure /opt/etherpad is owned by the etherpad user. Verify with:

ls -l /opt | grep etherpad

If incorrect, run:

sudo chown -R etherpad:etherpad /opt/etherpad

3. Database Connection Problems

Connectivity errors commonly stem from incorrect credentials or database server misconfigurations. Confirm accuracy in settings.json and ensure the database server is running:

sudo systemctl status mariadb

If the configuration is correct and the database is running, check the logs in var/log or Etherpad’s logs folder to isolate the cause.

Maintenance and Updates

Once Etherpad is up and running, maintaining it properly will ensure a stable experience and prevent unexpected downtime.

Backup Procedures

Regularly back up the database if one is used, as that is where pads and user data are stored. Exporting or dumping the database is a quick way to capture your instance’s current state:

mysqldump -u etherpad_user -p etherpad_db > /path/to/backup/etherpad_db_$(date +%F).sql

Update Process

When a new version of Etherpad is released, switch to the etherpad user, pull the updated code from GitHub, and rerun bin/installDeps.sh:

sudo su - etherpad
cd ~/etherpad-lite
git pull origin master
bin/installDeps.sh
exit
sudo systemctl restart etherpad

Performance Monitoring

Monitor server resource usage to detect issues early. Tools like htop and journalctl -u etherpad can help identify memory or CPU constraints, ensuring your system is always prepared for real-time collaborations.

Congratulations! You have successfully installed Etherpad. Thanks for using this tutorial for installing the Etherpad open-source collaborative text editor on Linux Mint 22 system. For additional help or useful information, we recommend you check the official Etherpad website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button