Matrix Homeserver on NixOS

Prerequisites

  • NixOS installed
  • Domain with DNS pointing to server (A record: matrix.yourdomain.com)
  • Port 443, 8448 forwarded

Setup

  1. Clone to /etc/nixos (or copy files)
  2. Edit matrix.nix line 7: change enter-your-domain to your domain
  3. Edit configuration.nix line 30: set your ACME email
  4. Copy your hardware-configuration.nix into the directory
  5. Rebuild:
nixos-rebuild switch --flake /etc/nixos#nixos-matrix

Create Admin Account

sudo matrix-synapse-register_new_matrix_user

Prompts for: username, password, admin (y/n)

Verify

systemctl status matrix-synapse postgresql nginx

Test federation: https://federationtester.matrix.org

Notes

  • Registration disabled by default (enable_registration = false)
  • SSL via Let's Encrypt (automatic)
  • PostgreSQL configured automatically
Description
matrix-btw for my usecase, btw
Readme 38 KiB
Languages
Nix 100%