LocalDNS.wtf
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

OptionDescription
--fixAttempt to automatically fix common issues
--verboseShow detailed information including AI runner detection
localdns doctor
localdns doctor --fix
localdns doctor --verbose

localdns doctor fix

Run automatic repair for common issues. Iterates until all issues are resolved.

localdns doctor fix [options]
OptionDescription
--verboseShow 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

OptionDescription
--logsShow daemon logs
--processesShow running processes
--portsCheck port usage
--allShow all debug information (default)

localdns ports

List and manage ports used by registered domains.

localdns ports [options]

Aliases: port

OptionDescription
--jsonOutput as JSON
--availableShow available ports in the safe range
--usedShow only used ports

localdns config

View and modify LocalDNS settings.

localdns config [options]
OptionDescription
--get <key>Get a specific configuration value
--set <key> <value>Set a configuration value
--listList all configuration settings

Available Settings

SettingDefaultDescription
apiPort1111API server port
dashboardPort1112Dashboard port
proxyPort80HTTP proxy port
httpsPort443HTTPS proxy port
dnsPort5354DNS server port
defaultTldlocalDefault TLD
autoStartfalseAuto-start domains on daemon start
enableSmartDormancytrueEnable smart dormancy
defaultIdleTimeoutMs900000Idle timeout before dormancy (15 min)
portRangeStart7100Auto-assign port range start
portRangeEnd7899Auto-assign port range end
autoIndextrueAuto-index projects
indexMaxDepth3Max 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