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

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

Forum topic · QianXun · 2025-11-19

Summary

This forum post is a detailed Chinese tutorial on deploying Devilbox Community Edition—a zero-configuration Docker-based LE(A)MP stack—on Windows for local web development. It walks through the full workflow: cloning the devilbox-community repository, starting Docker Desktop, running docker-compose up, and creating a first project under data/www with an htdocs folder accessible at https://p1.lvh.me/. The post explains how lvh.me DNS resolution and Devilbox's self-signed CA enable automatic, per-project HTTPS without editing the hosts file. It also surveys the bundled container arsenal (Apache/Nginx, PHP 7.4–8.4 with 100+ extensions, MySQL/MariaDB/PostgreSQL, MongoDB, Redis, RabbitMQ, Elasticsearch/Logstash/Kibana, MailHog, Bind), selective service startup via docker-compose, the version matrix for switching PHP/database versions in under a minute, cross-project communication for local microservice simulation, the preinstalled CLI toolchain (composer, npm, phpunit, wp-cli, node, python, golang), and the project's community history from cytopia to devilbox-community. The article frames all of this as 'environment as code': reproducible, portable dev environments restored with a git clone and docker-compose up.

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

This is an English adaptation of a Chinese forum tutorial about setting up the Devilbox Community Edition Docker stack on Windows.

Key points

  • The problem: Local environment configuration is painful—version conflicts between PHP, MySQL, Apache/Nginx lead to the classic "it works on my machine" problem.
  • The solution: Devilbox is a highly customizable, zero-configuration PHP Docker stack supporting LE(A)MP and MEAN architectures, with an automated reverse proxy integrating WebSocket, Node, Python, and Golang.
  • Windows quickstart: git clone https://github.com/devilbox-community/devilbox.git (e.g., to C:\devilbox), start Docker Desktop, then run docker-compose up. First-run image pulls may need retries.
  • First project: Create data/www/p1/htdocs/index.html, then visit https://p1.lvh.me/. Accept the self-signed certificate warning (or import Devilbox's CA into Windows' trusted root store).
  • How the magic works

  • Automatic DNS: lvh.me is a public DNS record pointing to 127.0.0.1. Devilbox's built-in Bind DNS server handles *.lvh.me, *.loc, *.dvl.to wildcards—no hosts-file edits required.
  • Automatic SSL: A built-in self-signed CA generates certificates per *.lvh.me domain at runtime, enabling realistic HTTPS testing (HTTP/2, Service Workers).
  • Convention over configuration: Every project must live under data/www/ with a web root named htdocs/. Startup scripts auto-detect directories, generate vhost configs, create certs, and register DNS. The dashboard at http://localhost/vhosts.php shows project status.
  • The container arsenal

    Devilbox is composed of roughly 15 categories of containers:

  • Accel: HAProxy, Varnish (load balancing, caching)
  • Web: Apache 2.2/2.4 and Nginx (stable/mainline), freely switchable
  • App: PHP 7.4–8.4 with 100+ preinstalled extensions (from amqp to zstd), plus Python (Flask) and Node.js via reverse proxy
  • SQL/NoSQL: MySQL 5.5–8.0, MariaDB 10.0–10.10, PostgreSQL, MongoDB, Redis, Memcached—multiple versions can run simultaneously
  • Queues & search: RabbitMQ, Solr
  • ELK: Elasticsearch, Logstash, Kibana
  • Tools: Bind (DNS), Blackfire (profiling), MailHog (email interception)
  • Startup is selective: docker-compose up httpd php mysql wakes only the essentials; add redis later as needed.

    Version matrix and microservices

  • Version switching: Change PHP_SERVER=7.4 in .env, restart, and legacy projects run in a different PHP "universe"—ideal for upgrade testing.
  • Cross-project communication: All containers share one Docker network; services talk via container names, and *.lvh.me domains act like service discovery, letting you simulate microservice architectures locally (e.g., curl http://p2-api.lvh.me/users).

CLI toolchain and environment-as-code

The ./shell.bat (PowerShell) or ./shell.sh (WSL2) command opens a work container preloaded with 50+ tools: composer, npm, git, vim, phpunit, codeception, wp-cli, magerun, plus node/python/golang runtimes—a true full-stack workstation. Project files mount at /shared/httpd/.

The broader philosophy is Environment as Code: git clone the repo, docker-compose up, and your entire environment is restored—ending the "three days configuring a new machine" nightmare.

Community notes

Started in 2016 by cytopia and maintained for 7 years, the project passed in 2024 to nntoan under the devilbox-community organization (663 forks, 6 releases). Community-contributed Windows guides like this one extend official Linux/macOS documentation.

References

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. Mozilla Developer Network. (2025). *SSL Certificates and HTTPS*. MDN Web Docs. 4. Twelve-Factor App Methodology. (2024). *Dev/Prod Parity*. 12factor.net 5. Windows Subsystem for Linux Documentation. (2025). *WSL 2 Architecture*. Microsoft.

Tags

#devilbox#docker#windows#php#lemp#development-environment#docker-compose#lvh-me

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