{"id":7232,"date":"2018-11-14T20:02:38","date_gmt":"2018-11-14T17:02:38","guid":{"rendered":"https:\/\/www.howtoforge.com\/tutorial\/ubuntu-etherpad-editor-server-installation\/"},"modified":"2018-11-14T20:02:38","modified_gmt":"2018-11-14T17:02:38","slug":"how-to-install-collaborative-real-time-editor-etherpad-on-ubuntu-18-04","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/how-to-install-collaborative-real-time-editor-etherpad-on-ubuntu-18-04\/","title":{"rendered":"How to Install Collaborative Real-time Editor Etherpad on Ubuntu 18.04"},"content":{"rendered":"<p>Etherpad is a real-time collaborative editor based on Node.js. It&#8217;s an open source, web-based collaborative editor for multi-user access with the ability to import\/export to various office file formats and highly customizable online editor.<\/p>\n<p>In this tutorial,\u00a0I will guide you step-by-step to install and configure the Etherpad-lite on Ubuntu 18.04 Server. We will install the Etherpad-lite with the MySQL as a database, the Nginx web server as a reverse proxy, and enable the HTTPS secure connection on it.<\/p>\n<h2 id=\"prerequisites\">Prerequisites<\/h2>\n<ul>\n<li>Ubuntu 18.04 server<\/li>\n<li>Root privileges<\/li>\n<\/ul>\n<h2 id=\"what-we-will-do\">What we will do?<\/h2>\n<ol>\n<li>Install Packages Dependencies<\/li>\n<li>Install Nodejs<\/li>\n<li>Install and Configure MySQL<\/li>\n<li>Download Etherpad<\/li>\n<li>Configure Etherpad<\/li>\n<li>Setup Etherpad as a Service<\/li>\n<li>Setup Nginx as a Reverse Proxy for Etherpad<\/li>\n<li>Setup UFW Firewall<\/li>\n<li>Testing<\/li>\n<\/ol>\n<h2 id=\"step-install-packages-dependencies\">Step 1 &#8211; Install Packages Dependencies<\/h2>\n<p>The first step we will do in this guide is to install all package dependencies for Nodejs installation.<\/p>\n<p>Run the apt command below.<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo apt install gzip git curl python libssl-dev pkg-config gcc g++ make build-essential -y<\/code><\/pre>\n<p>Wait for all installation.<\/p>\n<h2 id=\"step-install-nodejs\">Step 2 &#8211; Install Nodejs<\/h2>\n<p>Etherpad requires Node.js &gt;= 6.9, and in this step we will install Nodejs 9.11 that can be installed from the nodesource repository.<\/p>\n<p>Add the nodesource Nodejs repository and install the Node.js package using commands below.<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">curl -sL https:\/\/deb.nodesource.com\/setup_9.x | sudo -E bash -<br\/>sudo apt install -y nodejs<\/code><\/pre>\n<p>After this, check the nodejs and npm commands.<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">nodejs --version<br\/>npm --version<\/code><\/pre>\n<p>The Node.js v9.11 has been installed on Ubuntu 18.04 server.<\/p>\n<p><a class=\"fancybox\" id=\"img-11\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_collaborative_real_time_editor_etherpad_on_ubuntu_1804\/big\/11.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/11\/how-to-install-collaborative-real-time-editor-etherpad-on-ubuntu-18-04.png\" alt=\"Install node.js\" width=\"500\" height=\"170\" title=\"\"><\/a><\/p>\n<h2 id=\"step-install-and-configure-mysql\">Step 3 &#8211; Install and Configure MySQL<\/h2>\n<p>In this tutorial, we will be using MySQL as the database for Etherpad.<\/p>\n<p>Install MySQL database server using the apt command below.<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo apt install mysql-server mysql-client<\/code><\/pre>\n<p>After the installation is complete, start the mysql service and enable it to launch everytime at system boot.<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo systemctl start mysql<br\/>sudo systemctl enable mysql<\/code><\/pre>\n<p>The MySQL server has been installed.<\/p>\n<p>Next, we will configure the mysql root password and create a new database and user for our etherpad installation.<\/p>\n<p>To configure the MySQL root password, run the command below.<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">mysql_secure_installation<\/code><\/pre>\n<p>Type your strong mysql root password.<\/p>\n<p>Now login to the mysql shell using root user.<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">mysql -u root -p<\/code><\/pre>\n<p>Create a new database named &#8216;etherpad_db&#8217; and user &#8216;hakase&#8217;, and run mysql queries below.<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">create database etherpad_db;<br\/>grant all privileges on etherpad_db.* to <a href=\"https:\/\/www.howtoforge.com\/cdn-cgi\/l\/email-protection\" class=\"__cf_email__\" data-cfemail=\"ddb5bcb6bcaeb89db1b2bebcb1b5b2aea9\" target=\"_blank\" rel=\"noopener\">[email\u00a0protected]<\/a> identified by '<a href=\"https:\/\/www.howtoforge.com\/cdn-cgi\/l\/email-protection\" class=\"__cf_email__\" data-cfemail=\"9ad2fbf1fbe9ffa9a8abda\" target=\"_blank\" rel=\"noopener\">[email\u00a0protected]<\/a>#';<br\/>flush privileges;<\/code><\/pre>\n<p>MySQL database for etherpad installation has been created.<\/p>\n<p><a class=\"fancybox\" id=\"img-51\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_collaborative_real_time_editor_etherpad_on_ubuntu_1804\/big\/51.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/11\/how-to-install-collaborative-real-time-editor-etherpad-on-ubuntu-18-04-1.png\" alt=\"Install MySQL\" width=\"500\" height=\"299\" title=\"\"><\/a><\/p>\n<h2 id=\"step-download-etherpad\">Step 4 &#8211; Download Etherpad<\/h2>\n<p>In this step, we will create a new user and download the etherpad source code.<\/p>\n<p>Create a new user named &#8216;etherpad&#8217; and login to the user.<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">useradd -m -s \/bin\/bash etherpad<br\/>su - etherpad<\/code><\/pre>\n<p>Now clone the etherpad repository.<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">git clone git:\/\/github.com\/ether\/etherpad-lite.git<\/code><\/pre>\n<p>Go to the &#8216;etherpad-lite\/&#8217; directory and run the bash script to start etherpad.<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">cd etherpad-lite\/<br\/>bin\/run.sh<\/code><\/pre>\n<p>You will get the result as below.<\/p>\n<p><a class=\"fancybox\" id=\"img-21\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_collaborative_real_time_editor_etherpad_on_ubuntu_1804\/big\/21.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/11\/how-to-install-collaborative-real-time-editor-etherpad-on-ubuntu-18-04-2.png\" alt=\"Download Etherpad\" width=\"500\" height=\"331\" title=\"\"><\/a><\/p>\n<p>Open your web browser and type the server IP address with port &#8216;9001&#8217;.<\/p>\n<p><em><strong>http:\/\/192.168.33.10:9001\/<\/strong><\/em><\/p>\n<p>And you will see the etherpad home page.<\/p>\n<p><a class=\"fancybox\" id=\"img-31\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_collaborative_real_time_editor_etherpad_on_ubuntu_1804\/big\/31.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/11\/how-to-install-collaborative-real-time-editor-etherpad-on-ubuntu-18-04-3.png\" alt=\"Access Etherpad\" width=\"500\" height=\"154\" title=\"\"><\/a><\/p>\n<p>Back to your terminal and press &#8216;Ctrl+c&#8217; to exit from the application.<\/p>\n<h2 id=\"step-configure-etherpad\">Step 5 &#8211; Configure Etherpad<\/h2>\n<p>In this step, we will do the basic configuration of etherpad collaborative editor.<\/p>\n<p>Login to the etherpad user and go to the &#8216;etherpad-lite&#8217; directory.<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">su - etherpad<br\/>cd etherpad-lite\/<\/code><\/pre>\n<p>Edit the configuration &#8216;settings.json&#8217; using <a href=\"https:\/\/www.howtoforge.com\/vim-basics\" target=\"_blank\" rel=\"noopener noreferrer\">vim editor<\/a>.<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">vim settings.json<\/code><\/pre>\n<p>Change the ip address to &#8216;127.0.0.1&#8217; or localhost, because we will run the etherpad on Nginx reverse proxy.<\/p>\n<pre><code spellcheck=\"false\">\u00a0 \"ip\": \"127.0.0.1\",<br\/>\u00a0 \"port\" : 9001,<\/code><\/pre>\n<p>Now disable the default dirty database by adding the comment &#8216;\/* &#8230;. *\/&#8217;, and paste the MySQL database configuration.<\/p>\n<pre><code spellcheck=\"false\">\u00a0\u00a0 \/*<br\/>\u00a0 \"dbType\" : \"dirty\",<br\/>\u00a0 \"dbSettings\" : {<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"filename\" : \"var\/dirty.db\"<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 },<br\/>\u00a0\u00a0 *\/<\/code><\/pre>\n<p>MySQL database configuration.<\/p>\n<pre><code spellcheck=\"false\">\u00a0 \"dbType\" : \"mysql\",<br\/>\u00a0 \"dbSettings\" : {<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"user\"\u00a0\u00a0\u00a0 : \"hakase\",<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"host\"\u00a0\u00a0\u00a0 : \"localhost\",<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"port\"\u00a0\u00a0\u00a0 : 3306,<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"password\": \"<a href=\"https:\/\/www.howtoforge.com\/cdn-cgi\/l\/email-protection\" class=\"__cf_email__\" data-cfemail=\"743c151f15071147464534\" target=\"_blank\" rel=\"noopener\">[email\u00a0protected]<\/a>#\",<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"database\": \"etherpad_db\",<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"charset\" : \"utf8mb4\"<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 },<\/code><\/pre>\n<p><a class=\"fancybox\" id=\"img-61\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_collaborative_real_time_editor_etherpad_on_ubuntu_1804\/big\/61.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/11\/how-to-install-collaborative-real-time-editor-etherpad-on-ubuntu-18-04-4.png\" alt=\"Etherpad configuration\" width=\"500\" height=\"285\" title=\"\"><\/a><\/p>\n<p>Next, we will enable the admin user by removing the comment from those lines and change the password value with a new password.<\/p>\n<pre><code spellcheck=\"false\">\u00a0 \"users\": {<br\/>\u00a0\u00a0\u00a0 \"admin\": {<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/ \"password\" can be replaced with \"hash\" if you install ep_hash_auth<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0 \"password\": \"<a href=\"https:\/\/www.howtoforge.com\/cdn-cgi\/l\/email-protection\" class=\"__cf_email__\" data-cfemail=\"99f1f8f2f8eafca8abaad9\" target=\"_blank\" rel=\"noopener\">[email\u00a0protected]<\/a>#\",<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0 \"is_admin\": true<br\/>\u00a0\u00a0\u00a0 },<br\/>\u00a0\u00a0\u00a0 \"user\": {<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/ \"password\" can be replaced with \"hash\" if you install ep_hash_auth<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0 \"password\": \"<a href=\"https:\/\/www.howtoforge.com\/cdn-cgi\/l\/email-protection\" class=\"__cf_email__\" data-cfemail=\"1c7d6d6b792d2e2f5c\" target=\"_blank\" rel=\"noopener\">[email\u00a0protected]<\/a>#\",<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0 \"is_admin\": false<br\/>\u00a0\u00a0\u00a0 }<br\/>\u00a0 },<\/code><\/pre>\n<p><a class=\"fancybox\" id=\"img-71\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_collaborative_real_time_editor_etherpad_on_ubuntu_1804\/big\/71.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/11\/how-to-install-collaborative-real-time-editor-etherpad-on-ubuntu-18-04-5.png\" alt=\"Configure password\" width=\"500\" height=\"165\" title=\"\"><\/a><\/p>\n<p>Save and exit.<\/p>\n<p>The basic etherpad configuration has been completed.<\/p>\n<h2 id=\"step-setup-etherpad-as-a-service\">Step 6 &#8211; Setup Etherpad as a service<\/h2>\n<p>Now we will run etherpad as a systemd service on our ubuntu system.<\/p>\n<p>Go to the &#8216;\/etc\/systemd\/system&#8217; directory and create a new service file named &#8216;etherpad.service&#8217;.<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">cd \/etc\/systemd\/system\/<br\/>vim etherpad.service<\/code><\/pre>\n<p>Paste configurations below.<\/p>\n<pre readability=\"7\"><code spellcheck=\"false\" readability=\"8\">[Unit]<br\/>Description=Etherpad-lite, the collaborative editor.<br\/>After=syslog.target network.target<p>[Service]<br\/>Type=simple<br\/>User=etherpad<br\/>Group=etherpad<br\/>WorkingDirectory=\/home\/etherpad\/etherpad-lite<br\/>Environment=NODE_ENV=production<br\/>ExecStart=\/usr\/bin\/nodejs \/home\/etherpad\/etherpad-lite\/node_modules\/ep_etherpad-lite\/node\/server.js<br\/>Restart=always # use mysql plus a complete settings.json to avoid Service hold-off time over, scheduling restart.<\/p><p>[Install]<br\/>WantedBy=multi-user.target<\/p><\/code><\/pre>\n<p>Save and exit.<\/p>\n<p>Reload the systemd service lists.<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo systemctl daemon-reload<\/code><\/pre>\n<p>Start the etherpad service and enable it to launch every time at system boot.<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo systemctl start etherpad<br\/>sudo systemctl enable etherpad<\/code><\/pre>\n<p>And the ether is up and running as a service on localhost ip with the default port 9001.<\/p>\n<p><a class=\"fancybox\" id=\"img-41\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_collaborative_real_time_editor_etherpad_on_ubuntu_1804\/big\/41.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/11\/how-to-install-collaborative-real-time-editor-etherpad-on-ubuntu-18-04-6.png\" alt=\"Run Etherpad as a service\" width=\"500\" height=\"166\" title=\"\"><\/a><\/p>\n<p>Check the service using commands below.<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo systemctl status etherpad<br\/>netstat -plntu<\/code><\/pre>\n<h2 id=\"step-install-and-configure-nginx-as-a-reverse-proxy\">Step 7 &#8211; Install and Configure Nginx as a Reverse proxy<\/h2>\n<p>In this step, we will install and configure Nginx web server as a reverse proxy for etherpad service.<\/p>\n<p>Install the nginx web server using apt command below.<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo apt install nginx -y<\/code><\/pre>\n<p>After the installation is complete, go to the &#8216;\/etc\/nginx\/sites-available&#8217; directory and create a new virtual host &#8216;etherpad&#8217;.<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">cd \/etc\/nginx\/sites-available\/<br\/>vim etherpad<\/code><\/pre>\n<p>Paste configurations below.<\/p>\n<pre readability=\"15\"><code spellcheck=\"false\" readability=\"24\">server {<br\/>\u00a0\u00a0\u00a0 listen\u00a0\u00a0\u00a0\u00a0\u00a0 80;<br\/>\u00a0\u00a0\u00a0 server_name pad.hakase.io;<br\/>\u00a0\u00a0\u00a0 rewrite\u00a0\u00a0\u00a0\u00a0 ^(.*)\u00a0\u00a0 https:\/\/$server_name$1 permanent;<br\/>}<p># we're in the http context here<br\/>map $http_upgrade $connection_upgrade {<br\/>\u00a0 default upgrade;<br\/>\u00a0 ''\u00a0\u00a0\u00a0\u00a0\u00a0 close;<br\/>}<\/p><p>server {<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 listen\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 443;<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 server_name\u00a0 pad.hakase.io;<\/p><p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 access_log\u00a0 \/var\/log\/nginx\/eplite.access.log;<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 error_log\u00a0\u00a0 \/var\/log\/nginx\/eplite.error.log;<\/p><p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ssl\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 on;<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ssl_certificate\u00a0\u00a0\u00a0\u00a0\u00a0 \/etc\/nginx\/ssl\/fullchain.pem;<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ssl_certificate_key\u00a0 \/etc\/nginx\/ssl\/privkey.pem;<\/p><p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ssl_session_timeout\u00a0 5m;<\/p><p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ssl_protocols TLSv1 TLSv1.1 TLSv1.2;<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ssl_prefer_server_ciphers on;<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ssl_ciphers \"EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS\";<\/p><p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 location \/ {<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_pass\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 http:\/\/localhost:9001\/;<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_set_header\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Host $host;<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_pass_header Server;<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # be careful, this line doesn't override any proxy_buffering on set in a conf.d\/file.conf<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_buffering off;<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_set_header X-Real-IP $remote_addr;\u00a0 # http:\/\/wiki.nginx.org\/HttpProxyModule<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_set_header X-Forwarded-For $remote_addr; # EP logs to show the actual remote IP<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_set_header X-Forwarded-Proto $scheme; # for EP to set secure cookie flag when https is used<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_set_header Host $host;\u00a0 # pass the host header\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_http_version 1.1;\u00a0 # recommended with keepalive connections\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # WebSocket proxying - from http:\/\/nginx.org\/en\/docs\/http\/websocket.html<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_set_header Upgrade $http_upgrade;<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_set_header Connection $connection_upgrade;<\/p><p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }<br\/>}<\/p><\/code><\/pre>\n<p>Save and exit.<\/p>\n<p><strong>Note:<\/strong><\/p>\n<ul>\n<li>Make sure you change the path of the SSL with your own ssl certificates.<\/li>\n<li>Change the etherpad domain &#8216;pad.hakase.io&#8217; with your own domain name.<\/li>\n<\/ul>\n<p>Now activate the etherpad virtual host and test the configuration.<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">ln -s \/etc\/nginx\/sites-available\/etherpad \/etc\/nginx\/sites-enabled\/<br\/>nginx -t<\/code><\/pre>\n<p>Make sure there is no error, then start the nginx service and enable it to launch everytime at system boot.<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo systemctl restart nginx<br\/>sudo systemctl enable nginx<\/code><\/pre>\n<p><a class=\"fancybox\" id=\"img-81\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_collaborative_real_time_editor_etherpad_on_ubuntu_1804\/big\/81.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/11\/how-to-install-collaborative-real-time-editor-etherpad-on-ubuntu-18-04-7.png\" alt=\"Etherpad behind nginx proxy\" width=\"500\" height=\"230\" title=\"\"><\/a><\/p>\n<p>The Nginx installation and configuration as etherpad reverse proxy has been completed successfully.<\/p>\n<h2 id=\"step-setup-ufw-firewall\">Step 8 &#8211; Setup UFW Firewall<\/h2>\n<p>For the firewall setup, we just want to open the SSH, HTTP, and HTTPS port services.<\/p>\n<p>Run ufw commands below.<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo fuw allow ssh<br\/>sudo ufw allow http<br\/>sudo ufw allow https<\/code><\/pre>\n<p>Then enable the ufw firewall.<\/p>\n<pre class=\"command\"><code spellcheck=\"false\">sudo ufw enable<\/code><\/pre>\n<p>And the ufw firewall configuration has been completed.<\/p>\n<h2 id=\"step-testing\">Step 9 &#8211; Testing<\/h2>\n<p>Open your web browser and type the etherpad domain name, mine is:\u00a0<em><strong>http:\/\/pad.hakase.io\/<\/strong><\/em><\/p>\n<p>Now you will be redirected to the HTTS secure connection.<\/p>\n<p><a class=\"fancybox\" id=\"img-9\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_collaborative_real_time_editor_etherpad_on_ubuntu_1804\/big\/9.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/11\/how-to-install-collaborative-real-time-editor-etherpad-on-ubuntu-18-04-8.png\" alt=\"Access Etherpad\" width=\"500\" height=\"218\" title=\"\"><\/a><\/p>\n<p>Create a new pad by typing the pad name on the box and click the &#8216;OK&#8217; button.<\/p>\n<p>And you will get the Etherpad editor as below.<\/p>\n<p><a class=\"fancybox\" id=\"img-10\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_collaborative_real_time_editor_etherpad_on_ubuntu_1804\/big\/10.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/11\/how-to-install-collaborative-real-time-editor-etherpad-on-ubuntu-18-04-9.png\" alt=\"Etherpad Editor\" width=\"500\" height=\"169\" title=\"\"><\/a><\/p>\n<p>Next, open the etherpad admin URL. Mine is\u00a0<em><strong>https:\/\/pad.hakase.io\/admin\/<\/strong><\/em><\/p>\n<p>You will be asked the admin username and password. Type your own user and password, then click the Signin button.<\/p>\n<p><a class=\"fancybox\" id=\"img-111\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_collaborative_real_time_editor_etherpad_on_ubuntu_1804\/big\/111.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/11\/how-to-install-collaborative-real-time-editor-etherpad-on-ubuntu-18-04-10.png\" alt=\"Etherpad admin area\" width=\"500\" height=\"194\" title=\"\"><\/a><\/p>\n<p>And you will get the default Etherpad admin page below.<\/p>\n<p><strong>&#8211; Etherpad settings.json Configuration<\/strong><\/p>\n<p><a class=\"fancybox\" id=\"img-12\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_collaborative_real_time_editor_etherpad_on_ubuntu_1804\/big\/12.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/11\/how-to-install-collaborative-real-time-editor-etherpad-on-ubuntu-18-04-11.png\" alt=\"Etherpad settings.json Configuration\" width=\"500\" height=\"243\" title=\"\"><\/a><\/p>\n<p><strong>&#8211; Etherpad Plugin Manager<\/strong><\/p>\n<p><a class=\"fancybox\" id=\"img-13\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_install_collaborative_real_time_editor_etherpad_on_ubuntu_1804\/big\/13.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/11\/how-to-install-collaborative-real-time-editor-etherpad-on-ubuntu-18-04-12.png\" alt=\"Plugin manager\" width=\"500\" height=\"253\" title=\"\"><\/a><\/p>\n<p>The Etherpad installation with MySQL and Nginx reverse proxy on Ubuntu 18.04 has been completed successfully.<\/p>\n<h2 id=\"reference\">Reference<\/h2>\n","protected":false},"excerpt":{"rendered":"<p>Etherpad is a real-time collaborative editor based on Node.js. It&#8217;s an open source, web-based collaborative editor for multi-user access with the ability to import\/export to various office file formats and highly customizable online editor. In this tutorial,\u00a0I will guide you step-by-step to install and configure the Etherpad-lite on Ubuntu 18.04 Server. We will install the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"class_list":["post-7232","post","type-post","status-publish","format-standard","hentry","category-36"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/7232","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=7232"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/7232\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=7232"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=7232"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=7232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}