LAN — Multi-service (Docker)
Two apps and dynamoip running in Docker with trusted HTTPS across your LAN. Works on macOS, Linux, and Windows.
Two apps and dynamoip all running in Docker, exposed with trusted HTTPS across your LAN. Works on macOS, Linux, and Windows Docker Desktop.
https://inventory.yourdomain.com [LAN] → localhost:3001
https://dashboard.yourdomain.com [LAN] → localhost:6000These URLs are reachable from any device on the same network — phones, tablets, other laptops. Not the internet.
Want public internet access instead? See the Tunnel example.
How it works
dynamoip uses Cloudflare DNS to set A records pointing your subdomains to your machine's LAN IP, then obtains a Let's Encrypt wildcard certificate via DNS-01 challenge. All devices on the network trust the certificate automatically — no CA install needed.
LAN device (192.168.x.y)
→ DNS: inventory.yourdomain.com → 192.168.x.x (your machine)
→ Port 443 → dynamoip (HTTPS proxy, Let's Encrypt cert)
→ inventory:3001 / dashboard:6000Inside Docker, socat forwards localhost:PORT inside the dynamoip container to the actual app containers on Docker's internal network. This is how it works cross-platform — no network_mode: host required.
Project structure
lan/
├── docker-compose.yml
├── dynamoip.config.json
├── .env.example
├── setup-env.js
├── dynamoip/
│ ├── Dockerfile
│ └── entrypoint.sh
├── inventory/
│ ├── Dockerfile
│ ├── server.js
│ ├── index.html
│ └── package.json
└── dashboard/
├── Dockerfile
├── server.js
├── index.html
└── package.jsonSetup
1. Clone and enter the example
git clone https://github.com/foundanand/dynamoip-examples
cd dynamoip-examples/lan2. Detect your LAN IP and create .env
node setup-env.jsThis detects your machine's LAN IP (using OS-native commands — works on macOS, Linux, Windows), seeds .env from .env.example, and writes LAN_IP into it.
3. Fill in Cloudflare credentials
Open .env and add:
CF_API_TOKEN=your_cloudflare_api_token_here
CF_EMAIL=you@example.comGet a token at Cloudflare Dashboard → My Profile → API Tokens → Create Token, using the Edit zone DNS template scoped to your domain.
4. Start everything
docker compose up --buildDocker Compose will:
- Build all three images (multi-stage, minimal runners)
- Start inventory and dashboard, wait for their healthchecks to pass
- Start dynamoip — it sets Cloudflare DNS A records, obtains a Let's Encrypt certificate, and begins proxying
First run takes ~1 minute for certificate issuance. Subsequent starts are instant (cert cached in the dynamoip-certs volume).
5. Open on any device on the same Wi-Fi
https://inventory.yourdomain.com
https://dashboard.yourdomain.comNo certificate warnings. No setup on other devices.
Stopping
docker compose downThe dynamoip-certs volume is preserved so the certificate is reused on next start.
To also remove the volume (forces fresh certificate on next run):
docker compose down -v