3.1 KiB
3.1 KiB
Discord Bridge Setup Guide
This guide will help you set up the Discord bridge for your Dendrite Matrix server.
Prerequisites
Before starting, ensure that:
- Dendrite is properly configured and running.
- The
discord
database was created during the initial setup. - You have your domain name ready.
Setup Steps
- Navigate to the Discord configuration directory:
cd config/mautrix-discord
- Generate the initial configuration file:
docker run --rm -v `pwd`:/data:z dock.mau.dev/mautrix/discord
- Edit the generated
config.yaml
file. You may need administrative privileges (sudo) to edit this file.
Required Configuration Changes
Make the following modifications to your config.yaml
:
Homeserver Settings
homeserver:
address: http://monolith:8008 # Internal Docker network address
domain: your.domain.com # Replace with your actual domain
Appservice Settings
appservice:
address: http://discord:29334 # Internal bridge address
hostname: 0.0.0.0 # Listen on all interfaces
Bridge Settings
bridge:
permissions:
"*": relay
"your.domain.com": user # Replace with your domain
"@yourusername:your.domain.com": admin # Replace with your Matrix ID
Database Connection
Update the database URI to use the Discord-specific database:
# Original:
# postgres://dendrite:password@postgres/dendrite?sslmode=disable
# Modified (note 'discord' database name):
postgres://dendrite:password@postgres/discord?sslmode=disable
- Generate the registration file:
docker run --rm -v `pwd`:/data:z dock.mau.dev/mautrix/discord
- Configure Dendrite to use the Discord bridge by editing
config/dendrite/dendrite.yaml
:
app_service_api:
config_files:
- "/etc/discord/registration.yaml"
Starting the Bridge
- Start the Discord bridge service:
docker compose up -d mautrix-discord
- Restart Dendrite to load the new bridge configuration:
docker compose restart monolith
Verifying the Setup
- Check if the bridge is running:
docker compose logs mautrix-discord
- Verify the bot is online in Discord
Using the Bridge
- Start a chat with
@discordbot:your.domain.com
in your Matrix client - Use the OAuth URL you generated earlier to add the bot to your Discord server
- Use the following commands to start bridging:
!discord login
- Link your Discord account!discord bridge <channel>
- Bridge a Discord channel!discord list
- List available servers and channels
Troubleshooting
Common issues and solutions:
-
Bridge Not Connecting
- Verify bot token is correct
- Check if all required intents are enabled
- Ensure bot has proper permissions in Discord
-
Channel Bridging Issues
- Verify bot has access to the channel
- Check if the channel type is supported
- Ensure proper permissions in both Discord and Matrix
-
Message Delivery Problems
- Check bridge logs for errors
- Verify Discord connection status
- Ensure proper permissions in both platforms