Matrix-Synapse
Synapse is a Matrix homeserver. Matrix is an open network for secure, decentralised communication.
View the nix-core NixOS module on GitHub.
References
Setup
DNS
Make sure you have a CNAME record for turn pointing to your domain.
Sops
Provide the following entries to your secrets.yaml:
Generate the livekit key with:Replace
abc123with your actual secret(s)
Config
{
imports = [inputs.core.nixosModules.matrix-synapse ];
networking.domain = "example.tld";
services.matrix-synapse = {
enable = true;
# see below
bridges = {
whatsapp = {
enable = true;
admin = "@you:example.tld";
};
signal = {
enable = true;
admin = "@you:example.tld";
};
};
};
}
Bridges
Warning: Bridges use
mautrix-gowhich relies on deprecatedlibolm.
Sops
Provide the following entries to your secrets.yaml:
Replace
abc123with your actual secret(s) andBRIDGEwith the name of your bridge (e.g.,signal)
mautrix-BRIDGE:
encryption-pickle-key: abc123
provisioning-shared-secret: abc123
public-media-signing-key: abc123
direct-media-server-key: abc123
Generate the secrets with:
NixOS configuration
The config.yaml for each bridge is managed through services.mautrix-BRIDGE.settings:
- services.mautrix-signal.settings: Generate an example config with:
mautrix-signal -c signal.yaml --generate-example-config - services.mautrix-whatsapp.settings: Generate an example config with:
mautrix-whatsapp -c whatsapp.yaml --generate-example-config
Authentication
- Open chat with bridge bot:
@BOT:DOMAIN.TLD- WhatsApp:
whatsappbot - Signal:
signalbot
- WhatsApp:
- Send:
login qr - Scan QR code
- Switch puppets:
login-matrix ACCESS_TOKEN- Get your token with: Settings > Help & About > Advanced > Access Token
Administration
Register users
Troubleshooting
Bridges: Specified admin user is not an admin in portal rooms
There seems to be a bug that the user specified under services.matrix-synapse.bridges.whatsapp.admin does not have admin permissions in portal rooms. You can set the power level manually inside each portal room: