CLI Reference
Diagnostics
Commands for system health checks, debugging, port management, and configuration.
Diagnostics & Configuration
localdns doctor
Comprehensive system health check. Checks CLI, daemon, DNS, ports, hosts file, and more.
localdns doctor [options]Aliases: check
| Option | Description |
|---|---|
--fix | Attempt to automatically fix common issues |
--verbose | Show detailed information including AI runner detection |
localdns doctor
localdns doctor --fix
localdns doctor --verboselocaldns doctor fix
Run automatic repair for common issues. Iterates until all issues are resolved.
localdns doctor fix [options]| Option | Description |
|---|---|
--verbose | Show detailed information |
--max-iterations <number> | Maximum fix iterations (default: 10) |
localdns debug
Debug information: daemon status, processes, logs, port usage.
localdns debug [options]Aliases: logs
| Option | Description |
|---|---|
--logs | Show daemon logs |
--processes | Show running processes |
--ports | Check port usage |
--all | Show all debug information (default) |
localdns ports
List and manage ports used by registered domains.
localdns ports [options]Aliases: port
| Option | Description |
|---|---|
--json | Output as JSON |
--available | Show available ports in the safe range |
--used | Show only used ports |
localdns config
View and modify LocalDNS settings.
localdns config [options]| Option | Description |
|---|---|
--get <key> | Get a specific configuration value |
--set <key> <value> | Set a configuration value |
--list | List all configuration settings |
Available Settings
| Setting | Default | Description |
|---|---|---|
apiPort | 1111 | API server port |
dashboardPort | 1112 | Dashboard port |
proxyPort | 80 | HTTP proxy port |
httpsPort | 443 | HTTPS proxy port |
dnsPort | 5354 | DNS server port |
defaultTld | local | Default TLD |
autoStart | false | Auto-start domains on daemon start |
enableSmartDormancy | true | Enable smart dormancy |
defaultIdleTimeoutMs | 900000 | Idle timeout before dormancy (15 min) |
portRangeStart | 7100 | Auto-assign port range start |
portRangeEnd | 7899 | Auto-assign port range end |
autoIndex | true | Auto-index projects |
indexMaxDepth | 3 | Max directory depth for scanning |
SSL/TLS Certificates
localdns certs install-mkcert # Install mkcert tool
localdns certs install-ca # Install local CA
localdns certs generate <domain> # Generate SSL cert
localdns certs list # List certificates
localdns certs remove <domain> # Remove certificate