Edit ‘infrastructure_and_operations/inventory/matrix’ by forest

Edit ‘infrastructure_and_operations/inventory/matrix’ (by forest at 23 Dec 25 23:23 UTC)

Hyphae affected: infrastructure_and_operations/inventory/matrix

diff --git a/infrastructure_and_operations/inventory/matrix.myco b/infrastructure_and_operations/inventory/matrix.myco
index 2726d49..1c4abce 100644
--- a/infrastructure_and_operations/inventory/matrix.myco
+++ b/infrastructure_and_operations/inventory/matrix.myco
@@ -27,2 +27,3 @@ root@matrix:~#
* List of places where Data is Stored
+* Example of how to discover this stuff yourself
* Upgrade Procedures
@@ -94,3 +95,37 @@ img {

-## List of places where Software is Configured
+## Places where Software is Configured
+
+**matrix-synapse**, this is the main "matrix homeserver" implementation
+table {
+! location ! description !
+| `/lib/systemd/system/matrix-synapse.service` | matrix server systemd service unit config file |
+| `/etc/matrix-synapse/homeserver.yaml` | matrix server configuration |
+| `/etc/matrix-synapse/homeserver.signing.key` | private key for matrix encryption stuff. Important to back this up! |
+}
+
+**postgres**, the database used by matrix-synapse
+table {
+! location ! description !
+| `/lib/systemd/system/postgresql@.service` | postgres systemd service unit template file |
+| `/etc/postgresql/13/main/postgresql.conf ` | postgres configuration |
+}
+
+
+**matrix-appservice-discord**, this is discord bridge
+table {
+! location ! description !
+| `/lib/systemd/system/matrix-appservice-discord.service` | matrix discord bridge systemd service unit config file |
+| `/etc/matrix-synapse/discord-registration.yaml` | matrix-synapse configuration for discord bridge |
+| `/opt/matrix-appservice-discord` | where the source code is checked out and run from. also some log files are written here |
+| '/opt/matrix-appservice-discord/config.yaml` | matrix discord bridge config file |
+}
+
+
+
+
+
+
+
+
+## Example of how to find the configs yourself

@@ -98,2 +133,49 @@ The matrix server is based on debian and as such it uses `systemd` to define ser

-We have a cheat sheet for systemd: [[infrastructure_and_operations/systemd_openrc_cheatsheet]]
\ No newline at end of file
+We have a [[infrastructure_and_operations/systemd_openrc_cheatsheet | cheat sheet for systemd]]
+
+But for convenience, I'll put an example in-line here:
+
+```
+root@matrix:~# systemctl status matrix-synapse
+● matrix-synapse.service - Synapse Matrix homeserver
+ Loaded: loaded (/lib/systemd/system/matrix-synapse.service; enabled; vendor preset: enabled)
+ Active: active (running) since Tue 2025-11-18 20:23:16 UTC; 1 months 4 days ago
+ Main PID: 3227424 (python)
+ Tasks: 47 (limit: 9527)
+ Memory: 1.7G
+ CPU: 1w 17h 20min 46.764s
+ CGroup: /system.slice/matrix-synapse.service
+ └─3227424 /opt/venvs/matrix-synapse/bin/python -m synapse.app.homeserver --config-path=/etc/matrix-synapse/homeserver.yaml --config-path=/etc/matrix-synapse/conf.d/
+```
+
+See where it says `Loaded: loaded (/lib/systemd/system/matrix-synapse.service;`?
+
+That's the file path of the "systemd service unit" config file that defines when matrix starts, how its configured, etc.
+
+So we can just go look at that file:
+
+```
+root@matrix:~# cat /lib/systemd/system/matrix-synapse.service
+[Unit]
+Description=Synapse Matrix homeserver
+
+[Service]
+Type=notify
+User=matrix-synapse
+WorkingDirectory=/var/lib/matrix-synapse
+ExecStartPre=/opt/venvs/matrix-synapse/bin/python -m synapse.app.homeserver --config-path=/etc/matrix-synapse/homeserver.yaml --config-path=/etc/matrix-synapse/conf.d/ --generate-keys
+ExecStart=/opt/venvs/matrix-synapse/bin/python -m synapse.app.homeserver --config-path=/etc/matrix-synapse/homeserver.yaml --config-path=/etc/matrix-synapse/conf.d/
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=always
+RestartSec=3
+SyslogIdentifier=matrix-synapse
+
+[Install]
+WantedBy=multi-user.target
+```
+
+This is helpful because it tells us where the matrix-synapse code is located (`/opt/venvs/matrix-synapse`) and it also gives us two more places to look for config info:
+
+* `/etc/matrix-synapse/homeserver.yaml`
+* `/etc/matrix-synapse/conf.d/`
+