matrix-docker-ansible-deploy/docs/configuring-playbook-synapse-admin.md
Suguru Hirahara 20c2aade3e
Edit descriptions about installation of components (#3842)
* Replace installation command shortcut for the "just" program with the most conservative raw ansible-playbook command

This commit replaces installation command shortcut ("recipe") for the "just" program with the raw ansible-playbook command, so that the shortcut will be added to it later. The command is so conservative that failure of the command will mean something is clearly broken.

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>

* Add comments about using setup-all instead of install-all

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>

* Add description about shortcut command with the "just" program to the ansible-playbook command with "setup-all" and "start" tags

It also explains difference between "just install-all" and "just setup-all" recipes. The explanation is based on docs/playbook-tags.md

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>

* Update raw ansible-playbook command to have it do what "just install-all" or "just setup-all" does

Since "just install-all" or "just setup-all" invokes "ensure-matrix-users-created" as well, it needs adding to the raw ansible-playbook command.

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>

* Remove "ensure-matrix-users-created" from the raw ansible-playbook command which does not need it

Also: update the "just" recipes accordingly. "just install-all" and "just setup-all" run "ensure-matrix-users-created" tag as well, therefore they need to be replaced with "run-tags" recipes to skip "ensure-matrix-users-created"

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>

* Update docs/configuring-playbook-etherpad.md: add ensure-matrix-users-created to the raw ansible-playbook

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>

* Add description about "ensure-matrix-users-created" and create a list with description about shortcut commands with "just"

This commit also fixes list item capitalization and punctuation.

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>

* Add notes bullet lists

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>

* Update docs/configuring-playbook-matrix-corporal.md and docs/configuring-playbook-email2matrix.md: adopt common instructions

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>

* Replace "run the installation command" with "run the playbook with tags"

Now that shortcut commands for the "just" program are displayed along with the existing "installation command", this commit replaces "run the installation command" with "run the playbook with tags" in order to prevent misunderstanding and confusion.

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>

* Add notes about changing passwords of users specified on vars.yml

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>

* Update docs/configuring-playbook-synapse-admin.md: add the playbook command and just recipes

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>

* Remove redundant blank lines

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>

* Update docs/configuring-playbook-alertmanager-receiver.md: remove the direction to proceed to Usage

Such a kind of direction is not used on other documentation, so it should be fine to just remove it.

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>

* Update docs/importing-synapse-media-store.md: code block for ansible-playbook

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>

---------

Signed-off-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
Co-authored-by: Suguru Hirahara <acioustick@noreply.codeberg.org>
2024-12-01 09:42:30 +02:00

5.4 KiB

Setting up Synapse Admin (optional)

The playbook can install and configure etkecc/synapse-admin (a feature-rich fork of Awesome-Technologies/synapse-admin, community room: #synapse-admin:etke.cc) for you.

synapse-admin is a web UI tool you can use to administrate users, rooms, media, etc. on your Matrix server. It's designed to work with the Synapse homeserver implementation and WON'T work with Dendrite because Dendrite Admin API differs from Synapse Admin API.

💡 Note: the latest version of synapse-admin is hosted by etke.cc at admin.etke.cc. If you only need this service occasionally and trust giving your admin credentials to a 3rd party Single Page Application, you can consider using it from there and avoiding the (small) overhead of self-hosting.

Adjusting the playbook configuration

To enable Synapse Admin, add the following configuration to your inventory/host_vars/matrix.example.com/vars.yml file:

matrix_synapse_admin_enabled: true

Note: Synapse Admin requires Synapse's Admin APIs to function. Access to them is restricted with a valid access token, so exposing them publicly should not be a real security concern. Still, for additional security, we normally leave them unexposed, following official Synapse reverse-proxying recommendations. Because Synapse Admin needs these APIs to function, when installing Synapse Admin, the playbook automatically exposes the Synapse Admin API publicly for you. Depending on the homeserver implementation you're using (Synapse, Dendrite), this is equivalent to:

  • for Synapse (our default homeserver implementation): matrix_synapse_container_labels_public_client_synapse_admin_api_enabled: true
  • for Dendrite: matrix_dendrite_container_labels_public_client_synapse_admin_api_enabled: true

By default, synapse-admin installation will be restricted to only work with one homeserver - the one managed by the playbook. To adjust these restrictions, tweak the matrix_synapse_admin_config_restrictBaseUrl variable.

⚠️ Warning: If you're using Matrix Authentication Service (MAS) for authentication, you will be able to log into synapse-admin with an access token, but certain synapse-admin features (especially those around user management) will be limited or not work at all.

Adjusting the Synapse Admin URL

By default, this playbook installs Synapse Admin on the matrix. subdomain, at the /synapse-admin path (https://matrix.example.com/synapse-admin). This makes it easy to install it, because it doesn't require additional DNS records to be set up. If that's okay, you can skip this section.

By tweaking the matrix_synapse_admin_hostname and matrix_synapse_admin_path_prefix variables, you can easily make the service available at a different hostname and/or path than the default one.

Example additional configuration for your inventory/host_vars/matrix.example.com/vars.yml file:

# Change the default hostname and path prefix
matrix_synapse_admin_hostname: admin.example.com
matrix_synapse_admin_path_prefix: /

Adjusting DNS records

If you've changed the default hostname, you may need to adjust your DNS records to point the Synapse Admin domain to the Matrix server.

See Configuring DNS for details about DNS changes.

If you've decided to use the default hostname, you won't need to do any extra DNS configuration.

Installing

After configuring the playbook and potentially adjusting your DNS records, run the playbook with playbook tags as below:

ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,start

The shortcut commands with just program are also available: just run-tags install-all,start or just run-tags setup-all,start

just run-tags install-all,start is useful for maintaining your setup quickly when its components remain unchanged. If you adjust your vars.yml to remove other components, you'd need to run just run-tags setup-all,start, or these components will still remain installed. For more information about just shortcuts, take a look at this page: Running just commands

Usage

After installation, Synapse Admin will be accessible at: https://matrix.example.com/synapse-admin/

To use Synapse Admin, you need to have registered at least one administrator account on your server.