I see you have port 8448 in the firewall rules: you’re not supposed to expose that directly (unless you take care of provisioning the certificates for TLS). You should only open 443.
Also, it seems you forgot to use mkWellKnown. See here for a working example.
I removed the port 8448 from the firewall settings as recommended.
I added the well-known components and now the tests pass in federation tester.
When I try to connect with fluffychat / elements both apps say that the server does not exist.
Do you know where I have to look to fix this new problem?
EDIT: first federation tester failed with 404 but I change the config and now it passes
OK. I play around with the config. Now elements & fluffy chat recognize my server.
But I can not log in. When I try to register a new user (like here: NixOS 23.05 manual | Nix & NixOS) I got the following message:
ERROR! Received 400 Bad Request
Shared secret registration is not enabled
You won’t find your options defined in extraConfigFiles in the homeserver.yaml because the files defined in extraConfigFiles are passed to synapse via the --config <path-to-file> argument.
You should see your extraConfigFiles pathes if you run
systemctl status systemctl status matrix-synapse.service | grep -e "--config"
besides of that I recognised that you have defined two synapse listeners on the loopback interface. One defined for localhost on port 8448 and another one defined for 127.0.0.1 on port 8008. Especially because they are configured differently (different ports, compress option and x_forwarded option).
This looks awkward to me.
Assuming you have a IPv4 configuration I would suggest to remove the first listener and test your configuration only with the following config: