Guillaume Hérail

Ramblings in Frenglish

Caddy as a reverse proxy to Dendrite

Posted on — Jan 12, 2021

I use Dendrite as I experiment with Matrix. It consumes a lot less resources than Synapse though it is in beta and doesn’t support the specification in full. The trade-off suits me.

I wanted to try Caddy for a long time and I just did, switching this blog and a few other services to it. The last one to be migrated was Dendrite. The repository gives an example configuration for nginx but not for Caddy. Here’s what I ended up using:

# delegate to {
    handle /.well-known/matrix/server {
        respond "{\"m.server\":\"\"}"

    handle /.well-known/matrix/client {
        respond "{\"m.homeserver\":{\"base_url\":\"\"}}"

# reverse proxy to Dendrite, both :443 and :8448 {
    handle /_matrix/* {
        reverse_proxy http://dendrite:8008 {

This configuration delegates to and takes care of SSL certificates on its own.

This is day 10/100 of #100DaysToOffLoad!