A bidirectional bridge that connects Mattermost and Matrix, enabling real-time message synchronization between platforms.
- Bidirectional Sync: Messages, reactions, and edits sync automatically in both directions
- Real Users: Messages appear from actual users, not bots, with authentic names and avatars
- Rich Content: Full support for formatting, emoji reactions, threads, and file attachments
- Easy Setup: Simple configuration with automatic registration file generation
- Secure: Loop prevention, proper authentication, and namespace isolation
- Download from releases
- Upload via System Console → Plugins → Plugin Management
- Go to System Console → Plugins → Matrix Bridge
- Set your Matrix homeserver URL (e.g.,
https://matrix.example.com
) - Generate Application Service and Homeserver tokens
- Enable message synchronization
- Download the registration file from the admin console
- Add it to your Matrix homeserver's
app_service_config_files
- Restart your homeserver
Use slash commands to bridge channels:
/matrix test # Test Matrix connection and configuration
/matrix create "Room Name" # Create new Matrix room
/matrix map #room:matrix.example.com # Map to existing room
/matrix status # Check bridge health
- Create Mapping: Link a Mattermost channel to a Matrix room
- Enable Sharing: Configure the channel for shared channels in Channel Settings
- Start Chatting: Messages automatically sync between platforms with full user attribution
What Gets Synced:
- Messages (with formatting and mentions)
- Emoji reactions (4,400+ emoji support)
- Message edits and deletions
- User profiles with display names and avatars
- Reply threads
- Mattermost Server 10.7.1+
- Matrix homeserver with Application Service support (Synapse, Dendrite, etc.)
- Admin access to both platforms
Setting | Description |
---|---|
Matrix Server URL | Your Matrix homeserver URL |
Application Service Token | Generated token for Matrix authentication |
Homeserver Token | Generated token for webhook security |
Enable Message Sync | Toggle bidirectional synchronization |
# Build everything
make all
# Run tests
make test
# Deploy to local Mattermost
make deploy
To generate the emoji mappings in the server/emoji_mappings_generated.go
file:
make generate-emoji
For local development and testing, you can run a Matrix Synapse server using Docker Compose.
- Install and configure the Mattermost Matrix Bridge plugin first
- Generate the bridge registration file through the plugin configuration
- Copy the generated registration file to
docker/mattermost-bridge-registration.yaml
-
Start the services:
docker-compose up -d
-
Create an admin user:
docker exec -it mattermost-plugin-matrix-bridge-synapse-1 register_new_matrix_user -c /data/homeserver.yaml -u admin -p admin123 -a http://localhost:8008
-
The Matrix server will be available at
http://localhost:8888
- The Synapse server is configured to use PostgreSQL as the database
- Registration is enabled for development purposes
- App service configuration is loaded from
docker/mattermost-bridge-registration.yaml
- Room list publication is restricted to the bridge user only
docker-compose down
To completely reset (remove all data):
docker-compose down -v
Connection Issues:
- Verify Matrix server URL and tokens are correct
- Check that registration file is installed on Matrix homeserver
- Use
/matrix status
to diagnose problems
Sync Problems:
- Ensure channel is configured for shared channels
- Check that both platforms can reach each other
- Review plugin logs for detailed error information
- Support multiple Matrix instances
- Expose more Share Channels APIs in plugin API
- Improve support for private, encrypted channels
MIT License - see LICENSE file for details.