0

I played around with my configs and got a running synapse homeserver on NixOS. The federation tester say everthing is ok. I want to register a new user I got the following Error Message:

ERROR! Received 400 Bad Request
Shared secret registration is not enabled

I thought I enabled it with:

services.matrix-synapse.extraConfigFiles = [    
"/etc/nixos/modules/matrix-shared-secret" ];

(Content: registration_shared_secret: secret)

But when I have a look in the homeserver.yaml the secret is not set. Maybe this could be the problem.

My working synapse.nix:

{ pkgs, lib, config, ... }:
{
  services.postgresql.enable = true;
  services.postgresql.initialScript = pkgs.writeText "synapse-init.sql" ''
    CREATE ROLE "matrix-synapse" WITH LOGIN PASSWORD 'XXX';
    CREATE DATABASE "matrix-synapse" WITH OWNER "matrix-synapse"
      TEMPLATE template0
      LC_COLLATE = "C"
      LC_CTYPE = "C";
  '';

  services.matrix-synapse = {
    enable = true;
    settings.server_name = "m.metacortex.space";
    settings.enable_metrics = true;

    settings.database.name = "psycopg2";
    settings.database.args = {
        user = "matrix-synapse";
    password = "XXX";
    };
    settings.listeners = [
      {
        bind_addresses = [ "localhost" ];
    port = 8448;
    tls = false;
       resources = [
          { compress = true; names = ["client" "federation"]; }
      { compress = false; names = [ "federation" ]; }
        ];
    type = "http";
    x_forwarded = false;
      }
      {
    bind_addresses = [ "127.0.0.1" ];
    port = 8008;
    resources = [ { compress = true; names = [ "client" "federation" ]; }
    ];
    tls = false;
    type = "http";
    x_forwarded = true;
      }

    ];
  };
  services.matrix-synapse.extraConfigFiles = [
    "/etc/nixos/modules/matrix-shared-secret" ];

}

any ideas?

0x01_PH
  • 126
  • 10

0 Answers0