Installing WebKeePass

I wanted to install WebKeePass, an easy to use password manager which helps you to manage your passwords in a secure way via a web interface. Its also totally free and very robust which were major bonus in my oppinion. There are many quides out there but I did not find a single complete, end-to-end, guide that walks you though the install as well as enabling the app to start and stop on server boot and shutdown.

Below are the steps I took. As always follow these at your own risk and its very helpful if you have linux experience to tailor these steps to your system, as I did.

To give you a bit of background on my environment, my server runs Ubuntu 14.04 server 64 bit and all steps are based on that.


PHASE 1 (installing the app)

1) SSH to the Ubuntu box install Java on the box:
– For Oracle Java 7:

sudo add-apt-repository ppa:webupd8team/java
sudo appt-get update
sudo apt-get install oracle-java7-installer

2) Set the JAVA_HOME environment variable

cd /etc
nano environment
  –> insert the line: “JAVA_HOME=/usr/lib/jvm/java-7-oracle” at the bottom of the file.

This is what mine looks like:


3) Reboot the machine

sudo shutdown –r now

4) Using SCP/Filezilla on your machine, copy the latest build of Web KeePass to your server. You can download it here:

5) Unzip the file:


6) change to the WebKeyPass directory we just

cd WebKeePass3-xxxxx

7) make the installer execuatable

chmod a+x

8) run the installer

 (i ran this as root because I will run the app as root)

9) The installer will prompt you for several questions

Specify the installation directory (e.g. /WebKeePass I created this directory before i started the install and set the permissions and ownership) and the Java directory (e.g. JAVA_HOME=/usr/lib/jvm/java-7-oracle)

10) Specify the admin and normal user accounts and password

11) Specify the encryption that should be used (e.g. DES, AES, BlowFish (I recommend AES but do your research))

12) Once everything is installed change to the /WebKeePass directory

cd /WebKeePass

12) Set the startup file to executable

chmod a+x ./

13) Set all filed in the tomcat bin directory to executable.

chmod a+x jakarta-tomcat-5.5.7/bin/*

14) Start the app


if all goes well, you will be able to see the following lines:

root@webkeepass:/WebKeePass# ./
Using CATALINA_BASE: /WebKeePass/jakarta-tomcat-5.5.7
Using CATALINA_HOME: /WebKeePass/jakarta-tomcat-5.5.7
Using CATALINA_TMPDIR: /WebKeePass/jakarta-tomcat-5.5.7/temp
Using JAVA_HOME: /usr/lib/jvm/java-7-oracle

and you will be able to access WebKeePass at:

https://<your server’s ip>:8443

PHASE 2 (if wanted to automate the startup and shutdown of the app)

At this point life is good and you can use the app as is, however I wanted to be able to have the app start and stop on boot. So in the /WebKeePass folder I modified the startup script and created a shutdown scrip. You can copy these or make your own:

1) Create a startup script

nano /WebKeePass/

2) Enter these lines in the startup script

export JAVA_HOME=/usr/lib/jvm/java-7-oracle
cd /WebKeePass/jakarta-tomcat-5.5.7/bin/

3) Create a shutdown script

nano /WebKeePass/

4) Enter these lines in the shutdown script

root@hosting:/WebKeePass# cat /WebKeePass/
cd /WebKeePass/jakarta-tomcat-5.5.7/bin/

5) Next I created a script for my inet.d folder to use to start/stop and restart the app as a service. For now I did this in the /WebKeePass folder to test it but once working I moved it to /etc/init.d

nano  /WebKeePass/webkeypass

6) If your setup is exactly like mine enter these lines into the script (other wise please modify it to fit your installation)

#! /bin/sh
# Provides: WebKeePass
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: WebKeePass
# Description: This file starts and stops WebKeyPass server

case “$1” in

sleep 10

sleep 20
echo “Usage: WebKeePass {start|stop|restart}” >&2
exit 3

7) Now lets  make the script executable and test the script

sudo chmod a+x

./webkeepass start (should start the app)
./webkeepass stop (should stop the app)
./webkeepass restart (should restart the app)

8) if this worked lets copy the script to /etc/init.d

mv /WebKeePass/webkeepass /etc/init.d

9) register the script

sudo update-rc.d webkeepass defaults

10) Reboot your server, if everything worked your app will start on its own now.



Posted on by admin in How To's, Technology Leave a comment

Add a Comment