The Devilbox

Quickstart |
Examples |
Features |
The Devilbox Stack |
Community |
Contributing |
Logos |
License
The Devilbox is a versatile and highly customisable zero-conf PHP Docker stack supporting LEMP and MEAN as well as Websockets, Node, Python and Golang via automated Reverse Proxy integraton.
The main goal is to provide a reproducible development environment that runs on all major platforms and is able to switch and combine any version you need.
It supports an unlimited number of projects for which vhosts, SSL certificates and DNS records are created automatically.
Email interception and popular development tools will be at your service as well. Configuration is not necessary, as everything is already pre-setup.
All created projects (frontend or backend) will be able to communicate with one another to support the emulation of a complete microservice architecture or an API landscape.
Available Architectures: amd64, arm64
Available PHP Versions: 5.2, 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2
🚀 Quickstart
❗ System Requirements
The Devilbox runs on all major operating systems and its only requirement is Docker and Docker Compose:
Be up and running in 2 minutes.
🚀 Install and Run: Linux
Linux: Install
- Download the Devilbox
git clone https://github.com/cytopia/devilbox
- Enter the Devilbox git directory
cd devilbox
- Copy the default environment file
cp env-example .env
Linux: Run
:warning: Important: Ensure that nothing is listening on port 80 and 443 on your host system. These ports are required by the Devilbox webserver.
- Start
httpd, php and mysql container# This step may take a few minutes as required
# Docker images have to be pulled initially.
# Inside the Devilbox git directory
docker-compose up httpd php mysql
- Visit http://localhost in your browser
🚀 Install and Run: MacOS
MacOS: Install
- Download the Devilbox
git clone https://github.com/cytopia/devilbox
- Enter the Devilbox git directory
cd devilbox
- Copy the default environment file
cp env-example .env
MacOS: Run
:warning: Important: Ensure that nothing is listening on port 80 and 443 on your host system. These ports are required by the Devilbox webserver.
- Start
httpd, php and mysql container# This step may take a few minutes as required
# Docker images have to be pulled initially.
# Inside the Devilbox git directory
docker-compose up httpd php mysql
- Visit http://localhost in your browser
🚀 Install and Run: Windows
Note: If you are using WSL2, refer to the Linux guide instead.
Windows: Install
- Clone
https://github.com/cytopia/devilbox to C:\devilbox with Git for Windows
- Copy
C:\devilbox\env-example to C:\devilbox.env
Windows: Run
:warning: Important: Ensure that nothing is listening on port 80 and 443 on your host system. These ports are required by the Devilbox webserver.
Open a terminal on Windows and start httpd, php and mysql container:
- Start
httpd, php and mysql container# This step may take a few minutes as required
# Docker images have to be pulled initially.
# Inside the Devilbox git directory
docker-compose up httpd php mysql
- Visit http://localhost in your browser
💻 Enter the work container
Enter the work container
The Devilbox allows you to work on your projects on the host system as well as inside the work container. Your project files will be available at both locations. The workflow ususally is:
- Use your prefered IDE (e.g. PhpStorm) on your host system to add and alter files
- Work inside the container to run common cli tools such as
node, composer, npm, phpcs, webpack and many more.
To enter the work container, simply run ./shell.sh
- On Linux, MacOS and Windows with WSL2
# Inside the Devilbox git directory
./shell.sh
- On Windows without WSL2
# Inside the Devilbox git directory
./shell.bat
💡 Examples
Create your first project:
Example: Dummy Project
- Start the container you need:
docker-compose up httpd php mysql
- Enter the work container:
./shell.sh
- Navigate to
/shared/httpd:cd /shared/httpd
- Create your project directory
mkdir dummy-project
- Visit http://localhost/vhosts.php
You will notice that you need to create a htdocs/ directory

- Create
htdocs/ directory# Navigate to your project directory
cd /shared/httpd/dummy-project
# Create htdocs dir
mkdir htdocs
- Visit http://localhost/vhosts.php
You will see that everything is now setup and your project is created and available

- Create an
index.php file# Navigate to your project htdocs directory
cd /shared/httpd/dummy-project/htdocs
# Create a simple index.php file
echo '<?php echo "it works";' > index.php
- View your project in the browser: http://dummy-project.dvl.to
Example: PHP Framework
Find all the examples in the documentation:
