#+TITLE: Matrix Homeserver on NixOS * Prerequisites - NixOS installed - Domain with DNS pointing to server (A/AAAA Record matrix.domain.tld) - Port 443 * Setup 1. Clone to =/etc/nixos= (or copy files) 2. Edit =matrix.nix= line 7: change =enter-your-domain= to your domain 3. Copy your =hardware-configuration.nix= into the directory 4. Rebuild: #+begin_src sh nixos-rebuild switch --flake /etc/nixos#nixos-matrix #+end_src * Create Admin Account #+begin_src sh sudo matrix-synapse-register_new_matrix_user #+end_src Prompts for: username, password, admin (y/n) * Verify #+begin_src sh systemctl status matrix-synapse postgresql nginx #+end_src Test federation: https://federationtester.matrix.org * Notes - Registration disabled by default (=enable_registration = false=) - PostgreSQL configured automatically - Intended usecase ipv6 lxc container with remote reverse proxy