Matrix Synapse NGINX Troubleshoot

Job ID: 40526515

Budget: $30 – $250 USD

My Matrix homeserver is almost ready: it runs on a DietPi box with Synapse installed, the database is populated, federation is enabled, and DNS/DDNS records are in place. The one piece still blocking public federation is the NGINX reverse-proxy layer. I already have a working-ish set of server blocks, but traffic for ports 443 and 8448 is not being handled correctly, the /.well-known endpoints are inconsistent, and SSL termination occasionally fails.

I need you to read through the existing NGINX configuration, spot the missing or conflicting directives, and adjust them so that:

• Synapse’s client and federation endpoints resolve externally without warning banners
• .well-known/matrix/server and .well-known/matrix/client return the expected JSON
• automatic certificate renewal (Certbot) succeeds and restarts cleanly
• test federation with matrix.org passes, confirming that rooms, presence, and media sync both ways

Feel free to reorganise the files into separate includes if that simplifies maintenance, but keep comments describing each change so I can follow along later. If any DNS or port-forwarding tweaks are required, let me know exactly what to adjust; I can apply them on my registrar and router side in real time while you stay focused on NGINX.

Deliverables at the end are the final, annotated NGINX config files and a short note outlining the steps you took, so I can replicate the fix on a future rebuild.
Related categories: PHP Linux Apache DNS Nginx JSON SSL System Administration