How to install etherpad on Debian Lenny

So last days before Debian Squeeze will be released and we are still using Debian Lenny on this host. Everything looks like this is 100% applicable for Debian Squeeze aswell. We haven’t used Apache mod_proxy on that test host but that shouldn’t be different, please do tell.

We have used the official deb archive at, you will get a warning about untrusted signatures when installing these packages. Just pass it (or don’t use the packages).

Add the host to /etc/apt/sources.list

# echo “deb all .” >> /etc/apt/sources.lis

Update apt package cache and install etherpad and dependencies[1]

# aptitude update; aptitude install etherpad

In the debconf questions specify the mysql credentials, it will use “etherpad” as user and database name. You can not choose that
For hostname input “localhost” if you are planning to use it with mod_proxy as we do.

Exchange /usr/local/etherpad to the working path /usr/share/etherpad (bug #195 and bug #205)

# sed “s/local/share/” /etc/init.d/etherpad > /tmp/newinit
# cp /etc/init.d/etherpad /etc/init.d/etherpad.orig
# cat /tmp/newinit > /etc/init.d/etherpad
# rm /tmp/newinit

(a backup is kept as /etherpad /etc/init.d/etherpad.orig)

Start etherpad server, the setup is reachable at http://localhost:9000

# /etc/init.d/etherpad start

Install mod_proxy (and Apache2)

# aptitude install libapache2-mod-proxy-html

and then activate the relevant modules

# a2enmod proxy
# a2enmod proxy_http

Edit the domain settings part of the etherpad configuration in /etc/etherpad/
Add the hostname(s) you will access the etherpad service at, (no spaces allowed?).

topdomains =,localhost, localhost.localdomain,,

And now the final magic, add your virtual host and activate it. We will host our on two addresses; and

<VirtualHost *:80>

Options ExecCgi Includes MultiViews Indexes FollowSymlinks
ErrorLog /var/log/apache2/
TransferLog /var/log/apache2/
<Proxy *>

Order deny,allow
Allow from all

Alias /sitemap.xml /ep/tag/?format=sitemap
ProxyPreserveHost On
ProxyPass / http://localhost:9000/


Save it in /etc/apache2/sites-available/
Activate the virtual host and reload the apache configuration.

# a2ensite
# /etc/init.d/apache2 reload

Things to remember; we have no modified the init script. Upon upgrade the script will most probably be broken again. This setup uses a local mysql server, this might not be what you want (read on!).

To move the database backend to an external server.

Get all information from the local mysql server.

# mysqldump -u MYSQLUSER -pMYSQLPASSWORD etherpad > /tmp/etherpad.sql

To read the dump file into a new database you need some higher privileges to be able to lock tables and create tables and stuff like that.

# mysql -u REMOTEUSER -pREMOTEPASSWORD -hREMOTEHOST etherpad < /tmp/etherpad.sql

Edit the database settings part of the etherpad configuration in /etc/etherpad/

etherpad.SQL_JDBC_URL = jdbc:mysql://

Restart the etherpad service and apache, stop the local mysql service.

# /etc/init.d/apache2 stop
# /etc/init.d/mysql stop
# /etc/init.d/etherpad restart
# /etc/init.d/apache2 start

A final note!

PLEASE help us with getting this information as accurate as possible. Use the comment field below or contact us via in #sis (or private ping brother- at oftc and freenode).

[1]  This package has some serious dependencies!
Java and Scala just to run the etherpad service. MySQL to support it is installed completely even thought the service does not have to be local!

(This text is CC-SA, this means that anything adapted from it must be CC-SA or similar. No attribution is required.)

This entry was posted in HowTo, Skunkworks and tagged , , , . Bookmark the permalink. Both comments and trackbacks are currently closed.


  1. Kevin
    Posted February 8, 2011 at 6:26 pm | Permalink


    Thanks for the write up. First, it helped me identify the startup bug and fix that which means at least I have it working on port 9000 😉

    However, this section is not clear to me:

    In the debconf questions specify the mysql credentials, it will use ”etherpad” as user and database name. You can not choose that
    For hostname input ”localhost” if you are planning to use it with mod_proxy as we do.

    Do you mean we need to choose a different database name or not use localhost as a hostname?

    If you mean not localhost, what options can we choose, IP address? At the moment it doesnt quite work either way, just wanted to understand what you meant as it may help find where I have gone wrong.


  2. brother
    Posted February 9, 2011 at 9:53 am | Permalink

    I guess that could have been a bit clearer indeed.

    The debconf messages for mysql will ask about password but not about the host, username or name of the database. These are however something you can change in /etc/etherpad/ (see the last section about moving the database to another host).
    I have no idea why they do not let you choose these things, it’s as easy as adding the administrator password to the very same file.

    The note about localhost is referring to the debconf question for what hostname should be used to access etherpad. The only thing I really know is that we use localhost here and that it works.

  3. Juan Pedro
    Posted May 16, 2011 at 11:27 am | Permalink

    su – etherpad -s /bin/bash -c “bin/ –daemon”
    Traceback (most recent call last):
    File “bin/”, line 337, in
    File “bin/”, line 194, in startup
    args = [OPENOFFICE_BIN,
    NameError: global name ‘OPENOFFICE_BIN’ is not defined

    soved with this
    apt-get -y install python-openoffice

  4. Bernd
    Posted July 22, 2011 at 9:56 pm | Permalink

    a2enmodule => a2enmod

  5. brother
    Posted July 25, 2011 at 1:05 am | Permalink

    Indeed Bernd. Thanks.

One Trackback

  1. […] This post was mentioned on Twitter by Martin Brother Bagge, Etherpad Foundation. Etherpad Foundation said: RT @br0ther: How to install #Etherpad behind #mod_proxy on #Debian Lenny and Squeeze […]