zeldor.biz

Linux, programming and more

Copyright © 2025
Log in

Etherpad installation

January 20, 2014 by Igor Drobot Leave a Comment

Etherpad Logo

Etherpad is great tool for daily usage which improves productivity of your co workers and your team.

So I wrote this step by step 5 Minute installation guide.

Was written and tested on Debian 7.3.

Install all necessary packages to build Node.js:

1
apt-get install gzip git-core curl python libssl-dev pkg-config build-essential

apt-get install gzip git-core curl python libssl-dev pkg-config build-essential

Node.js installation withoud Node.js Etherpad will not start…

1
2
3
4
5
6
cd /usr/local/src/
wget http://nodejs.org/dist/node-latest.tar.gz
tar xzvf node-latest.tar.gz && cd node-v*
# check exit code with: echo $?
./configure && make
make install

cd /usr/local/src/ wget http://nodejs.org/dist/node-latest.tar.gz tar xzvf node-latest.tar.gz && cd node-v* # check exit code with: echo $? ./configure && make make install

Get new version of Etherpad:

1
2
3
git clone git://github.com/ether/etherpad-lite.git
cd etherpad-lite
cp settings.json.template settings.json

git clone git://github.com/ether/etherpad-lite.git cd etherpad-lite cp settings.json.template settings.json

Edit the configuration file (vim settings.json):
Fill in the sessionKey field with something random –> (pwgen -s20)

Add admin user (in same config):

1
2
3
4
5
6
"users": {
    "admin": {
      "password": "changemeplease",
      "is_admin": true
}
},

"users": { "admin": { "password": "changemeplease", "is_admin": true } },

Please create a separate user and _don’t_ start Etherpad as root!

1
2
adduser --system --home=/usr/local/src/etherpad-lite/ --group etherpad
chown -R etherpad: /usr/local/src/etherpad-lite/

adduser --system --home=/usr/local/src/etherpad-lite/ --group etherpad chown -R etherpad: /usr/local/src/etherpad-lite/

Start Etherpad manually:

1
su -c "/usr/local/src/etherpad-lite/bin/run.sh" -s /bin/bash etherpad

su -c "/usr/local/src/etherpad-lite/bin/run.sh" -s /bin/bash etherpad

Etherpad will be accessible after start over http://yourserver:9001/

Create new PAD

Etherpad in action

After you checked that everything works fine, Etherpad can be reconfigured system and user friendly;)

NGINX:

1
apt-get install nginx

apt-get install nginx

1
2
3
4
5
6
7
8
9
10
cat /etc/nginx/sites-enabled/default
server {
 listen       80;
 server_name  devel;
   location / {
     proxy_pass        http://devel:9001/;
     proxy_set_header  Host $host;
     proxy_buffering   off;
   }
}

cat /etc/nginx/sites-enabled/default server { listen 80; server_name devel; location / { proxy_pass http://devel:9001/; proxy_set_header Host $host; proxy_buffering off; } }

Upstart script:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/sh
 
### BEGIN INIT INFO
# Provides:          etherpad-lite
# Required-Start:    $local_fs $remote_fs $network $syslog
# Required-Stop:     $local_fs $remote_fs $network $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: starts etherpad lite
# Description:       starts etherpad lite using start-stop-daemon
### END INIT INFO
 
PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/node/bin"
LOGFILE="/usr/local/src/etherpad-lite/etherpad-lite.log"
EPLITE_DIR="/usr/local/src/etherpad-lite"
EPLITE_BIN="bin/safeRun.sh"
USER="etherpad"
GROUP="etherpad"
DESC="Etherpad Lite"
NAME="etherpad-lite"
 
set -e
 
. /lib/lsb/init-functions
 
start() {
  echo "Starting $DESC... "
 
    start-stop-daemon --start --chuid "$USER:$GROUP" --background --make-pidfile --pidfile /var/run/$NAME.pid --exec $EPLITE_DIR/$EPLITE_BIN -- $LOGFILE || true
  echo "done"
}
 
#We need this function to ensure the whole process tree will be killed
killtree() {
    local _pid=$1
    local _sig=${2-TERM}
    for _child in $(ps -o pid --no-headers --ppid ${_pid}); do
        killtree ${_child} ${_sig}
    done
    kill -${_sig} ${_pid}
}
 
stop() {
  echo "Stopping $DESC... "
   while test -d /proc/$(cat /var/run/$NAME.pid); do
    killtree $(cat /var/run/$NAME.pid) 15
    sleep 0.5
  done
  rm /var/run/$NAME.pid
  echo "done"
}
 
status() {
  status_of_proc -p /var/run/$NAME.pid "" "etherpad-lite" && exit 0 || exit $?
}
 
case "$1" in
  start)
      start
      ;;
  stop)
    stop
      ;;
  restart)
      stop
      start
      ;;
  status)
      status
      ;;
  *)
      echo "Usage: $NAME {start|stop|restart|status}" >&2
      exit 1
      ;;
esac
 
exit 0
 
# Make executable
chmod +x /etc/init.d/etherpad

#!/bin/sh ### BEGIN INIT INFO # Provides: etherpad-lite # Required-Start: $local_fs $remote_fs $network $syslog # Required-Stop: $local_fs $remote_fs $network $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: starts etherpad lite # Description: starts etherpad lite using start-stop-daemon ### END INIT INFO PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/node/bin" LOGFILE="/usr/local/src/etherpad-lite/etherpad-lite.log" EPLITE_DIR="/usr/local/src/etherpad-lite" EPLITE_BIN="bin/safeRun.sh" USER="etherpad" GROUP="etherpad" DESC="Etherpad Lite" NAME="etherpad-lite" set -e . /lib/lsb/init-functions start() { echo "Starting $DESC... " start-stop-daemon --start --chuid "$USER:$GROUP" --background --make-pidfile --pidfile /var/run/$NAME.pid --exec $EPLITE_DIR/$EPLITE_BIN -- $LOGFILE || true echo "done" } #We need this function to ensure the whole process tree will be killed killtree() { local _pid=$1 local _sig=${2-TERM} for _child in $(ps -o pid --no-headers --ppid ${_pid}); do killtree ${_child} ${_sig} done kill -${_sig} ${_pid} } stop() { echo "Stopping $DESC... " while test -d /proc/$(cat /var/run/$NAME.pid); do killtree $(cat /var/run/$NAME.pid) 15 sleep 0.5 done rm /var/run/$NAME.pid echo "done" } status() { status_of_proc -p /var/run/$NAME.pid "" "etherpad-lite" && exit 0 || exit $? } case "$1" in start) start ;; stop) stop ;; restart) stop start ;; status) status ;; *) echo "Usage: $NAME {start|stop|restart|status}" >&2 exit 1 ;; esac exit 0 # Make executable chmod +x /etc/init.d/etherpad

Have fun with great collaborative tool!

Filed Under: Linux Tagged With: Debian, Etherpad, Node.js

Categories

Archives

Tags

apache2 Apple arduino ARM Automation backup bash Cisco Cluster Corosync Database Debian Debian squeeze DIY DNS Fedora FTP Fun Icinga Ipv6 KVM Linux LVM MAC OS X Monitoring MySQL Nagios Nginx openSUSE OpenVPN PHP Proxy Python python3 qemu RAID rsync Samba security ssh Ubuntu virtualization Windows Windows 7 Wordpress

Leave a Reply

Your email address will not be published. Required fields are marked *

Yeaaah Cookie! We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok