[SOLVED] Matrix Synapse | federation has stopped working

Also posted here, but perhaps this deserves to be its own post.

In Matrix (with the Element client) I am trying to connect to another server from my Freedombox. I have done this in the past, but I can no longer do so. As an example, if I try to join a known room #ROOM:SERVER.org, I get the error:

#ROOM:SERVER.org is not accessible at this time.

Try again later, or ask a room or space admin to check if you have access.

M_UNKNOWN was returned while trying to access the room or space. If you think you’re seeing this message in error, please submit a bug report.

If I try to search through public rooms on a server (e.g., Show: Matrix rooms (matrix.org) in the search bar in Element), I get the error “Failed to query public rooms”.

I am running Debian GNU/Linux 12 (bookworm) and FreedomBox version 23.21.

Note: To resolve issues from an update, I ran the following command in order to get the Matrix server working again:

sudo apt install -t bookworm-backports matrix-synapse python3-canonicaljson

During the above installation I had to manually write the homeserver name at the command line configuration prompt. See the discussion starting here for details. I am not sure if this is relevant.

I received some in-person help and it appears that the matrix-synpse server was not configured correctly.

If I correctly understood, the Matrix server was configured to listen on port 443 instead of 8448, but other servers did not know it was listening on 443.

What worked to fix this is creating the file /var/www/html/.well-known/matrix/server, which I did like so:

$ sudo mkdir /var/www/html/.well-known/
$ sudo mkdir /var/www/html/.well-known/matrix/

Then I created the file and added the following information:

$ sudo nano /var/www/html/.well-known/matrix/server

{
    "m.server": "NAME.freedombox.rocks:443"
}

Now the server is federating again. I tested it using:

https://federationtester.matrix.org

And I could successfully federate with other servers in the Matrix network.

However, I would prefer to have the configuration listen on port 8448 using standard Freedombox configurations.

Anyone able to help?

Edited to add: I did not intentionally change anything in the configuration of matrix-synapse and I do not know why it is configured to listen on port 443…

I have the same freedombox version and synapse listening to port 8448.

On my Pioneer, ps -ef | grep matrix gives

/usr/bin/python3 -m synapse.app.homeserver --config-path=/etc/matrix-synapse/homeserver.yaml --config-path=/etc/matrix-synapse/conf.d/

I see port 8448 mentioned in /etc/matrix-synapse/homeserver.yaml and in /etc/matrix-synapse/conf.d/freedombox-listeners.yaml/

Do you see the same?

EDIT: I previously did not run the command you are indicating, I only did what I indicated in [SOLVED] Matrix Synapse no longer working, update error "matrix-synapse is kept back" - #16 by Avron. For me, not only matrix-synapse was kept back and what I did solved all the issues.

Thanks for the suggestion. I took a look at the file /etc/matrix-synapse/homeserver.yaml and the files in the directory /etc/matrix-synapse/conf.d/ but only see reference to port 8448.

For example, in homeserver.yaml I see:

  # Main HTTPS listener
  # For when matrix traffic is sent directly to synapse.
  -
    # The port to listen for HTTPS requests on.
    port: 8448

This is embarrassing: Port forwarding for port 8448 was not set up or had been accidentally closed. I corrected that and now the issue is fixed. The server is federating even when the file /var/www/html/.well-known/matrix/server is deleted.