Synapse (Matrix) via dynDNS

I tried to install Synapse on my Raspi yesterday. The installation itself went through without any problems. But I had difficulties to reach it via my DynDNS ( I have released the ports 8008 and 8448 on my Fritzbox. Does anyone have an idea where the error is?

In this message you announce a separate post about Synapse for the blog. Maybe this will help me when it is published?


1 Like


did you activate TLS configuration inside Synapse? Means you configured SSL certificate and activated HTTPS port?

Hi Joulinar,
thx for your repliy

no, not knowingly. how do i have to do that?

yes, SSL via let’s encrypt and port 443 is active … for the whole pi

ok in this case it might be easier to reuse the existing web server as revers proxy. What web server you are running? And is it used for other web apps already?

  • Nginx as web server
  • Nextcloud in a subdir
  • let’s encrypt certificate
    everything installed via dietpi-software script
    dyndns: installed manually

that’s pretty perfect as we could easily enable Nginx to work as revers proxy for Matrix. Do following

nano /etc/nginx/sites-dietpi/matrix.conf

add following inside

    location /_matrix {
      proxy_set_header X-Forwarded-For $remote_addr;
      proxy_set_header X-Forwarded-Proto $scheme;
      client_max_body_size 50M;

    location /.well-known/matrix/server {
      return 200 '{"m.server": ""}';
      add_header Content-Type application/json;

    location /.well-known/matrix/client {
      return 200 '{"m.homeserver": {"base_url": ""}}';
      add_header Content-Type application/json;
      add_header "Access-Control-Allow-Origin" *;

save and exit the file. Restart Nginx now

systemctl restart nginx.service

Usually you should be able to reach Matrix via apps like Elemet. Custom URL would be simply

This is based on this blog post

Hi Joulinar

this works perfectly!!!

thx you very much for your fast and uncomplicated help :smiley:

perfect :slight_smile:

1 Like