Dendrite Docker Bridges
A simple way to set up Dendrite with bridges for WhatsApp, Telegram, and Discord, including automated media management.
Before Starting
-
Make sure you set up your domain by following this documentation: Dendrite Domain Name Setup.
-
Ensure you have
docker
anddocker compose
installed on your server. -
All commands will be executed in the project root, i.e., the directory where the repository was cloned.
Features
- Integrated bridges for WhatsApp, Telegram, and Discord
- Automated media management with Cleanmedia
- Simple setup process with provided scripts
- Docker-based deployment for easy maintenance
Installation
- Clone this repository and enter the directory:
git clone https://gitlab.com/rogs/dendrite-docker-bridges.git
cd dendrite-docker-bridges
- Run
setup.sh
:
./setup.sh
This script will:
- Prompt you for your domain (the one you configured in "Before Starting")
- Generate a secure database password
- Create your private key and config in the
./config/dendrite
directory - Display two important pieces of information:
- The "Registration shared secret"
- The Database URI
Important: Make sure to save both the registration shared secret AND the Database URI in a secure location. The Database URI will be needed later when configuring the bridges for WhatsApp, Telegram, and Discord.
- Open your configuration file located at
./config/dendrite/dendrite.yaml
. You may needsudo
to edit this file. Search forregistration_shared_secret
and paste the registration secret you copied in the previous step. The section should look similar to this:
client_api:
registration_disabled: true
registration_requires_token: false
registration_shared_secret: "YourBigCopiedKey123" # This is your key!
guests_disabled: false
enable_registration_captcha: false
recaptcha_api_js_url: ""
- Start the core services:
docker compose up -d postgres monolith
- Once PostgreSQL is up, create the bridge databases:
./setup-db.sh
This script will create three new databases: whatsapp
, telegram
, and discord
. These will be used by the bridges.
-
Verify the Dendrite setup by navigating to
http://your-ip-address:8008
in your browser. -
Create your first user using the provided script:
./create-user.sh
The script will:
- Prompt you for a username.
- Ask if the user should be an admin.
- Create the account in your Dendrite server.
- Display an access token.
Important: Save the access token displayed after user creation! You'll need it to enable double puppeting in the WhatsApp, Telegram, and Discord bridges. Double puppeting allows messages you send through the original apps to appear as coming from your Matrix account.
You can run this script multiple times to create additional users as needed.
For information about adding additional bridges to your setup:
Bridge Setup
Each bridge starts in a stopped state and will only run once properly configured. You can configure the bridges in any order:
-
Configure the bridge(s) you want to use:
-
Start configured bridges:
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:
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!