# Dendrite Docker Bridges
A simple way to set up Dendrite with bridges for WhatsApp, Telegram, and Discord, including automated media management.
## Before Starting
1. Make sure you set up your domain by following this documentation: [Dendrite Domain Name Setup](https://element-hq.github.io/dendrite/installation/domainname).
2. Ensure you have `docker` and `docker compose` installed on your server.
3. 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
1. Clone this repository and enter the directory:
```sh
git clone https://gitlab.com/rogs/dendrite-docker-bridges.git
cd dendrite-docker-bridges
```
2. Run `setup.sh`:
```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.
3. Open your configuration file located at `./config/dendrite/dendrite.yaml`. **You may need `sudo` to edit this file.** Search for `registration_shared_secret` and paste the registration secret you copied in the previous step. The section should look similar to this:
```yaml
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: ""
```
4. Start Dendrite (only the DB and the monolith!):
```sh
docker compose up -d postgres monolith
```
5. Run `setup-db.sh`:
```sh
./setup-db.sh
```
This script will create three new databases: `whatsapp`, `telegram`, and `discord`. These will be used later for the bridges.
6. Verify the setup by navigating to `http://your-ip-address:8008` in your browser. You should see a screen similar to this:

7. Create your first user using the provided script:
```sh
./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
You can run this script multiple times to create additional users as needed.
## That's It!
Dendrite is now up and running! You can proceed with setting up the media management and bridges:
- [Media Management](./MEDIA_MANAGEMENT.md)
- [WhatsApp Bridge](./config/mautrix-whatsapp/README.md)
- [Telegram Bridge](./config/mautrix-telegram/README.md)
- [Discord Bridge](./config/mautrix-discord/README.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!