From 3dc19d30d1376fc66aa7cdbc346ddd2744fcd9cb Mon Sep 17 00:00:00 2001 From: headpats Date: Wed, 18 Mar 2026 06:36:29 +0100 Subject: [PATCH] docs/roundcube: add caddy example --- docs/roundcube-caddy.nix | 17 +++++++++++++++++ docs/roundcube.rst | 7 +++++++ 2 files changed, 24 insertions(+) create mode 100644 docs/roundcube-caddy.nix diff --git a/docs/roundcube-caddy.nix b/docs/roundcube-caddy.nix new file mode 100644 index 0000000..938e073 --- /dev/null +++ b/docs/roundcube-caddy.nix @@ -0,0 +1,17 @@ +{ config, ... }: +{ + services.nginx.virtualHosts.${config.services.roundcube.hostName} = { + forceSSL = false; + enableACME = false; + listen = [ + { + addr = "127.0.0.1"; + port = 8000; + } + ]; + }; + + services.caddy.virtualHosts."${config.services.roundcube.hostName}".extraConfig = '' + reverse_proxy localhost:8000 + ''; +} diff --git a/docs/roundcube.rst b/docs/roundcube.rst index c1f99ee..408fc92 100644 --- a/docs/roundcube.rst +++ b/docs/roundcube.rst @@ -17,3 +17,10 @@ Once set up you can login with your login account credentials. .. literalinclude:: ./roundcube.nix :language: nix + +To use a different reverse proxy, such as Caddy, bind Roundcube's Nginx virtual +host to ``127.0.0.1`` on a custom port and disable SSL and ACME, as the reverse +proxy will handle those. + +.. literalinclude:: ./roundcube-caddy.nix + :language: nix \ No newline at end of file