diff --git a/.gitignore b/.gitignore index 3745b98..c3451ad 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ vault_pw -*.key \ No newline at end of file +*.key +notes diff --git a/README.md b/README.md index 50922e8..f013652 100644 --- a/README.md +++ b/README.md @@ -14,10 +14,27 @@ ansible-playbook secure.yml -i inventory/hosts.yml ``` ansible-playbook deploy_matrix.yml -i inventory/hosts.yml ``` -## Create user before SSO ## +## Matrix Administration ## +[synapse-admin on github](https://github.com/Awesome-Technologies/synapse-admin) + +- Create User ``` sudo podman exec -it synapse register_new_matrix_user -c /data/homeserver.yaml http://localhost:8008 ``` + +# List users +sudo podman exec -it synapse curl -H "Authorization: Bearer YOUR_ADMIN_TOKEN" "http://localhost:8008/_synapse/admin/v2/users" + +# Deactivate user +sudo podman exec -i synapse curl -X POST -H "Authorization: Bearer YOUR_ADMIN_TOKEN" -H "Content-Type: application/json" -d '{"erase": true}' "http://localhost:8008/_synapse/admin/v1/deactivate/@user:domain.com" + +# List rooms +sudo podman exec -it synapse curl -H "Authorization: Bearer YOUR_ADMIN_TOKEN" "http://localhost:8008/_synapse/admin/v1/rooms" + +# Delete room +sudo podman exec -i synapse curl -X DELETE -H "Authorization: Bearer YOUR_ADMIN_TOKEN" -H "Content-Type: application/json" -d '{}' "http://localhost:8008/_synapse/admin/v2/rooms/!roomid:domain.com" + + ## Clean up everything ## you will lose all persistence as well ```