From 77589c18f4cc685600c19f2b08dfab6ce4e31c80 Mon Sep 17 00:00:00 2001 From: "genevera (she/her)" Date: Sun, 27 Apr 2025 22:19:00 -0400 Subject: [PATCH] Update reverse_proxy.md (#17927) * Update reverse_proxy.md Adds a small, working, config for Caddy * Update docs/docs/guides/reverse_proxy.md Co-authored-by: Nicolas Mowen * Update docs/docs/guides/reverse_proxy.md Co-authored-by: Nicolas Mowen --------- Co-authored-by: Nicolas Mowen --- docs/docs/guides/reverse_proxy.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/docs/docs/guides/reverse_proxy.md b/docs/docs/guides/reverse_proxy.md index bbcf2118c..5edfb5c60 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,33 @@ 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 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 +} + +```