diff --git a/deploy/matrix/Caddyfile b/deploy/matrix/Caddyfile new file mode 100644 index 00000000..31a85e23 --- /dev/null +++ b/deploy/matrix/Caddyfile @@ -0,0 +1,30 @@ +matrix.example.com { + handle /.well-known/matrix/server { + header Content-Type application/json + respond `{"m.server": "matrix.example.com:443"}` + } + + handle /.well-known/matrix/client { + header Content-Type application/json + respond `{"m.homeserver": {"base_url": "https://matrix.example.com"}}` + } + + handle_path /_matrix/* { + reverse_proxy localhost:6167 + } + + handle { + reverse_proxy localhost:8080 + } + + log { + output file /var/log/caddy/matrix.log { + roll_size 10MB + roll_keep 10 + } + } +} + +matrix-federation.example.com:8448 { + reverse_proxy localhost:6167 +}