Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Docs: Federation troubleshooting re: Cloudflare #16228

Open
@caseyWebb

Description

@caseyWebb

Description:

I am using Cloudflare as my DNS provider. When attempting to federate (using port 8448), I was getting errors like

Get "https://104.21.90.241:8448/_matrix/key/v2/server": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

"https://[2606:4700:3036::ac43:a2cf]:8448/_matrix/key/v2/server": dial tcp [2606:4700:3036::ac43:a2cf]:8448: i/o timeout (Client.Timeout exceeded while awaiting headers)

I determined this to be caused by the fact that, when using Cloudflare's proxying only certain ports are allowed. The simple solution is to turn off proxying (set matrix DNS entry to "DNS-only").


To elaborate, what happens (in my case) is:

  • https://example.com/.well-known/_matrix/server is fetched, it delegates to https://matrix.example.com
  • https://matrix.example.com resolves to a Cloudflare proxy IP address
  • Attempt to reach https://<cloudflare_ip>:8448
  • Cloudflare unhappy :(

You could presumably also change your configuration to use one of the supported ports.


I think a note in the delegation and/or federation docs about usage with Cloudflare would go a long way here to save some headache.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-Docsthings relating to the documentationA-FederationT-EnhancementNew features, changes in functionality, improvements in performance, or user-facing enhancements.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions