Configuration
Global and per-project configuration options.
Global config
The global config lives at ~/.hatch/config.yaml. View it with hatch config and update values with hatch config set.
# ~/.hatch/config.yaml default_tld: test http_port: 80 https_port: 443 dns_port: 53 log_level: info
Options
default_tld
The TLD used when creating domains without specifying one. Default: test.
hatch config set default_tld test
http_port
Port for the HTTP proxy. Default: 80.
https_port
Port for the HTTPS proxy. Default: 443.
dns_port
Port for the DNS server. Default: 53.
log_level
Daemon log verbosity. Options: debug, info, warn, error.
TLD options
| TLD | Notes |
|---|---|
| .test | Default. IETF-reserved, works everywhere. |
| .local | Familiar but may conflict with mDNS on macOS. |
| .localhost | IETF-reserved. Browsers treat as secure context. |
| .dev | Google-owned. Browsers force HTTPS (which Hatch handles). |
| .internal | IETF-reserved for internal use. |
Per-project config
Create a .hatch.yaml in your project root to save domain mappings with your repo. Hatch detects it automatically with hatch scan.
# .hatch.yaml
domains:
- domain: frontend.test
port: 3000
https: true
- domain: api.test
port: 8000
https: true
- domain: admin.test
port: 4200
https: true