Matthew Finlayson bio photo

Matthew Finlayson

New Englander in the Pacific Northwest. Father and Husband. Full time iOS developer.

Email Twitter LinkedIn Github

This is a simple guide to getting BaasBox up and running on Ubuntu. I’m running it on a vps on digital ocean. Right now this is purely for a dev environment and you shouldn’t expect to use the setup for a production site.

First we get our dependencies installed:

# Install Java, Supervisor, and unzip
sudo add-apt-repository ppa:webupd8team/java -y
sudo apt-get update
sudo apt-get install oracle-java8-installer unzip supervisor

Next setup an account to run BaasBox

# Add baasbox user and set up directories
sudo adduser baasbox
sudo -u baasbox
sudo mkdir -p /opt/baasbox
sudo mkdir -p /var/log/baasbox

We’ll download the latest verison (0.9.4) of BaasBox and symlink it which will be helpful for later upgrades.

# Download Baasbox
cd /opt
wget --content-disposition
sudo chown -R baasbox /var/log/baasbox /opt/baasbox-*
ln -s baasbox-0.9.4 baasbox

We’re going to make a couple small changes to the default start script. This will allow us to use a config file for our server and application options, it will also allow us to run BaasBox as a daemon in the next step. Replace /opt/baasbox/start with the following script:

Finally create the server config file at /opt/baasbox/baasbox.conf

We’ll use supervisord, which we installed in the first step to run BaasBox as a service. Supervisord will be responsible for automatically running BaasBox if the process dies or if the machine is rebooted.

# Set up supervisor
service supervisor restart


Create a config file in /etc/supervisor/conf.d/baasbox.conf

Now you should be up and running with BaasBox on port 9000. Remember this is only acceptable for development and please replace the default appcode and admin password.