Docker LAMP Stack with DevilBox

DevilBox is a modern and highly customisable LAMP and MEAN stack replacement based purely on docker and docker-compose running on all major platforms. DevilBox can be used to quickly fire up Docker LAMP stack. It supports an unlimited number of projects for which vhosts and DNS records are created automatically. Email catch-all and popular development tools will be at your service as well.


DevilBox can be installed inside Docker. If you have Docker installed, just run the following commands:

# Get the soures
$ git clone
$ cd devilbox

# Create and customize the config file
$ cp env-example .env
$ vim .env

# Start your daemons
$ docker-compose up


DevilBox comes with the following packages ready to be configured:

  1. Apache
  2. Nginx
  3. PHP
  4. MySQL
  5. MariaDB
  6. PerconaDB
  7. PgSQL
  8. Redis
  9. Memcached
  10. MongoDB

You can specify the specific versions of each package inside .env file.

On-Demand Stack Load

The best thing about DevilBox is that you are not forced to load the whole stack everytime. Only bring up what you really need.
It is also possible to add or remove daemons while the stack is already running.

# Load traditional lamp stack only
$ docker-compose up httpd php mysql

# Add redis to the running stack
$ docker-compose up redis

# Stop MySQL from the current stack
$ docker-compose stop mysql

Email catch-all

DevilBox has a built-in postfix mailserver which is configured to automatically intercept all outgoing emails. This is an important measurement during development to make sure not to accidentally send out real emails. Instead you will be able to see all sent emails in the included intranet mail view. Here is quick video on how to use the postfix mailserver.


Creating a new project using DevilBox is incredibly simple — just create a new directory on the filesystem and DevilBox’s in-built DNS server will automatically provide the correct DNS records for every project. So you don’t have to mess with /etc/hosts every time a new project is created.

Every extra package you’d ever need

DevilBox comes packaged with an array of packages that every developer will ever need when developing websites.

  1. PHPMyAdmin
  2. Adminer
  3. opcache-gui
  4. Composer
  5. Drush
  6. Drupal Console
  7. Node.js
  8. wp-cli
  9. npm
  10. Git
  11. MySQLDump

DevilBox is an open-source project and you can contribute to it by forking it on GitHub.