Table of contents
- Bridges
- How every bridge works
- Settings for all bridges
- Telegram (mautrix)
- WhatsApp (mautrix)
- Signal (mautrix)
- Discord (mautrix)
- Twitter/X (mautrix)
- Google Messages (mautrix)
- IRC (matrix-appservice-irc)
- Heisenbridge (IRC bouncer)
- Discord (matrix-appservice-discord)
- matrix-hookshot
- Postmoogle (email)
- SMS (matrix-sms-bridge)
- Meshtastic relay
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
فارسی · Components · Home
Bridges
A bridge puts your chats from another network into Matrix rooms: you read and answer your Telegram or WhatsApp chats from Element, and the people on the other side see your messages coming from your account there.
How to add any of these: Components. The Bridge hub preset on the Homeserver step ticks Telegram, WhatsApp, Signal and Discord with encryption and Double Puppet.
How every bridge works
None of these needs a DNS record. After the deploy:
- In Element, start a chat with the bridge's bot, written below for each
one, e.g.
@telegrambot:example.org. Your base domain, notmatrix.. - Send
loginand do what the bot says. Each network logs in its own way: a QR code to scan with the phone app, a code sent by SMS, or cookies copied from the browser. - Your chats appear as rooms, with an invite for each. New chats show up as messages come in.
Send help to any bot for its commands. Logged out? Send login again.
A bridge can read everything it bridges, and its logins are stored on your server. Bridge only the accounts of people who agree to it.
Settings for all bridges
Appservice Double Puppet (Authentication): tick it with any bridge. Without it, what you write in the Telegram app shows in Matrix as written by someone else.
Bridge encryption (all bridges)
Lets the mautrix bridges join encrypted rooms, and makes the rooms they create encrypted. Messages are decrypted by the bridge on your server before they go to the other network (that's unavoidable), but stay encrypted between your apps and the server. Recommended. Doc
Bridge relay mode (all bridges)
Lets people who haven't logged in to a bridge still talk in a bridged group:
a logged-in member's account posts their messages, with their name in front.
In the room, that member sends !tg set-relay (with the bridge's prefix:
!wa, !signal, !discord…); !tg unset-relay stops it.
Doc
Telegram (mautrix)
Bot: @telegrambot:example.org
Settings: Telegram API ID and API hash. Get them once: sign in at
my.telegram.org with your phone number, open API
development tools, fill in any app name, and copy api_id and api_hash.
Log in: send login, then your phone number with the country code, then
the code Telegram sends you (and your 2-step password, if you have one). Your
groups and chats become rooms.
Doc ·
Login guide
WhatsApp (mautrix)
Bot: @whatsappbot:example.org · Settings: none.
Log in: send login qr and scan the code with WhatsApp on your phone:
Settings › Linked devices › Link a device. Recent chats appear in about a
minute.
Your phone has to come online now and then: WhatsApp unlinks the bridge if the phone stays off for 14 days. The bot warns you after 12. Doc · Login guide
Signal (mautrix)
Bot: @signalbot:example.org · Settings: none.
Log in: send login, and scan the QR code with Signal on your phone:
Settings › Linked devices › Link new device. Chats appear as messages
arrive; Signal never hands over old messages, so there's no history.
Doc ·
Login guide
Discord (mautrix)
The one to use for your own Discord account.
Bot: @discordbot:example.org · Settings: none.
Log in: send login qr and scan the code with the Discord phone app
(Settings › Scan QR Code). Direct messages appear first. For servers
("guilds"), send guilds status to list them and guilds bridge ID for
each one you want; add --entire to create all its rooms at once.
Doc ·
Login guide
Twitter/X (mautrix)
Bot: @twitterbot:example.org · Settings: none.
Log in: send login and paste the cookies from a browser signed in to
x.com, as the bot explains. Bridges direct messages.
Doc ·
Login guide
Google Messages (mautrix)
Your phone's SMS and RCS, through the Google Messages app.
Bot: @gmessagesbot:example.org · Settings: none.
Log in: send login and scan the QR code in Google Messages on your
phone: profile picture › Device pairing › QR code scanner. The phone has
to stay on and online; messages go through it.
Doc ·
Login guide
IRC (matrix-appservice-irc)
Bridges whole IRC networks: every channel becomes a room anyone on your server can join.
Bot: @irc_bot:example.org
Settings: IRC servers: one block per network. Change
irc.example.com to the network's address and name to its name; the rest
of the example works as it is. aliasTemplate makes #irc_linux:example.org
the room for #linux.
Use: join #irc_CHANNEL:example.org to join a channel. Send !help to
the bot for commands, e.g. !nick to pick your nickname.
Doc
Heisenbridge (IRC bouncer)
IRC for one person (or a few): each user connects to the networks they want with their own nickname, like a bouncer.
Bot: @heisenbridge:example.org · Settings: none.
Use: the first person on your server to message the bot becomes its
owner. Send help; addnetwork, addserver and open get you connected.
A demo video shows the basics.
Doc
Discord (matrix-appservice-discord)
A bot that connects Discord channels and Matrix rooms for a whole community, rather than your own account (for that, use Discord (mautrix)).
Settings: create an application at the Discord Developer Portal, add a bot to it, and copy the Client ID (General Information) and the Bot token (Bot › Reset Token).
Use: join #_discord_GUILDID_CHANNELID:example.org (the IDs from Discord
with Developer Mode on: right-click › Copy ID). Rooms made this way are
public.
Good to know: with Synapse 1.90 and later, this bridge only works with Synapse's old, less safe appservice login turned on. Add these lines under Advanced on Settings:
matrix_synapse_configuration_extension_yaml: |
use_appservice_legacy_authorization: true
matrix-hookshot
Posts into rooms from webhooks, GitHub, GitLab, JIRA and RSS feeds.
Bot: @hookshot:example.org · Settings: none.
Use: make a room, invite the bot, give it the Moderator power level,
and send !hookshot help. For example !hookshot feed https://…/rss follows
a feed, !hookshot webhook name gives you a URL to post to.
Doc ·
Hookshot docs
Postmoogle (email)
Turns a room into a mailbox: email sent to an address arrives in the room, and you can answer from Matrix.
Bot: @postmoogle:example.org
Settings: Bot password: made up for you.
DNS: to receive mail, an MX record for matrix.example.org pointing
at matrix.example.org; to send it without landing in spam, the SPF,
DMARC and DKIM TXT records the doc lists (the bot gives you the DKIM
one with !pm dkim). Ports 25 and 587 must be open.
Use: invite the bot to a room and send !pm mailbox NAME: mail to
NAME@matrix.example.org now lands there. !pm help lists the rest.
Doc
SMS (matrix-sms-bridge)
Sends and receives SMS through an Android phone running the android-sms-gateway-server app.
Settings: your default region (e.g. IR) and timezone (e.g.
Asia/Tehran), the phone app's gateway URL, username and
password. Only if the gateway's certificate is self-signed: the path of
its .p12 truststore file on your computer, and its password.
Use: see the user guide. Doc
Meshtastic relay
Connects Matrix rooms with Meshtastic LoRa radios, which talk to each other over kilometres without internet or mobile network. Handy when both are down.
Settings:
- Bot password: made up for you.
- Connection type:
tcpfor a radio on your network (Wi-Fi),serialfor one plugged into the server,blefor Bluetooth. - Meshtastic node host: the radio's address, for
tcp. - Rooms: which room goes with which radio channel; the example joins
#meshtastic:example.orgwith channel0.
Use: create the rooms, invite the bot to them, and messages flow both ways. More in the project's wiki. Doc

