Sendword reads its configuration from sendword.toml in the working directory. Every option can be overridden with environment variables using the SENDWORD_ prefix.
[server]
bind = "127.0.0.1" # Listen address
port = 8080 # Listen port
[database]
path = "data/sendword.db"
[logs]
dir = "data/logs"
[scripts]
dir = "data/scripts"
[auth]
session_lifetime = "24h" # Login session duration
secure_cookie = false # Require HTTPS for cookies
Global defaults that individual hooks can override:
[defaults.rate_limit]
max_per_minute = 60
[defaults.timeout]
timeout = "30s"
[defaults.retries]
count = 0
backoff = "exponential"
initial_delay = "1s"
max_delay = "60s"
Any setting can be overridden using the SENDWORD_ prefix with __ for nesting:
SENDWORD_SERVER__PORT=9090 sendword serve
SENDWORD_DEFAULTS__TIMEOUT__TIMEOUT=60s sendword serve
Export your running config as JSON:
sendword export > config.json
Import on another machine:
sendword import config.json
Or use the API:
curl http://localhost:8080/api/config/export > config.json
curl -X POST http://localhost:8080/api/config/import \
-H "Content-Type: application/json" \
-d @config.json