How to install Etherpad on Debian

Etherpad is a hosted web service that allows really real-time document collaboration for groups of users. It’s like Google Docs, or perhaps Google Docs is like Etherpad on steroids ? Anyway, if you’re looking for a secure real-time document sharing tool (unfortunately Etherpad is only able to server text documents with very basic formatting) here’s how to deploy it on Debian (Squeeze).

Etherpad Fundation is providing a universal repo for Debian based systems, however simple apt-get install etherpad doesn’t work as expected so here are the steps to get it working:

Add APT repo

Add following line to /etc/apt/sources.list

deb http://apt.etherpad.org all .

Update and install Etherpad

user@computer:$ apt-get update && apt-get install etherpad

You’ll be asked for MySQL password and Etherpad Admin password but that’s easy. You also need mail server, if you don’t have one installed this should be enough

user@computer:$ apt-get install postfix

So far so good but I had no idea how to start this thing as there’s no good documentation but here’s what you need to do:

Fix it

Change /etc/init.d/etherpad

from:

DAEMON_BASE="/usr/local/etherpad"

to:

DAEMON_BASE="/usr/share/etherpad"

You should be able to access Etherpad from localhost on port 9000 but who likes to use those nasty ports ? Let’s add reverse proxy to serve it:

Install nginx

apt-get install nginx

Set up reverse proxy

Create /etc/nginx/proxy.conf with following content:


proxy_redirect          off;
proxy_set_header        Host            $host;
proxy_set_header        X-Real-IP       $remote_addr;
proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size    10m;
client_body_buffer_size 128k;
proxy_connect_timeout   90;
proxy_send_timeout      90;
proxy_read_timeout      90;
proxy_buffers           32 4k;

and /etc/nginx/sites-enabled/etherpad with:


server {
        listen   80;
        server_name  *.etherpad.foo.bar.ok;

        access_log  /var/log/nginx/access.log;

        location / {
                proxy_pass      http://127.0.0.1:9000/;
                include         /etc/nginx/proxy.conf;
        }
}

Reload nginx

user@computer:$ invoke-rc.d nginx reload

Wrap-up

Two tips at the end:

Admin panel is here => http://etherpad.foo.bar.ok/ep/admin/auth

And wildcard DNS is also a good idea if you plan to create team pads.

Share on TwitterShare on TumblrSubmit to StumbleUponSave on DeliciousDigg ThisSubmit to reddit