Install devilbox on Ubuntu 18.04

Posted on December 9, 2019

The devilbox is a modern and highly customisable LAMP and MEAN stack replacement based purely on docker and docker-compose running on all major platforms. It supports an unlimited number of projects for which vhosts and DNS records are created automatically.

With devilbox you can test your applications in various versions of PHP, Apache/Nigx and databases. 

First, install docker and git if they are not installed already

sudo apt-get install docker
sudo apt-get install git

We are going to install install docker-compose as in installation guide:

sudo curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

Replace version 1.23.1 with the latest from https://github.com/docker/compose/releases
Finally apply executable permissions to the binary

sudo chmod +x /usr/local/bin/docker-compose

Install devilbox (inside a folder that dont require root privileges)

git clone https://github.com/cytopia/devilbox
cd devilbox

Prepare your .env file on your flavours

sudo cp env-example .env
sudo nano .env

# set LOCAL_LISTEN_ADDR = 127.0.0.1:

Before you run it make sure you have stop your running server services,  for exmple

sudo service mysql stop
sudo service apache2 stop

Run devilbox in devilbox's folder:

docker-compose up -d

# to stop it later
sudo docker-compose stop

 While running you can see its dashboard on path 127.0.0.1