In 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
Update the system and install necessary packages
Create a new system user
Create a new user for the 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:
Once the rpm package is downloaded, install it with:
To check if JAVA has been properly installed on your CentOS box run java -version
, and the output should be similar to the following:
Install Scala
To download and install the latest scala version from the official website, run:
Once the rpm package is downloaded, install it with:
Now if you run scalac -version
, you should get something like this:
Install MariaDB
MariaDB 5.5 is shipped in the default CentOS 7 repository, to install it just run:
To start the MariaDB service and enable it to start on boot, execute the following commands:
Run the following command to secure your installation:
Install Hackpad
The following commands are run as hackpad user. To switch to hackpad user run:
Clone the Hackpad source code to the /home/hackpad/hackpad
directory.
Edit the file ~/hackpad/bin/exports.sh
as follows:
and run:
To create a database for our Hackpad instance, run:
And enter MySQL root password when prompted.
Copy the default settings configuration file etherpad/etc/etherpad.localdev-default.properties
to etherpad/etc/etherpad.local.properties
and set the etherpad.superUserEmailAddresses and topdomains, for example:
Start hackpad for the first time:
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:
and add the following code lines:
Start the Hackpad service and set it to start automatically on boot:
To verify the unit started, run journalctl -f -u hackpad.service
and you should see something like below:
Install and configure Nginx
Nginx is not available by default in CentOS 7 so we will use the official Nginx repository:
Next, create a new Nginx server block:
Activate the server block by restarting Nginx:
That’s it. You have successfully installed your Hackpad. To access it, open http://yourdomainname.com/
in your browser. For more information about Hackpad, please refer to the official Hackpad website.
Update:
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 https://www.rosehosting.com/blog/install-etherpad-on-a-centos-7-vps/
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.
Any hints on a “Incorrect key file for table ‘pro_accounts_auto_signin’; try to repair it” error that comes up when running bin/run.sh?
You can try to repair the table using the following command: REPAIR TABLE pro_accounts_auto_signin; and then run bin/run.sh again. Thanks.
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.
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: https://www.rosehosting.com/blog/how-to-install-and-configure-exo-platform-with-java-and-apache-as-a-reverse-proxy/
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 ?
Hi Seb,
You should check if there are error messages when you are starting Hackpad with the ‘run.sh’ script.
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 :(…
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 foo.domain.com. Maybe it’s why it doesn’t work ?
We will test the tutorial again and update it if necessary.
It seems that this project is not maintained anymore. You can try to install and use Etherpad instead. Please read this tutorial: https://www.rosehosting.com/blog/install-etherpad-on-a-centos-7-vps/
Ok thanks