Configure Etherpad-lite

From Fabelier
Jump to: navigation, search

Etherpad-lite sources and instructions are available here : https://github.com/Pita/etherpad-lite

On our server, here is how I installed it.

  • Create a system user, unable to login, with a home directory in /srv/etherpad/
 sudo adduser --system --home /srv/etherpad/ --disabled-password etherpad
  • Download sources and untar/unzip in /srv/etherpad
  • Change the owner
 sudo chown -R etherpad:nogroup /srv/etherpad/
  • Install nodejs-sqlite3
 sudo apt-get install node-sqlite3
  • Run config script
 cd /srv/etherpad/
 sudo -u etherpad bin/installDeps.sh
  • Edit config file settings.json
 "ip": "127.0.0.1",
 "port" : 9001,
 [...]
 "dbType" : "sqlite",
 //the database specific settings
 "dbSettings" : {
                  "filename" : "../var/sqlite.db"
                },
 [...]
 "loglevel": "WARN"
 backend etherpad
 {
 .host = "127.0.0.1";
 .port = "9001";
 }
 [...]
 if (req.http.host == "pad.fabelier.org")
 {
     set req.backend = etherpad;
 }
  • Create the init.d script from the debian skeleton :
 [...]
 PATH=/sbin/:/usr/sbin:/bin:/usr/bin
 DESC="Etherpad-lite"
 NAME=etherpad-lite
 DAEMON=/srv/etherpad/bin/run.sh
 DAEMON_ARGS=""
 PIDFILE=/var/run/$NAME.pid
 SCRIPTNAME=/etc/init.d/$NAME
 USER=etherpad
 
 # Exit if the package is not installed
 [ -x "$DAEMON" ] || exit 0
 
 # Read configuration variable file if it is present
 #[ -r /etc/default/$NAME ] && . /etc/default/$NAME
 
 # Load the VERBOSE setting and other rcS variables
 . /lib/init/vars.sh
 
 # Define LSB log_* functions.
 # Depend on lsb-base (>= 3.2-14) to ensure that this file is present
 # and status_of_proc is working.
 . /lib/lsb/init-functions
 
 #
 # Function that starts the daemon/service
 #
 do_start()
 {
         # Return
         #   0 if daemon has been started
         #   1 if daemon was already running
         #   2 if daemon could not be started
         start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $USER:nogroup --exec $DAEMON --test > /dev/null \
                 || return 1
         start-stop-daemon --start --quiet --pidfile $PIDFILE --background --chuid $USER:nogroup --exec $DAEMON -- \
                 $DAEMON_ARGS \
                 || return 2
         # Add code here, if necessary, that waits for the process to be ready
         # to handle requests from services started subsequently which depend
         # on this one.  As a last resort, sleep for some time.
 }
 [...]
  • Start the daemon :
 sudo /etc/init.d/etherpad-lite start

And now, Etherpad is available here : http://pad.fabelier.org

Enjoy, write and share :)

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox