A bridge between Matrix and Discord. Currently the bridge is in Beta and quite usable for everyday bridging, with one or two bugs cropping up.

PRs are graciously accepted, so please come talk to us in #discord-bridge:matrix.org
about any neat ideas you might have. If you are going to make a change, please merge it with the develop branch :).
You can also file bug reports/ feature requests on Github Issues which also helps a ton. Please remember to include logs. Please also be aware that this is an unoffical project worked on in our spare time.
The bridge has been tested against the Synapse homeserver, although any homeserver that implements the AS API should work with this bridge.
The bridge supports any version of Node.js between v18.X - v20.X. View the releases for more details.
The bridge uses Yarn for dependency management and package scripts. For the time being, only Yarn Classic / v1 is supported. To install it, follow these instructions.
If you already have Yarn 2+ installed, you may configure just this project to use Yarn Classic
by running yarn set version classic in the directory where you cloned this repository.
Run yarn to grab the dependencies.
Copy config/config.sample.yaml to config.yaml and edit it to reflect your setup.
domain and homeserverURL to your public host name.
While localhost would work, it does not resolve correctly with Webhooks/Avatars.
Please note that a self-signed SSL certificate won't work, either.bridge:
domain: "example.com"
homeserverUrl: "https://example.com"
Run yarn start -r -u "http://localhost:9005"
Modify your HSs appservices config so that it includes the generated file.
app_service_config_files array in homeserver.yamlapp_service_config_files:
- "discord-registration.yaml"
discord-registration.yaml to your Synapse's directory.Following the instructions above, generate a registration file. The file may also be hand-crafted if you're familiar with the layout. You'll need this file to use the Docker image.
# Create the volume where we'll keep the bridge's files
mkdir -p /matrix-appservice-discord
# Create the configuration file. Use the sample configuration file as a template.
# Be sure to set the database paths to something like this:
# database:
# filename: "/data/discord.db"
# userStorePath: "/data/user-store.db"
# roomStorePath: "/data/room-store.db"
nano /matrix-appservice-discord/config.yaml
# Copy the registration file to the volume
cp discord-registration.yaml /matrix-appservice-discord/discord-registration.yaml
# Optional: Build the container yourself (requires a git clone, and to be in the root of the project)
docker build -t halfshot/matrix-appservice-discord .
# Run the container
docker run -v /matrix-appservice-discord:/data -p 9005:9005 halfshot/matrix-appservice-discord
The bridge supports reporting metrics via Prometheus. You can configure metrics support in the config
file. The metrics will be reported under the URL provided in the registration file, on the /metrics endpoint.
This bridge support searching for rooms within networks via the 3pid system used in clients like Element. Any new servers/guilds you bridge should show up in the network list on Element and other clients.
config.yamlyarn addbot to get a authorisation link.#_discord_guildid_channelid
Manage Webhooks on the role added by the bot._matrix Webhook for each channel you'd like to enable this feature on.yarn startauth.botToken can be set with APPSERVICE_DISCORD_AUTH_BOT_TOKEN.You must get an authorization link from bridge owner. You must be a server admin or get help from server admin on Discord side.
!discord bridge ServerID ChannelID!discord unbridgeIn a vague order of what is coming up next
My Matrix ID: @Half-Shot:half-shot.uk
162 followers · starred Aug 2020
98 followers · starred Aug 2023
228 followers · starred Jul 2018
210 followers · starred Jul 2021
A bridge between Matrix and Discord. Currently the bridge is in Beta and quite usable for everyday bridging, with one or two bugs cropping up.

PRs are graciously accepted, so please come talk to us in #discord-bridge:matrix.org
about any neat ideas you might have. If you are going to make a change, please merge it with the develop branch :).
You can also file bug reports/ feature requests on Github Issues which also helps a ton. Please remember to include logs. Please also be aware that this is an unoffical project worked on in our spare time.
The bridge has been tested against the Synapse homeserver, although any homeserver that implements the AS API should work with this bridge.
The bridge supports any version of Node.js between v18.X - v20.X. View the releases for more details.
The bridge uses Yarn for dependency management and package scripts. For the time being, only Yarn Classic / v1 is supported. To install it, follow these instructions.
If you already have Yarn 2+ installed, you may configure just this project to use Yarn Classic
by running yarn set version classic in the directory where you cloned this repository.
Run yarn to grab the dependencies.
Copy config/config.sample.yaml to config.yaml and edit it to reflect your setup.
domain and homeserverURL to your public host name.
While localhost would work, it does not resolve correctly with Webhooks/Avatars.
Please note that a self-signed SSL certificate won't work, either.bridge:
domain: "example.com"
homeserverUrl: "https://example.com"
Run yarn start -r -u "http://localhost:9005"
Modify your HSs appservices config so that it includes the generated file.
app_service_config_files array in homeserver.yamlapp_service_config_files:
- "discord-registration.yaml"
discord-registration.yaml to your Synapse's directory.Following the instructions above, generate a registration file. The file may also be hand-crafted if you're familiar with the layout. You'll need this file to use the Docker image.
# Create the volume where we'll keep the bridge's files
mkdir -p /matrix-appservice-discord
# Create the configuration file. Use the sample configuration file as a template.
# Be sure to set the database paths to something like this:
# database:
# filename: "/data/discord.db"
# userStorePath: "/data/user-store.db"
# roomStorePath: "/data/room-store.db"
nano /matrix-appservice-discord/config.yaml
# Copy the registration file to the volume
cp discord-registration.yaml /matrix-appservice-discord/discord-registration.yaml
# Optional: Build the container yourself (requires a git clone, and to be in the root of the project)
docker build -t halfshot/matrix-appservice-discord .
# Run the container
docker run -v /matrix-appservice-discord:/data -p 9005:9005 halfshot/matrix-appservice-discord
The bridge supports reporting metrics via Prometheus. You can configure metrics support in the config
file. The metrics will be reported under the URL provided in the registration file, on the /metrics endpoint.
This bridge support searching for rooms within networks via the 3pid system used in clients like Element. Any new servers/guilds you bridge should show up in the network list on Element and other clients.
config.yamlyarn addbot to get a authorisation link.#_discord_guildid_channelid
Manage Webhooks on the role added by the bot._matrix Webhook for each channel you'd like to enable this feature on.yarn startauth.botToken can be set with APPSERVICE_DISCORD_AUTH_BOT_TOKEN.You must get an authorization link from bridge owner. You must be a server admin or get help from server admin on Discord side.
!discord bridge ServerID ChannelID!discord unbridgeIn a vague order of what is coming up next
My Matrix ID: @Half-Shot:half-shot.uk
162 followers · starred Aug 2020
98 followers · starred Aug 2023
228 followers · starred Jul 2018
210 followers · starred Jul 2021