# Configuration > Status: draft | Updated 2026-07-06 | Applies to: `gateway.toml` AMPG is configured from one TOML file. The file declares global paths, sites, source adapters, render targets, and daemon policy. ## Create A Config For an existing static HTML site, start with `init site`: ```sh python3 -m ampg --config gateway.toml init site example \ --domain example.org \ --source ../example.org \ --preset full ``` Presets are concise transport bundles: - `full`: clearnet, Tor, and I2P. - `privacy`: Tor and I2P. - `i2p-only`, `tor-only`, `clearnet-only`, or `gemini-only`: one transport. Use `--protocol` to select exact transports instead of a preset: ```sh python3 -m ampg --config gateway.toml init site example \ --domain example.org \ --source ../example.org \ --protocol i2p ``` The generated config keeps common transports as `enabled = true/false` toggles and creates practical profiles such as `vps-full`, `tor-i2p`, and `mobile-i2p` when they apply. Then run `deploy plan` for a concise checklist: ```sh python3 -m ampg --config gateway.toml deploy plan --profile vps-full ``` ## Minimal Wownero pilot config ```toml [gateway] state_dir = "/var/lib/ampg" cache_dir = "/var/cache/ampg" run_dir = "/run/ampg" user = "ampg" [[site]] id = "wownero" domain = "wownero.org" [site.source] kind = "static-html" path = "../wownero.org-website" canonical_url = "https://wownero.org" [site.outputs] root = "/var/www/ampg/wownero" plan_root = "/var/lib/ampg/plans" [site.interactions] default_tier = "static" deny_routes = ["/admin/*", "/internal/*", "/webhooks/*"] [[site.interactions.route]] match = "/checkout/*" tier = "transactional" identity = "http-session" payments = "server-invoice" [[site.interactions.route]] match = "/admin/*" tier = "internal" public_allowed = false [site.protocols.clearnet] enabled = true renderer = "clearnet" daemon = "nginx" daemon_policy = "adopt" [site.protocols.tor] enabled = true renderer = "privacy-html" daemon = "tor" daemon_policy = "auto" local_port = 18080 onion_location = "auto" max_asset_bytes = 1048576 script_policy = "strip" [site.protocols.i2p] enabled = false renderer = "privacy-html" daemon = "i2pd" daemon_policy = "auto" local_port = 18081 keys_file = "wownero-web.dat" tunnel_name = "wownero-web" max_asset_bytes = 1048576 script_policy = "strip" [site.protocols.gemini] enabled = true renderer = "gemtext" daemon = "agate" daemon_policy = "auto" port = 1965 max_asset_bytes = 1048576 [site.protocols.ipfs] enabled = false renderer = "clearnet" daemon = "ipfs" daemon_policy = "auto" cid = "" [site.protocols.reticulum] enabled = false renderer = "micron" daemon = "rnsd" daemon_policy = "auto" aspect = "web" ``` ## Defaults Selected protocols default to `daemon_policy = "auto"` unless the protocol is clearnet. Clearnet defaults to `adopt`, because most operators already have a web server and TLS workflow. | Protocol | Default renderer | Default daemon | Default policy | | --- | --- | --- | --- | | clearnet | `clearnet` | `nginx` | `adopt` | | tor | `privacy-html` | `tor` | `auto` | | i2p | `privacy-html` | `i2pd` | `auto` | | gemini | `gemtext` | `agate` | `auto` | | ipfs | `clearnet` | `ipfs` | `auto` | | reticulum | `micron` | `rnsd` | `auto` | ## Gateway paths `[gateway]` paths are resolved relative to `gateway.toml` when they are not absolute. `state_dir` : AMPG-owned durable state. Managed daemon identities, generated transport state, daemon logs, daemon-written addresses, and the captured address registry live here. `cache_dir` : Rebuildable intermediate data. `run_dir` : Runtime sockets, pid files, and process metadata for managed daemons. `user` : Preferred service user emitted into generated managed-daemon artifacts. Transport URLs are resolved in this order: 1. Explicit protocol config such as `fixture_url`, `browser_url`, `onion_url`, `i2p_url`, `gemini_url`, `rns_url`, `ipfs_url`, or `cid`. 2. Captured state from `ampg addresses capture` or `ampg addresses set`. 3. A derived URL for clearnet/Gemini or a deterministic placeholder for identity-based transports whose final address is not known yet. Use `address_file` on a protocol target when an adopted daemon writes its public hostname outside AMPG's managed state layout. ## Renderer defaults `privacy-html` removes: - `