From b49b489d7ddee5dfafc5762a77e4ba9c85b68b12 Mon Sep 17 00:00:00 2001 From: "genevera (she/her)" Date: Sun, 27 Apr 2025 15:20:07 -0400 Subject: [PATCH] Update reverse_proxy.md Adds a small, working, config for Caddy --- docs/docs/guides/reverse_proxy.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/docs/guides/reverse_proxy.md b/docs/docs/guides/reverse_proxy.md index bbcf2118c5..d1cb2b4fe2 100644 --- a/docs/docs/guides/reverse_proxy.md +++ b/docs/docs/guides/reverse_proxy.md @@ -35,6 +35,7 @@ There are many solutions available to implement reverse proxies and the communit * [Apache2](#apache2-reverse-proxy) * [Nginx](#nginx-reverse-proxy) * [Traefik](#traefik-reverse-proxy) +* [Caddy](#caddy-reverse-proxy) ## Apache2 Reverse Proxy @@ -178,3 +179,32 @@ The above configuration will create a "service" in Traefik, automatically adding It will also add a router, routing requests to "traefik.example.com" to your local container. Note that with this approach, you don't need to expose any ports for the Frigate instance since all traffic will be routed over the internal Docker network. + +## Caddy Reverse Proxy +This example shows a working example of frigate running under a subdomain with logging and a tls cert (in this case a wildcard domain cert obtained independently of caddy) handled via imports + +```caddy +(logging) { + log { + output file /var/log/caddy/{args[0]}.log { + roll_size 10MiB + roll_keep 5 + roll_keep_for 10d + } + format json + level INFO + } +} + + +(tls) { + tls /var/lib/caddy/wildcard.YOUR_DOMAIN.TLD.fullchain.pem /var/lib/caddy/wildcard.YOUR_DOMAIN.TLD.privkey.pem +} + +frigate.YOUR_DOMAIN.TLD { + reverse_proxy http://localhost:8971 + import tls + import logging frigate.YOUR_DOMAIN.TLD +} + +```