This repository provides a Dockerized setup for running the Meshtastic-Matrix-Relay application, enabling message relays between Matrix and Meshtastic networks.
- Docker and Docker Compose installed
- A Matrix homeserver with:
- Homeserver URL
- Access token
- Bot user ID
- Meshtastic device or network configured and accessible
Clone this repository to your local machine:
git clone https://github.com/mcules/docker-mmrelay.git
cd docker-mmrelay
Follow the T2Bot Access Token Guide to:
- Register a bot account on your Matrix homeserver.
- Get the access token for the bot.
- Note down the bot's user ID and access token for later configuration.
Download the sample configuration file and save it as data/config.yaml
in the root of the repository:
wget https://github.com/geoffwhittington/meshtastic-matrix-relay/blob/main/sample_config.yaml -O data/config.yaml
Edit the data/config.yaml
file to match your environment. Below is an overview of the key sections:
matrix:
homeserver: https://matrix.domain.tld
access_token: YOUR_ACCESS_TOKEN
bot_user_id: "@meshtastic_bot:matrix.domain.tld"
- Replace
https://matrix.domain.tld
with your Matrix homeserver URL. - Add your bot’s access token and user ID.
matrix_rooms:
meshtastic_channel: 2
- id: "#meshtastic@myChannel:matrix.domain.tld"
- Define the Matrix rooms to relay messages to/from Meshtastic channels.
meshtastic:
connection_type: network
host: 192.168.1.2
broadcast_enabled: true
detection_sensor: true
plugin_response_delay: 3
relay_reactions: true
- Set
connection_type
tonetwork
,serial
, orble
based on your setup. - Configure
host
or other parameters (e.g.,serial_port
orble_address
) as needed.
Start the container with Docker Compose:
docker-compose up -d
Check the logs to ensure the application is running correctly:
docker logs meshtastic-relay
You can compare your configuration to the sample config file. Key differences in this setup:
- Matrix:
- Added homeserver URL, access token, and bot user ID.
- Matrix Rooms:
- Defined one room with a specific Meshtastic channel.
- Meshtastic:
- Set to
network
connection with a defined host IP. - Enabled broadcasting, sensor detection, and reaction relays.
- Set to
- For more details on the Meshtastic-Matrix-Relay application, refer to the original repository.
- To stop the container:
docker-compose down
- To update the application:
docker-compose pull docker-compose up -d
Feel free to open an issue or submit a pull request if you encounter problems or want to contribute.