lnmp
LNMP is a Docker Compose-based development environment that bundles Nginx, MySQL/MariaDB, PHP-FPM, and Redis into a single-command setup. It supports local development, testing, and CI/CD workflows across Linux, macOS, Windows, and ARM platforms.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | khs1994-docker/lnmp |
| Owner | khs1994-docker |
| Primary language | Dockerfile |
| License | Apache-2.0 — OSI-approved |
| Stars | 678 |
| Forks | 131 |
| Open issues | 58 |
| Latest release | v24.11.0 (2025-08-24) |
| Last updated | 2026-07-08 |
| Source | https://github.com/khs1994-docker/lnmp |
What lnmp is
Docker Compose orchestration of containerized LNMP stack (Nginx 1.29.1, MySQL 8.0.33, PHP 8.4.11-FPM, Redis 7.0.0) with optional services (PostgreSQL, MongoDB, RabbitMQ, Memcached). Configuration via `.env` file; inter-container networking via Docker DNS; shell CLI for service management and SSL certificate generation via acme.sh.
Get the lnmp source
Clone the repository and explore it locally.
git clone https://github.com/khs1994-docker/lnmp.gitcd lnmp# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Requires Docker and Docker Compose v2.17.0+ pre-installed; WSL mandatory for Windows 10/11.
- All `.env` file modification for image mirrors (especially for China: `docker.cnb.cool`, `ccr.ccs.tencentyun.com`) or custom app roots; modifying other files not recommended (see issue #238).
- PHP application code placed in `./app/` folder; nginx config in `./config/nginx/`; requires awareness of Docker service hostnames (e.g., `mysql`, `redis`) not `localhost`.
- SSL certificate generation via `./lnmp-docker ssl` requires ACME.sh API keys in `.env` or system environment; self-signed option available.
- Data persistence not explicitly detailed; bind mounts or volumes for MySQL, application code, logs assumed to work but requires verification for production use.
When to avoid it — and what to weigh
- Production Workloads Without Additional Hardening — Default credentials (MySQL root: `mytest`) and examples are development-only. No production-specific security documentation evident. Requires security review and custom configuration.
- Windows Development (Performance-Critical PHP) — README explicitly warns: 'Run Laravel on Docker For Windows very slow' due to I/O overhead. Better on native Linux or WSL2 with optimized bind mounts.
- Highly Customized or Legacy Stack Requirements — Fixed versions of Nginx, MySQL, PHP, Redis. No built-in support for older PHP versions or non-standard service combinations without fork/rebuild.
- Projects Requiring Commercial Docker Support — Uses community Docker images. No guaranteed SLA or vendor support channel. Relies on open-source community and maintainer (khs1994).
License & commercial use
Licensed under Apache License 2.0 (Apache-2.0), a permissive OSI-approved license allowing commercial use, modification, and distribution with attribution and liability disclaimer.
Apache-2.0 permits commercial use of LNMP orchestration code itself. However, bundled Docker images (Nginx, MySQL, PHP, Redis, etc.) are multi-licensed under their own terms (typically permissive open-source). Review each image's license and support model before production deployment. No commercial support or indemnification from LNMP maintainer stated.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Strong |
| Assessment confidence | High |
Default MySQL root password (`mytest`) hardcoded in examples—must be overridden in `.env` before any non-local use. No explicit security scanning, vulnerability disclosure, or hardening guidelines provided. Docker images sourced from Docker Hub (official or khs1994) and third-party registries—audit image provenance and use image scanning tools (Trivy, etc.). acme.sh integration for SSL/TLS is standard but requires correct API key management.
Alternatives to consider
Laravel Valet / Valet+
Lightweight, native macOS/Linux development without Docker overhead; faster file I/O. Less portable; requires host dependencies; no multi-DB/cache service bundling.
Ddev
Docker-based like LNMP but with built-in Drupal, WordPress, TYPO3 support, automated SSL, DB snapshots, and stronger production-parity focus. Steeper learning curve; different CLI model.
Docker Desktop + Compose (manual setup)
Full control over image selection, versions, and configuration. No quick-start CLI; requires manual docker-compose.yml authoring and service management.
Build on lnmp with DEV.co software developers
LNMP Docker cuts setup time from hours to minutes. Evaluate the documentation at docs.lnmp.khs1994.com, test locally, and confirm security requirements for your team's workflow.
Talk to DEV.coRelated on DEV.co
Explore the category and the services that help you build with it.
lnmp FAQ
What is the default MySQL root password?
How do I access MySQL from a PHP container?
Why is Laravel development slow on Windows?
Can I use this in production?
Software developers & web developers for hire
From first prototype to production, DEV.co delivers software development services around tools like lnmp. Our software development agency staffs experienced software developers and web developers for custom software development, web development, integrations, and ongoing support across open-source devops and beyond.
Ready to Standardize Your PHP Development?
LNMP Docker cuts setup time from hours to minutes. Evaluate the documentation at docs.lnmp.khs1994.com, test locally, and confirm security requirements for your team's workflow.