Reverse proxy
Nutria serves plain HTTP. To reach it over HTTPS or from outside your network, put a reverse proxy in front of it.
Sign-in rate limit
Section titled “Sign-in rate limit”Sign-in allows 3 attempts per 10 seconds, per client address. Served directly, Nutria reads the client address from the connection. Behind a proxy every connection comes from the proxy, so all clients would share one sign-in allowance. Tell Nutria which proxies to trust so it limits each client on its own.
-
Set
TRUSTED_PROXIESin.envto the address or CIDR range the proxy connects from, as the app container sees it. With several proxies in a row (say a CDN, then Caddy), list them all, comma-separated:Terminal window TRUSTED_PROXIES=10.89.0.0/24The container refuses to start if an entry is not an IP address or CIDR range.
-
Forward the client address in
X-Forwarded-For. Caddy and Traefik do it by default. nginx needs:proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; -
Send
Strict-Transport-Securityfrom the proxy. Nutria doesn’t, since it may be served over plain HTTP on a local network. -
Set
BETTER_AUTH_URLto the public HTTPS address, e.g.https://nutria.example.com, and restart:Terminal window docker compose up -d --wait
Example: Caddy
Section titled “Example: Caddy”nutria.example.com { reverse_proxy localhost:3000 header Strict-Transport-Security "max-age=31536000"}