From bd794e8c2c39020724474dacf25b65f0280ca934 Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Sat, 1 Feb 2025 16:21:21 +0900 Subject: [PATCH] Update maintenance-and-troubleshooting.md: create sections "Maintenance" and "Troubleshooting" Signed-off-by: Suguru Hirahara --- docs/maintenance-and-troubleshooting.md | 40 ++++++++++++++----------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/docs/maintenance-and-troubleshooting.md b/docs/maintenance-and-troubleshooting.md index 377eca51a..460144183 100644 --- a/docs/maintenance-and-troubleshooting.md +++ b/docs/maintenance-and-troubleshooting.md @@ -1,6 +1,24 @@ # Maintenance and Troubleshooting -## How to see the current status of your services +## Maintenance + +### Remove unused Docker data + +You can free some disk space from Docker by removing its unused data. See [docker system prune](https://docs.docker.com/engine/reference/commandline/system_prune/) for more information. + +```sh +ansible-playbook -i inventory/hosts setup.yml --tags=run-docker-prune +``` + +The shortcut command with `just` program is also available: `just run-tags run-docker-prune` + +### Postgres + +See the dedicated [PostgreSQL Maintenance](maintenance-postgres.md) documentation page. + +## Troubleshooting + +### How to see the current status of your services You can check the status of your services by using `systemctl status`. Example: @@ -12,7 +30,7 @@ sudo systemctl status matrix-synapse Active: active (running) since Sun 2024-01-14 09:13:06 UTC; 1h 31min ago ``` -## How to see the logs +### How to see the logs Docker containers that the playbook configures are supervised by [systemd](https://wiki.archlinux.org/title/Systemd) and their logs are configured to go to [systemd-journald](https://wiki.archlinux.org/title/Systemd/Journal). @@ -26,7 +44,7 @@ Available service names can be seen by doing `ls /etc/systemd/system/matrix*.ser We just simply delegate logging to journald and it takes care of persistence and expiring old data. -### Enable systemd/journald logs persistence +#### Enable systemd/journald logs persistence On some distros, the journald logs are just in-memory and not persisted to disk. @@ -43,7 +61,7 @@ RateLimitBurst=0 Storage=persistent ``` -## How to check if services work +### How to check if services work The playbook can perform a check to ensure that you've configured things correctly and that services are running. @@ -58,17 +76,3 @@ The shortcut command with `just` program is also available: `just run-tags self- If it's all green, everything is probably running correctly. Besides this self-check, you can also check whether your server federates with the Matrix network by using the [Federation Tester](https://federationtester.matrix.org/) against your base domain (`example.com`), not the `matrix.example.com` subdomain. - -## Remove unused Docker data - -You can free some disk space from Docker by removing its unused data. See [docker system prune](https://docs.docker.com/engine/reference/commandline/system_prune/) for more information. - -```sh -ansible-playbook -i inventory/hosts setup.yml --tags=run-docker-prune -``` - -The shortcut command with `just` program is also available: `just run-tags run-docker-prune` - -## Postgres - -See the dedicated [PostgreSQL Maintenance](maintenance-postgres.md) documentation page.