kota's memex

register new user

doas register_new_matrix_user -u username -p password -c /etc/synapse/homeserver.yaml

caddy reverse proxy

Much easier than nginx!

matrix.nilsu.org {
  reverse_proxy /_matrix/* localhost:8008
  reverse_proxy /_synapse/client/* localhost:8008
}

nilsu.org:8448 {
  reverse_proxy /_matrix/* localhost:8008
}

reset password

# generate a new hash
hash_password -c /etc/synapse/homeserver.yaml

doas su postgres
psql
\c synapse

# confirm you're looking at the right user
select * from users where name='@max:nilsu.org';

# set their password to the new hash
update users set password_hash='$2b$12$Zl.ApuDxQ4vrzBlkUIiHtuZ5sWZT2YCrvef2RsFnh6quiLUQZPEhO' where name='@max:nilsu.org';