View on GitHub

devilbox website:



Dockerized LAMP/MEAN stack

Github Docker

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. Email catch-all and popular development tools will be at your service as well.


Supported Host OS

Don't worry about switching computers. The devilbox will run on all major operating systems.

Linux support OSX support Windows support

Install, Configure and Start

Your whole development stack is up and running in a few simple steps.

# 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

Run exactly what you need

Choose your required daemons and select a version. Any combination is possible.
This will allow you, to always exactly simulate your production environment locally during development.

Apache Nginx PHP MySQL MariaDB PerconaDB PgSQL Redis Memcached MongoDB
2.2 stable 5.4 5.5 5.5 5.5 9.1 2.8 1.4.21 2.8
2.4 mainline 5.5 5.6 10.0 5.6 9.2 3.0 1.4.22 3.0
5.6 5.7 10.1 5.7 9.3 3.2 1.4.23 3.2
7.0 8.0 10.2 9.4 1.4.24 3.4
7.1 10.3 9.5 ... 3.5
7.2 9.6 1.4.36
HHVM latest

Run only what you need

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

Introduction Videos

Head over to youtube for a quick introduction and see for yourself how easily new projects can be created.

PHP Modules

The devilbox is a development stack, so it is made sure that a lot of PHP modules are available out of the box in order to work with many different frameworks. There will however be slight differences between the versions and especially with HHVM. To see the exact bundled modules for each version visit the corresponding docker repositories on Github:


PHP 5.4 | PHP 5.5 | PHP 5.6 | PHP 7.0 | PHP 7.1 | PHP 7.2 | HHVM

apc, apcu, bcmath, bz2, calendar, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, intl, json, ldap, libxml, magickwand, mbstring, mcrypt, memcache, memcached, mhash, mongodb, msgpack, mysql, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, phalcon, Phar, posix, pspell, readline, recode, redis, Reflection, session, shmop, SimpleXML, soap, sockets, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, uploadprogress, wddx, xdebug, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend OPcache, zip, zlib

Email catch-all

Email catch-all

The built-in postfix mailserver 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. See Intranet section below.



Creating a new project just requires you to create a new folder on the filesystem. As you probalby don't want to bother with editing your /etc/hosts file everytime, the built-in DNS server will automatically provide the correct DNS records for every project.

Batteries included

No need to download external tools. Everything is bundled, up-to-date and available inside the containers.

Devilbox Devilbox Devilbox
Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox Devilbox

Supported Frameworks and CMS

There is nothing special about the devilbox, so any framework or CMS that will work with normal LAMP/MEAN stacks will work here as well. However in order to make double sure, a few popular applications have been explicitly tested.

CakePHP Drupal Laravel PhalconPHP Symfony Wordpress Yii Zend Framework


If you don't know where to start or just want to see what is possible and how it is done, browse the documentations below. The devilbox is well explained, features many examples and even gives a technical background for customizations.

  1. Overview
    1. Main idea
    2. Features
    3. Supported Host OS
    4. Requirements
    5. Docker documentation
    6. Devilbox documentation
    7. Video Tutorials
    8. Available PHP Modules
    9. Supported Frameworks and CMS
  2. Quickstart
    1. Installation
    2. Update
    3. Configuration
    4. Run
    5. Project setup
    6. Enter the PHP Docker container
  3. Install
    1. Install Docker
      1. Linux
      2. Windows
      3. OSX
    2. Install Devilbox
  4. Update
    1. TL;DR
    2. Git tag vs master branch
    3. Compare .env file
    4. Pull new Docker container (Important!)
    5. Remove anonymous volumes
  5. Configure
    1. Overview
    2. Devilbox general settings
    3. Project settings
    4. Container settings
    5. Intranet settings
    6. Host computer
  6. Run
    1. Start the devilbox
    2. Stop the devilbox
    3. Attach/Detach during run-time
    4. Docker logs
  7. Usage
    1. Mounted directories
    2. Work on the Docker host
    3. Work inside the PHP container
    4. Managing Projects explained
    5. Creating new Projects
    6. Switching container versions
    7. Emails
    8. Log files
    9. Intranet
  8. OS
    1. Linux
    2. Windows
    3. OSX
  9. Backups
    1. Info
    2. MySQL
      1. MySQL Database Backup
      2. MySQL Database Restore
    3. PostgreSQL
      1. PostgreSQL Database Backup
      2. PostgreSQL Database Restore
    4. MongoDB
      1. MongoDB Database Backup
      2. MongoDB Database Restore
  10. Examples
    1. Introduction
    2. Setup CakePHP
    3. Setup Drupal
    4. Setup Laravel
    5. Setup Phalcon
    6. Setup Symfony
    7. Setup Wordpress
    8. Setup Yii
    9. Setup Zend
  11. Technical
    1. Networking
    2. Ports and forwarding
    3. Works the same on Host and PHP Container
  12. Hacking
    1. Rebuilding bundled Docker container
    2. Customizing the bundled Docker container
    3. Adding your own Docker container
  13. FAQ

Devilbox Intranet

Once the devilbox is up and running, you can visit the bundled intranet on http://localhost.
The intranet is not just a simple dash, it provides many useful tools:

Container Health | DNS Status | Available vHosts | Emails | Databases | Effective Configuration
Devilbox Intranet - Virtual Host view Devilbox Intranet - Database view Devilbox Intranet - Email view


Be aware that the docker service is running with root privileges on your system (like any other webserver for example). The devilbox is using a mix of official docker images and custom images. All integrated containers are available on Github and can be reviewed at any time.


Docker containers are pushed to Docker Hub frequently.
It should be enough for you to pull updated images on a regeular basis.

$ docker-compose pull

However, if a new minor version (PHP for example) has just been released and you want to use it right away, you can simply *git clone* the docker repository and rebuild the container. Each container repository contains a shell script for easy building.

# Download PHP 7.1 repository
$ git clone

# Rebuild the container in order to get the latest minor/patch version
$ cd docker-php-fpm-7.1
$ ./build/

Integration Tests

In order to make sure everything always runs stable and as expected, the devilbox makes heavy use of integration tests. You can head over to Travis-CI and have a look at stable and nightly builds.


Contributers are welcome in any way.

First of all, if you like the project, please do star it. Starring is an important measurement to see the number of active users and better allows me to organize my time and effort I can put into this project.

You can also get actively involved. Do clone the project and start improving whatever you think is useful. There is quite a lot todo and planned. If you like to contribute, view and ROADMAP.

Major contributors will be credited within the intranet and on the github page.


MIT License

Copyright (c) 2016-2017 cytopia