English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

Devilbox Community Edition: Zero-Config Docker LE(A)MP Development Stack on Windows

Forum topic · QianXun · 2025-11-19

Summary

This forum post is a detailed tutorial on deploying Devilbox Community Edition, a modern Docker-based LE(A)MP/MEAN development stack, on Windows. It walks through the full workflow: cloning the devilbox-community/devilbox repository to C:\devilbox, starting Docker Desktop, running docker-compose up, and creating a first project under data/www/p1/htdocs that is instantly served at https://p1.lvh.me with automatically generated self-signed SSL certificates and DNS resolution via the lvh.me wildcard domain. The article explains Devilbox's architecture as roughly 15 container families (HAProxy/Varnish, Apache/Nginx, PHP 7.4-8.4 with 100+ extensions, MySQL/MariaDB/PostgreSQL, MongoDB/Redis/Memcached, RabbitMQ, Solr, ELK, Bind DNS, MailHog, etc.), selective on-demand container startup, a PHP version matrix for switching runtimes via the .env file, a work container with 50+ CLI tools (composer, npm, phpunit, wp-cli, node, python, golang), cross-project communication for local microservice simulation, and the htdocs convention enforced by the vhosts.php dashboard. It also covers the project's history from cytopia to devilbox-community and frames Devilbox as "Environment as Code" for reproducible, portable Windows development setups.

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.git into C:\devilbox, start Docker Desktop, then run docker-compose up in 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 visit https://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.me domain — 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.4 in the .env file 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=1 in .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/. The vhosts.php intranet 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.me URLs — 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*.

Tags

#devilbox#docker#windows#php#lemp#development-environment#docker-compose#microservices

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/176345171