LocalDevStack provides an easy-to-use Docker-based development environment for your projects. All modules are selective and can be enabled via environment settings (Compose profiles). Supports multiple domains and local TLS.
- Local development only.
- Your domain(s) must be resolvable on your host:
- add entries to your hosts file:
<your_ip> <your_domain>, or- use a DNS that resolves to your machine, or
- use
*.localhost(no hosts entry required in many setups)
Install docker on your system first. If you already have docker installed, you can skip this step.
- It is recommended to use Docker Engine.
- If Docker Engine not supported in your OS, use Docker Desktop (although you can also install this on linux as well).
- PHP
- NodeJs
project-root/
├─ application/
│ ├─ site1/
│ ├─ site2/
│ └─ ...
└─ LocalDevStack/ (this repository)
This layout is flexible. If you want a different projects folder, set PROJECT_DIR in your env.
# supports relative/absolute path (recommended to use absolute path for less confusion)
PROJECT_DIR=/path/to/your/projects git clone https://github.com/infocyph/LocalDevStack.git
cd LocalDevStackOn Linux/Mac,
chmod +x ./lds 2>/dev/null || true
sudo ./lds setup permissionsOn Windows,
./lds setup permissionsOnce ran, it will add a globally available shortcut (lds). And necessary permissions(linux/mac) will be assigned as well.
lds startlds setup domainsudo lds certificate installlds helplds up # start stack
lds start # alias of up
lds stop # stop stack (down)
lds down # alias of stop
lds restart # stop + up + HTTP reload
lds reload # recreate + HTTP reload
lds rebuild all # rebuild/pull images
lds config # show resolved docker compose config
lds http reload # reload the HTTP load balancer (nginx/apache)
lds tools # shell into SERVER_TOOLS container
lds doctor # host diagnosticslds setup init
lds setup permissions
lds setup profile # (or: lds setup profiles) choose which services to configure
lds setup domainlds certificate install
lds certificate uninstall
lds certificate uninstall --alllds run
lds run --publish 8025:8025
lds run ps
lds run logs
lds run stop
lds run rm
lds run open 8025# Run your hosts file using container
lds php -v
lds composer install
lds node -v
lds npm i
lds npx <pkg>
# Login into the service containers
lds my --login
lds maria --login
lds pg --login
lds redis --login
# if You are not getting access to certain IP that is used via vpn
lds vpn-fixTip: If you forget anything,
lds helpis the source of truth.
lds helpThis README stays intentionally short.
- Full documentation: https://docs.infocyph.com/projects/LocalDevStack
- Quick reference:
lds help ...
MIT