98 lines
3.8 KiB
TOML
Executable File
98 lines
3.8 KiB
TOML
Executable File
# 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 `assign` is called without --port.
|
|
default_port = 80
|
|
|
|
[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)
|
|
# files - serve :443 using cert_dir/<fqdn>/{fullchain,privkey}.pem
|
|
# certbot - obtain the certificate with certbot (nginx only); the app first
|
|
# activates an HTTP vhost to answer the ACME challenge
|
|
mode = "none"
|
|
cert_dir = "/etc/letsencrypt/live"
|
|
webroot = "/var/www/certbot"
|
|
# Required for mode = "certbot":
|
|
# email = "ops@example.com"
|
|
# certbot_command = ["certbot", "certonly", "--webroot", "-w", "/var/www/certbot", "-n", "--agree-tos"]
|
|
# extra_args = ["--deploy-hook", "systemctl reload nginx"]
|
|
|
|
[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
|