Hey everyone,
Has anyone been able to get matrix federation working with Caddy using CloudFlare SSL and proxy?
Here is my caddy file settings, the server works great but I failed the federation tester as it says there is no well-known located.
example.com {
tls {
dns cloudflare "api_token"
}
header /.well-known/matrix/* Content-Type application/json
header /.well-known/matrix/* Access-Control-Allow-Origin *
respond /.well-known/matrix/server `{"m.server": "matrix.example.com:443"}`
respond /.well-known/matrix/client `{"m.homeserver":{"base_url":"https://matrix.example.com"},"m.ide
ntity_server":{"base_url":"https://identity.example.com"}}`
}
*.example.com {
tls {
dns cloudflare "api_token"
}
@matrix host matrix.example.com
handle @matrix {
reverse_proxy /_matrix/* 10.10.10.10:8008
reverse_proxy /_synapse/client/* 10.10.10.10:8008
}
@element host element.example.com
handle @element {
reverse_proxy 10.10.10.10:8075
}
Any help would be greatly appreciated
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.
Rules:
Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.
No spam posting.
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.
Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
No trolling.
Resources:
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
Probably the federation is still trying to access
matrix.example.com
instead of justexample.com
to get the.well-known
configuration.I’m not sure how to make this work in general, you need a way for the federated instances to ask your instance for the configuration in the host you want.