CLI Reference
Daemon Control
Commands for starting, stopping, and managing the LocalDNS daemon.
Daemon Control
localdns start
Start the LocalDNS daemon, or start a specific domain's process.
localdns start [domain] [options]| Option | Description |
|---|---|
-p, --port <port> | API port (default: 1111) |
-f, --foreground | Run daemon in foreground |
localdns start # Start daemon
localdns start myapp.local # Start specific domain
localdns start --foreground # Run in foregroundlocaldns stop
Stop the LocalDNS daemon (stops all managed processes).
localdns stoplocaldns status
Show LocalDNS status: daemon state, registered domains, running vs stopped.
localdns statuslocaldns ensure
Ensure the daemon is always running. Installs a macOS launchd service if needed.
localdns ensure [options]| Option | Description |
|---|---|
--install-only | Only install the service, don't start it |
localdns install
Install LocalDNS as a system service (macOS launchd).
localdns install [options]| Option | Description |
|---|---|
--user | Install for current user only (default) |
--system | Install system-wide (requires sudo) |
--dns-only | Only set up DNS resolver |
--skip-dns | Skip DNS resolver setup |
localdns install # User-level install
sudo localdns install --system # System-wide install