diff --git a/.gitignore b/.gitignore index c3035f3..8544dea 100644 --- a/.gitignore +++ b/.gitignore @@ -3,8 +3,8 @@ *.log tmp/ -# Dendrite config -config/dendrite/ +# Synapse config +config/synapse/ # Mautrix-Whatsapp config config/mautrix-whatsapp/*.yaml diff --git a/ADDING_BRIDGES.md b/ADDING_BRIDGES.md index c108f89..557e633 100644 --- a/ADDING_BRIDGES.md +++ b/ADDING_BRIDGES.md @@ -1,30 +1,30 @@ # Adding New Bridges Guide -This guide explains how to integrate additional Matrix bridges into your Dendrite setup. It covers the general process and provides a template for maintaining consistency with the existing bridge configurations. +This guide explains how to integrate additional Matrix bridges into your Synapse setup. It covers the general process and provides a template for maintaining consistency with the existing bridge configurations. ## Prerequisites Before adding a new bridge, ensure you have: -- A working Dendrite setup using this repository's structure. +- A working Synapse setup using this repository's structure. - Basic understanding of Docker and Docker Compose. - Familiarity with Matrix bridges and their configuration. ## General Steps 1. **Choose a Bridge** - - Verify the bridge is compatible with Dendrite. + - Verify the bridge is compatible with Synapse. - Check if it has a Docker image available. - Review its documentation for specific requirements. 2. **Add Database Support** - Access the PostgreSQL container: ```bash - docker compose exec postgres psql -U dendrite + docker compose exec postgres psql -U synapse ``` - Create a new database and grant permissions: ```sql CREATE DATABASE your_bridge_name; - GRANT ALL PRIVILEGES ON DATABASE your_bridge_name TO dendrite; + GRANT ALL PRIVILEGES ON DATABASE your_bridge_name TO synapse; ``` - Verify the database was created: ```sql @@ -69,7 +69,7 @@ Before adding a new bridge, ensure you have: - Bridge-specific authentication or API settings. - Permissions and access controls. - Make sure to generate any required registration files. - - Update Dendrite's configuration to include the new bridge's registration file. + - Update Synapse configuration to include the new bridge's registration file. ## Integration Checklist diff --git a/MEDIA_MANAGEMENT.md b/MEDIA_MANAGEMENT.md deleted file mode 100644 index 73d0bd5..0000000 --- a/MEDIA_MANAGEMENT.md +++ /dev/null @@ -1,92 +0,0 @@ -# Cleanmedia Setup Guide - -This guide will help you set up Cleanmedia for your Dendrite Matrix server. Cleanmedia is a data retention policy tool that helps manage media storage by implementing configurable retention policies for both remote and local media files. - -## Prerequisites - -Before starting, ensure that: -- Dendrite is properly configured and running. -- You have the correct file paths for your media storage. -- You understand which media files you want to retain/remove. - -## Configuration Options - -You can customize Cleanmedia's behavior through environment variables in your docker-compose file: - -### CRON - -The `CRON` variable determines when Cleanmedia will run its cleanup routine. Examples: - -```yaml -environment: - - CRON=0 0 * * * # Daily at midnight (default) - - CRON=0 */6 * * * # Every 6 hours - - CRON=0 0 */2 * * # Every 2 days at midnight - - CRON=0 0 * * 0 # Weekly on Sunday at midnight - - CRON=0 12 * * 1-5 # Weekdays at noon -``` - -### CLEANMEDIA_OPTS - -The `CLEANMEDIA_OPTS` variable controls how Cleanmedia performs its cleanup: - -- `-c /etc/dendrite/dendrite.yaml`: Path to your Dendrite configuration file. Leave it as is. -- `-t 30`: Keep media for 30 days (adjust number as needed). -- `-l`: Include local user media in cleanup (optional). -- `-n`: Dry run mode - simulates cleanup without deleting files. -- `-d`: Debug mode for more verbose output. - -### Example Configurations - -1. Conservative cleanup (90-day retention, remote media only): -```yaml -environment: - - CRON=0 0 * * * # Daily at midnight - - CLEANMEDIA_OPTS=-c /etc/dendrite/dendrite.yaml -t 90 -``` - -2. Aggressive cleanup (7-day retention, including local media): -```yaml -environment: - - CRON=0 */12 * * * # Twice daily - - CLEANMEDIA_OPTS=-c /etc/dendrite/dendrite.yaml -t 7 -l -``` - -3. Test run (dry run with debug output): -```yaml -environment: - - CRON=0 0 * * * # Daily at midnight - - CLEANMEDIA_OPTS=-c /etc/dendrite/dendrite.yaml -t 30 -l -n -d -``` - -## Important Notes - -- Always test new configurations with the `-n` (dry run) flag first. -- Local media cleanup (`-l` flag) should be used with caution as files might not be retrievable after deletion. -- User avatars are automatically preserved. -- The service depends on the monolith service being available. -- Volume mounts must match your Dendrite configuration. - -## Troubleshooting - -1. **Missing Files** - - Verify volume mount paths match your Dendrite configuration. - - Check file permissions in mounted directories. - - Ensure Dendrite service is running properly. - -2. **Service Won't Start** - - Check logs: `docker compose logs cleanmedia`. - - Verify Dendrite configuration file path. - - Ensure monolith service is running. - -3. **Unexpected Deletions** - - Always test with `-n` flag first. - - Review debug logs with `-d` flag. - - Check retention period settings. - -## Next Steps - -For more detailed information about Cleanmedia features and configuration options, visit the [Cleanmedia documentation](https://gitlab.com/rogs/cleanmedia). - -Proceed to set up the [Whatsapp Bridge](../mautrix-whatsapp/README.md). - diff --git a/README.md b/README.md index bdde70b..7101fed 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Synapse Docker Bridges -A simple way to set up Synapse with bridges for WhatsApp, Telegram, and Discord, including automated media management. +A simple way to set up Synapse with bridges for WhatsApp, Telegram, and Discord.
@@ -110,9 +110,4 @@ docker compose up -d
Each bridge will only start if its configuration files exist. Bridges without configuration will remain stopped, which is normal.
-## Media Management
-
-For information about managing media storage and retention:
-- [Media Management](./MEDIA_MANAGEMENT.md)
-
**Note**: When configuring each bridge, you'll need to use the Database URI that was displayed during the setup process. Make sure you have saved it somewhere secure!
diff --git a/config/mautrix-discord/README.md b/config/mautrix-discord/README.md
index 2bcab2c..17c86fd 100644
--- a/config/mautrix-discord/README.md
+++ b/config/mautrix-discord/README.md
@@ -1,11 +1,11 @@
# Discord Bridge Setup Guide
-This guide will help you set up the Discord bridge for your Dendrite Matrix server.
+This guide will help you set up the Discord bridge for your Synapse Matrix server.
## Prerequisites
Before starting, ensure that:
-- Dendrite is properly configured and running.
+- Synapse is properly configured and running.
- The `discord` database was created during the initial setup.
- You have your domain name ready.
@@ -57,10 +57,10 @@ Update the database URI to use the Discord-specific database:
```yaml
# Original:
-# postgres://dendrite:password@postgres/dendrite?sslmode=disable
+# postgres://synapse:password@postgres/synapse?sslmode=disable
# Modified (note 'discord' database name):
-postgres://dendrite:password@postgres/discord?sslmode=disable
+postgres://synapse:password@postgres/discord?sslmode=disable
```
4. Generate the registration file:
@@ -69,12 +69,11 @@ postgres://dendrite:password@postgres/discord?sslmode=disable
docker run --rm -v `pwd`:/data:z dock.mau.dev/mautrix/discord
```
-5. Configure Dendrite to use the Discord bridge by editing `config/dendrite/dendrite.yaml`:
+5. Configure Synapse to use the Discord bridge by editing `config/synapse/homeserver.yaml`:
```yaml
-app_service_api:
- config_files:
- - "/etc/discord/registration.yaml"
+app_service_config_files:
+- "/etc/discord/registration.yaml"
```
6. Start the bridge service:
@@ -83,7 +82,7 @@ app_service_api:
docker compose up -d mautrix-discord
```
-7. Restart Dendrite to load the new bridge configuration:
+7. Restart Synapse to load the new bridge configuration:
```sh
docker compose restart monolith
diff --git a/config/mautrix-telegram/README.md b/config/mautrix-telegram/README.md
index d7135f5..f53f645 100644
--- a/config/mautrix-telegram/README.md
+++ b/config/mautrix-telegram/README.md
@@ -1,11 +1,11 @@
# Telegram Bridge Setup Guide
-This guide will help you set up the Telegram bridge for your Dendrite Matrix server.
+This guide will help you set up the Telegram bridge for your Synapse Matrix server.
## Prerequisites
Before starting, ensure that:
-- Dendrite is properly configured and running.
+- Synapse is properly configured and running.
- The `telegram` database was created during the initial setup.
- You have your domain name ready.
- You have your [Telegram API credentials](#obtaining-telegram-api-credentials) (we'll cover this below).
@@ -73,10 +73,10 @@ Update the database URI to use the Telegram-specific database:
```yaml
# Original:
-# postgres://dendrite:password@postgres/dendrite?sslmode=disable
+# postgres://synapse:password@postgres/synapse?sslmode=disable
# Modified (note 'telegram' database name):
-postgres://dendrite:password@postgres/telegram?sslmode=disable
+postgres://synapse:password@postgres/telegram?sslmode=disable
```
4. Generate the registration file:
@@ -85,12 +85,11 @@ postgres://dendrite:password@postgres/telegram?sslmode=disable
docker run --rm -v `pwd`:/data:z dock.mau.dev/mautrix/telegram
```
-5. Configure Dendrite to use the Telegram bridge by editing `config/dendrite/dendrite.yaml`:
+5. Configure Synapse to use the Telegram bridge by editing `config/synapse/homeserver.yaml`:
```yaml
-app_service_api:
- config_files:
- - "/etc/telegram/registration.yaml"
+app_service_config_files:
+- "/etc/telegram/registration.yaml"
```
6. Start the bridge service:
@@ -99,7 +98,7 @@ app_service_api:
docker compose up -d mautrix-telegram
```
-7. Restart Dendrite to load the new bridge configuration:
+7. Restart Synapse to load the new bridge configuration:
```sh
docker compose restart monolith
diff --git a/config/mautrix-whatsapp/README.md b/config/mautrix-whatsapp/README.md
index 22344d4..a6a3ee0 100644
--- a/config/mautrix-whatsapp/README.md
+++ b/config/mautrix-whatsapp/README.md
@@ -1,11 +1,11 @@
# WhatsApp Bridge Setup Guide
-This guide will help you set up the WhatsApp bridge for your Dendrite Matrix server.
+This guide will help you set up the WhatsApp bridge for your Synapse Matrix server.
## Prerequisites
Before starting, ensure that:
-- Dendrite is properly configured and running.
+- Synapse is properly configured and running.
- The `whatsapp` database was created during the initial setup.
- You have your domain name ready.
- You have access to a WhatsApp account with an active phone number.
@@ -59,10 +59,10 @@ Update the database URI to use the WhatsApp-specific database:
```yaml
# Original:
-# postgres://dendrite:password@postgres/dendrite?sslmode=disable
+# postgres://synapse:password@postgres/synapse?sslmode=disable
# Modified (note 'whatsapp' database name):
-postgres://dendrite:password@postgres/whatsapp?sslmode=disable
+postgres://synapse:password@postgres/whatsapp?sslmode=disable
```
4. Generate the registration file:
@@ -71,12 +71,11 @@ postgres://dendrite:password@postgres/whatsapp?sslmode=disable
docker run --rm -v `pwd`:/data:z dock.mau.dev/mautrix/whatsapp
```
-5. Configure Dendrite to use the WhatsApp bridge by editing `config/dendrite/dendrite.yaml`:
+5. Configure Synapse to use the WhatsApp bridge by editing `config/synapse/homeserver.yaml`:
```yaml
-app_service_api:
- config_files:
- - "/etc/whatsapp/registration.yaml"
+app_service_config_files:
+- "/etc/whatsapp/registration.yaml"
```
6. Start the bridge service:
@@ -85,7 +84,7 @@ app_service_api:
docker compose up -d mautrix-whatsapp
```
-7. Restart Dendrite to load the new bridge configuration:
+7. Restart Synapse to load the new bridge configuration:
```sh
docker compose restart monolith