How To Install Etherpad on Ubuntu 24.04 LTS
Etherpad is a powerful, open-source collaborative editing tool that allows multiple users to work on documents in real time. It is widely used in educational settings, business environments, and for personal projects, providing an efficient way to brainstorm ideas and collaborate on written content. This guide will walk you through the process of installing Etherpad on Ubuntu 24.04 LTS, ensuring you have everything you need to get started with this versatile application.
Prerequisites
System Requirements
- Processor: 1 GHz or faster
- RAM: Minimum of 1 GB (2 GB recommended)
- Disk Space: At least 500 MB free
Software Requirements
- Operating System: Ubuntu 24.04 LTS
- Node.js: Version 14 or later
- NPM: Node Package Manager for managing Node.js packages
- Database: MariaDB or MySQL for data storage
- Nginx: Optional, for setting up a reverse proxy
- Git: For cloning the Etherpad repository
- Python3: Required for some dependencies
Step 1: Update Your System
The first step in installing Etherpad is to ensure your system is up to date. Open your terminal and run the following commands:
sudo apt update && sudo apt upgrade -y
This command updates the package lists and upgrades all installed packages to their latest versions, ensuring that your system has the latest security patches and features.
Step 2: Install Dependencies
Next, you need to install the necessary dependencies for Etherpad. In your terminal, execute the following command:
sudo apt install mariadb-server nginx nodejs npm git curl python3 libssl-dev -y
This command installs MariaDB (the database server), Nginx (optional web server), Node.js, npm, Git, and other essential libraries required for Etherpad.
Verifying Installations
After installation, verify that Node.js and npm are installed correctly by checking their versions:
node -v
npm -v
You should see the version numbers displayed in the terminal. If not, revisit the installation steps.
Step 3: Set Up Database
A database is essential for storing Etherpad’s data. Follow these steps to create a database and user for Etherpad using MariaDB:
sudo mysql -u root -p
You will be prompted to enter your MariaDB root password. Once logged in, execute the following SQL commands:
CREATE DATABASE etherpad;
CREATE USER 'etherpaduser'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON etherpad.* TO 'etherpaduser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
This creates a new database named “etherpad
” and a user “etherpaduser
” with full privileges on that database. Replace ‘your_password
‘ with a strong password of your choice.
Step 4: Install Etherpad
The next step is to download and install Etherpad itself. Start by cloning the Etherpad repository from GitHub:
git clone https://github.com/ether/etherpad-lite.git /opt/etherpad-lite
This command downloads the latest version of Etherpad into the specified directory.
Setting Permissions
You need to set the correct permissions for the Etherpad directory so that it can be accessed by your user account:
sudo chown -R $USER:$USER /opt/etherpad-lite
Installing Etherpad Dependencies
Navigating into the Etherpad directory allows you to install its dependencies using npm:
cd /opt/etherpad-lite && npm install
This command installs all necessary Node.js packages required for Etherpad to function properly.
Step 5: Configure Etherpad
The configuration file needs to be edited to set up database connections and other parameters. Start by copying the template configuration file:
cp settings.json.template settings.json
Edit this file using a text editor like nano:
nano settings.json
You will need to make several key changes within this file:
- “dbType”: “mysql”: Set this to indicate you’re using MySQL/MariaDB.
- “dbSettings”: Update this section with your database credentials:
{ "user": "etherpaduser", "host": "localhost", "password": "your_password", "database": "etherpad" }
- “ip”: “0.0.0.0”: This allows Etherpad to accept connections from any IP address.
- “port”: 9001: The default port where Etherpad will run.
Optional Configurations
You can also enable authentication by modifying additional settings within `settings.json
`. This allows you to manage user access effectively.
Step 6: Running Etherpad
You can start Etherpad manually using the following command in the terminal:
/opt/etherpad-lite/bin/run.sh
This will launch Etherpad, but it’s recommended to set it up as a systemd
service for easier management.
Setting Up as a Systemd Service
Create a new service file for Etherpad by executing:
sudonano /etc/systemd/system/etherpad.service
Add the following content to this service file:
[Unit]
Description=EtherPad
After=network.target
[Service]
Type=simple
User=your_username
ExecStart=/usr/bin/node /opt/etherpad-lite/node_modules/.bin/ep
Restart=on-failure
[Install]
WantedBy=multi-user.target
Replace `your_username` with your actual username.
Enable and Start Service
You can now enable and start the Etherpad service with these commands:
sudo systemctl enable etherpad
sudo systemctl start etherpad
Step 7: Accessing Etherpad
Your Etherpad instance should now be running. You can access it via your web browser by navigating to:
http://your-server-ip:9001
Replace `your-server-ip
` with your actual server IP address.
Troubleshooting Access Issues
If you encounter issues accessing Etherpad, ensure that port 9001 is open in your firewall:
sudo ufw allow 9001/tcp
sudo ufw reload
Congratulations! You have successfully installed Etherpad. Thanks for using this tutorial for installing the Etherpad open-source collaborative text editor on your Ubuntu 24.04 LTS system. For additional help or useful information, we recommend you check the official Etherpad website.