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

TLDNotes
.testDefault. IETF-reserved, works everywhere.
.localFamiliar but may conflict with mDNS on macOS.
.localhostIETF-reserved. Browsers treat as secure context.
.devGoogle-owned. Browsers force HTTPS (which Hatch handles).
.internalIETF-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