Container Application "Etherpad Lite"

Introduction

Etherpad is "a highly customizable Open Source online editor providing collaborative editing in really real-time" (cited from http://etherpad.org). It's an application written for NodeJS. This editor runs within a browser and allows concurrent editing in real time by several users.

This document will describe how to install Ethernet within a container.

Install and configure a container with NodeJS

Make sure the time and date of the router is up to date. This is important for certificates to become valid.

Upload and configure the NodeJS container on your router. Bridge the container to an IP net that has access to the internet. Enter the container and set up networking there. Enter a reachable address for the DNS server, most likely this will be the routers IP address:


root@container_nodejs ~ $ echo "nameserver IP_ADDRESS_OF_NAMESERVER" > /etc/resolv.conf

Edit the script that will set the default gateway after starting the container:


root@container_nodejs ~ $ vi /bin/start_net

Press "i" to enter the editing mode of vi and exchange the IP address of the default gateway, most likely this will also be the routers IP address. Store and exit vi with the keys <ESC> : x.

Execute the script, so the default route gets set:


root@container_nodejs ~ $ /bin/start_net

Test the internet connection:


root@container_nodejs ~ $ ping etherpad.org

Install Etherpad

Update the packet manager tool npm:


root@container_nodejs ~ $ npm i -g npm

Get the latest Etherpad files into your container:


root@container_nodejs ~ $ wget https://github.com/ether/etherpad-lite/zipball/master

Unpack the archive:


root@container_nodejs ~ $ unzip master

Start Etherpad

Etherpad will always look for updates and missing files before starting. The first launch will last for several minutes. Enter the new directory, which name is dependent on the time you downloaded the archive.


root@container_nodejs ~ $ ls
ether-etherpad-lite-9f51432
root@container_nodejs ~ $ ./ether-etherpad-lite-9f51432/bin/run.sh --root

Wait until the installer has finished with a message like:


[2017-05-10 11:10:19.406] [INFO] console - You can access your Etherpad instance at http://0.0.0.0:9001/

Open a browser and enter the the IP address of the container and the port. Example:


http://192.168.1.2:9001

This will also take a few seconds. Enter the name of a new pad and start to enjoy Etherpad!

Start Etherpad automatically

In case you want to start Etherpad automatically after the container start enter this as a service in /etc/finit.conf

root@container_nodejs ~  $ vi /etc/finit.conf

Again enter the editing mode of vi with "i" and append this line:


service /root/ether-etherpad-lite-9f51432/bin/run.sh --root

Store and exit vi with the keys ESC : x.