Introduction
This post is a comprehensive, community-written guide to using Devilbox Community Edition — a highly customizable, zero-configuration PHP Docker stack supporting LEMP and MEAN architectures — as a local development environment on Windows. It describes how Devilbox solves the classic "it works on my machine" problem through containerization, reproducibility, and portability.
Key points
- Getting started on Windows: Clone the repository with
git clone https://github.com/devilbox-community/devilbox.gitintoC:\devilbox, start Docker Desktop, then rundocker-compose upin PowerShell. First-time startup may need several retries while images download from Docker Hub — this is normal. - First project in minutes: Create
data/www/p1/htdocs/index.html, then visithttps://p1.lvh.me/. The browser's security warning comes from Devilbox's self-signed CA and is safe to bypass in development; the CA can optionally be imported into Windows' trusted root store. - Automatic DNS and SSL: Devilbox ships a Bind DNS server resolving
*.lvh.me(a public DNS name pointing to 127.0.0.1), plus a self-signed CA that dynamically issues certificates per*.lvh.medomain — no hosts-file edits required. - Container fleet: Roughly 15 container families are available — HAProxy/Varnish (acceleration), Apache/Nginx (web servers, freely switchable), PHP 7.4–8.4 with 100+ preinstalled extensions, MySQL/MariaDB/PostgreSQL, MongoDB/Redis/Memcached, RabbitMQ, Solr, the ELK stack, Bind, Blackfire, and MailHog. Containers can be started selectively, e.g.
docker-compose up httpd php mysql. - Version matrix: Switching PHP or database versions is done by editing variables like
PHP_SERVER=7.4in the.envfile and restarting — useful for maintaining legacy systems and pre-testing upgrades. - PHP extensions: Core extensions ship enabled; optional ones (xdebug, opcache, imagick, redis, etc.) are activated by uncommenting flags such as
PHP_ENABLE_REDIS=1in.env, making configuration traceable and version-controllable. - CLI toolchain:
./shell.bat(PowerShell) or./shell.sh(WSL2) opens a work container with 50+ tools including composer, npm, git, phpunit, wp-cli, node, python, and golang — a full-stack workstation with project files mounted at/shared/httpd/. - Project convention: Each project must live under
data/www/<project>/htdocs/. Thevhosts.phpintranet dashboard shows every project's directory, DNS, and SSL status, with automatic vhost/certificate/DNS generation on detection. - Microservices locally: All containers share one Docker network with an automated reverse proxy, so projects can call each other via
*.lvh.meURLs — a local sandbox for testing API gateways, service discovery, and load-balancing patterns. - Community history: Started in 2016 by cytopia and continued since 2024 by nntoan under devilbox-community (78 stars, 663 forks, 6 releases), with community members contributing Windows-specific guides like this one.
Takeaway
The author frames Devilbox as "Environment as Code": a full development environment can be restored on any machine via git clone plus docker-compose up, ending multi-day setup sessions and providing a reproducible, HTTPS-complete, microservice-capable local stack on Windows.
References cited in the post
1. Devilbox Community. (2024). *A modern Docker LE(A)MP stack and MEAN stack for local development*. GitHub. https://github.com/devilbox-community/devilbox 2. Docker Documentation. (2025). *Docker Compose Overview*. Docker Inc. 3. MDN Web Docs. (2025). *SSL Certificates and HTTPS*. 4. Twelve-Factor App Methodology. (2024). *Dev/Prod Parity*. 12factor.net 5. Microsoft. (2025). *Windows Subsystem for Linux Documentation — WSL 2 Architecture*.