How to install Hackpad on a CentOS 7 VPS

install-hackpad-on-a-centos-7-vpsIn this tutorial, we will explain how to install Hackpad on a Centos 7 VPS with nginx as a reverse proxy. Hackpad is a web-based real-time wiki, based on the open source EtherPad collaborative editor. This guide should work on other Linux VPS systems as well but was tested and written for a Centos 7 VPS.

Login to your VPS via SSH

ssh root@vps

Update the system and install necessary packages

[root]$ yum -y update
[root]$ yum install git wget

Create a new system user

Create a new user for the Hackpad:

[root]$ adduser \
   --comment 'Hackpad User' \
   --home-dir /home/hackpad \

Install Oracle JDK 7

Hackpad requires JDK 7. Use the command below to download the latest Oracle JDK 7 from the command line using wget:

[root]$ wget --no-cookies \
    --no-check-certificate \
    --header "Cookie: oraclelicense=accept-securebackup-cookie" \
    "" \
    -O jdk-7u80-linux-x64.rpm

Once the rpm package is downloaded, install it with:

[root]$ yum install jdk-7u80-linux-x64.rpm

To check if JAVA has been properly installed on your CentOS box run java -version, and the output should be similar to the following:

[root]$ java -version
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)

Install Scala

To download and install the latest scala version from the official website, run:

[root]$ wget

Once the rpm package is downloaded, install it with:

[root]$ yum install scala-2.11.7.rpm

Now if you run scalac -version, you should get something like this:

[root]$ scalac -version
Scala compiler version 2.11.7 -- Copyright 2002-2013, LAMP/EPFL

Install MariaDB

MariaDB 5.5 is shipped in the default CentOS 7 repository, to install it just run:

[root]$ yum install mariadb-server

To start the MariaDB service and enable it to start on boot, execute the following commands:

[root]$ systemctl start mariadb.service
[root]$ systemctl enable mariadb.service

Run the following command to secure your installation:

[root]$ mysql_secure_installation

Install Hackpad

The following commands are run as hackpad user. To switch to hackpad user run:

[root]$ sudo su - hackpad

Clone the Hackpad source code to the /home/hackpad/hackpad directory.

[hackpad]$ git clone ~/hackpad

Edit the file ~/hackpad/bin/ as follows:

export SCALA_HOME="/usr/share/scala/"
export SCALA="$SCALA_HOME/bin/scala"
export SCALA_LIBRARY_JAR="$SCALA_HOME/lib/scala-library.jar"
export JAVA_HOME="/usr/java/jdk1.7.0_80"
export JAVA="/usr/bin/java"
export MYSQL_CONNECTOR_JAR="/home/hackpad/hackpad/lib/mysql-connector-java-5.1.34-bin.jar"

and run:

[hackpad]$ cd ~/hackpad
[hackpad]$ bin/

To create a database for our Hackpad instance, run:

[hackpad]$ contrib/scripts/

And enter MySQL root password when prompted.

Copy the default settings configuration file etherpad/etc/ to etherpad/etc/ and set the etherpad.superUserEmailAddresses and topdomains, for example:

etherpad.isProduction = true
etherpad.superUserEmailAddresses =,
topdomains =,localhost

Start hackpad for the first time:

[hackpad]$ bin/

If there are no errors, you may continue with the next step.

Create a systemd service

To create a new systemd service for Hackpad, open your editor of choice as a root or sudo user and create a new file:

[root]$ vim /etc/systemd/system/hackpad.service

and add the following code lines:




Start the Hackpad service and set it to start automatically on boot:

[root]$ systemctl enable hackpad.service
[root]$ systemctl start hackpad.service

To verify the unit started, run journalctl -f -u hackpad.service and you should see something like below:

[root]$ journalctl -f -u hackpad.service
Aug 22 10:42:09 vps[3080]: dropbox: 2015-08-22 10:42:09.375-0500        Starting dropbox sync
Aug 22 10:42:09 vps[3080]: dropbox: 2015-08-22 10:42:09.382-0500        Done with dropbox sync

Install and configure Nginx

Nginx is not available by default in CentOS 7 so we will use the official Nginx repository:

[root]$ wget
[root]$ yum install nginx-release-centos-7-0.el7.ngx.noarch.rpm
[root]$ yum install nginx

Next, create a new Nginx server block:

[root]$ vim /etc/nginx/sites-available/
map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;

server {

  location / {
    proxy_set_header  X-Real-IP  $remote_addr;
    proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header  Host $host;
    proxy_redirect off;
    proxy_read_timeout 300;
    proxy_pass http://localhost:9000/;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection $connection_upgrade;

Activate the server block by restarting Nginx:

[user]$ systemctl restart nginx

That’s it. You have successfully installed your Hackpad. To access it, open in your browser. For more information about Hackpad, please refer to the official Hackpad website.



Hackpad was acquired by Dropbox and it seems that the project is not maintanined anymore. Since Hackpad is based on the EtherPad collaborative document editor, our recommendation is to install and use Etherpad as described at

Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to setup this for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

How to install Joomla 3 on Ubuntu 14.04
Install Jenkins on an Ubuntu 14.04 VPS
How to install Drupal with PostgreSQL on a Debian 8 VPS
  • dahjelle


    Author Reply

    Any hints on a “Incorrect key file for table ‘pro_accounts_auto_signin’; try to repair it” error that comes up when running bin/

    • admin


      Author Reply

      You can try to repair the table using the following command: REPAIR TABLE pro_accounts_auto_signin; and then run bin/ again. Thanks.

  • Funky


    Author Reply

    I try to understand, if we use Apache, we can “skip” the nginx part and use the port 9000 no ?

    We can also configure apache for use with a good DNS ?

    Thanks in advance.

  • admin


    Author Reply

    Yes, you can access your Hackpad on port 9000 and you can use Apache instead of Nginx. For more info about how to configure your Apache as a reverse proxy please check:

  • Seb


    Author Reply

    It’s a great guide, but, after 3 try. I always finish in the same step. I have a the webpage, but, without CSS I presume, it’s weird and I can’t do anything, I just see google, facebook and twitch login, but nothing works at all.

    Any idea ?

    • admin


      Author Reply

      Hi Seb,

      You should check if there are error messages when you are starting Hackpad with the ‘’ script.

      • Seb


        Author Reply

        Strangely, I see nothing, all seems to works well on the script (or by journalctl -f -u hackpad.service)

        I really don’t understand why it doesn’t work. I retry again another install, but don’t understand my error :(…

      • Seb


        Author Reply

        Ok I saw that I have problem with undefined/static/compressed/c5eb903f3b950933be16d8c24e2eae58.css and a lot of undefined folder for css.

        I use domain like Maybe it’s why it doesn’t work ?

  • Seb


    Author Reply

    Ok thanks