# proxdomain configuration # Copy to /etc/proxdomain/config.toml (or ./proxdomain.toml) and edit. # Secrets are read from environment variables or files, never from this file. [general] # Registrable domain managed in Cloudflare. Zone discovery walks up from the # guest name until it finds a zone the token can read. base_domain = "example.com" # Placeholders: {hostname} {vmid} {node} {kind} {base_domain} # Keep {hostname} or {vmid} so every guest gets a unique name. domain_template = "{hostname}.{base_domain}" # Backend port used when neither --port nor a guest declaration (Notes field # `proxdomain-port=8080`, or tag `proxdomain-port-8080`) nor a stored # assignment provides one. default_port = 80 [dns] # What the public Cloudflare record points at: # host - the Proxmox host's public address (default; it runs the reverse proxy) # fixed - the literal dns.address below # guest - the guest's own address (only when guests hold public IPs) target = "host" # Explicit public address of the Proxmox host. Recommended: skips detection and # works on hosts whose outbound address differs from their inbound one. # address = "93.184.216.34" # Alternative to address: resolve the host's own FQDN instead of using a detector. # hostname = "pve.example.com" # Used when neither address nor hostname is set. The v4 URL is queried for # ip_preference = "ipv4", the v6 URL for "ipv6", both for "auto". detect_url_v4 = "https://ipv4.icanhazip.com" detect_url_v6 = "https://ipv6.icanhazip.com" detect_timeout = 5 [proxmox] # Proxmox VE API endpoint (note the /api2/json suffix and port 8006). api_url = "https://pve.example.com:8006/api2/json" # API token identifier: user@realm!tokenname token_id = "automation@pve!proxdomain" # Preferred: export PROXDOMAIN_PVE_TOKEN in the service environment. token_secret_env = "PROXDOMAIN_PVE_TOKEN" # Alternatives (uncomment one): # token_secret_file = "/etc/proxdomain/pve.token" # token_secret = "00000000-0000-0000-0000-000000000000" # Set to false only for a self-signed PVE certificate you cannot replace. verify_tls = true timeout = 20 # Addresses that are never published (loopback/link-local are always skipped). exclude_networks = ["127.0.0.0/8", "169.254.0.0/16", "172.17.0.0/16"] # auto | ipv4 | ipv6 ip_preference = "ipv4" [cloudflare] api_url = "https://api.cloudflare.com/client/v4" # Preferred: export PROXDOMAIN_CF_TOKEN api_token_env = "PROXDOMAIN_CF_TOKEN" # api_token_file = "/etc/proxdomain/cloudflare.token" # api_token = "..." # Orange cloud. Automatically disabled (with a warning) for non-public IPs. proxied = true # 1 = automatic, otherwise 60..86400 seconds. ttl = 1 record_comment = "managed by proxdomain" timeout = 20 retries = 2 [webserver] kind = "nginx" # nginx | caddy | traefik mode = "local" # local (run on the PVE host) | ssh (manage it remotely) # Directory holding one file per domain. `proxdomain init` creates it. manage_dir = "/etc/nginx/conf.d/proxdomain.d" # Defaults per kind are filled in when omitted: # nginx test: nginx -t reload: systemctl reload nginx # caddy test: caddy validate --config ... reload: systemctl reload caddy # traefik test/reload: none (file provider reloads itself) # test_command = ["nginx", "-t"] # reload_command = ["systemctl", "reload", "nginx"] # Only for mode = "ssh": the PVE host to manage. # ssh_host = "root@pve.example.com" # ssh_port = 22 # ssh_identity_file = "/root/.ssh/proxdomain_ed25519" # ssh_options = ["StrictHostKeyChecking=accept-new"] # Prefix for privileged remote commands; -n fails fast instead of prompting. # sudo = "sudo -n" # Required by kind = "traefik" when you want its ACME resolver used. # cert_resolver = "letsencrypt" [webserver.tls] # none - proxy listens on :80 (Cloudflare terminates TLS, or plain HTTP) # letsencrypt - automatic HTTPS with a Let's Encrypt certificate (recommended) # files - serve :443 using cert_dir//{fullchain,privkey}.pem # certbot - alias of letsencrypt for nginx (kept for older configs) # # nginx : proxdomain runs certbot (webroot/HTTP-01), then writes the :443 vhost # caddy : the site block pins the ACME issuer to Let's Encrypt # traefik : the router uses cert_resolver mode = "none" cert_dir = "/etc/letsencrypt/live" webroot = "/var/www/certbot" # Required for mode = "letsencrypt"/"certbot": Let's Encrypt expiry notices. # email = "ops@example.com" # Alternative ACME directory: staging endpoint, Pebble, or another CA. # acme_ca = "https://acme-staging-v02.api.letsencrypt.org/directory" # Command run by certbot after each renewal. Default: reload_command. # renew_hook = "systemctl reload nginx" # certbot_command = ["certbot", "certonly", "--webroot", "-w", "/var/www/certbot", "-n", "--agree-tos"] # extra_args = ["--preferred-chain", "ISRG Root X1"] [watch] # Used by `proxdomain watch`; the command itself is safe to run from cron/systemd. enabled = false interval = 60 # Only guests carrying this Proxmox tag are candidates. tag = "proxdomain" # false = list candidates only; pass --auto-assign (or set true) to assign. auto_assign = false require_running = true [state] path = "/var/lib/proxdomain/state.json" # Defaults to audit.jsonl next to the state file. # audit_path = "/var/log/proxdomain/audit.jsonl" lock_timeout = 10