Skip to content

Easily set up and run Meshtastic-Matrix-Relay with Docker. This repository provides a ready-to-use Dockerized environment to enable message relays between Matrix and Meshtastic networks.

Notifications You must be signed in to change notification settings

mcules/docker-mmrelay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Meshtastic-Matrix-Relay with Docker

This repository provides a Dockerized setup for running the Meshtastic-Matrix-Relay application, enabling message relays between Matrix and Meshtastic networks.

Prerequisites

  • Docker and Docker Compose installed
  • A Matrix homeserver with:
    • Homeserver URL
    • Access token
    • Bot user ID
  • Meshtastic device or network configured and accessible

Getting Started

Step 1: Clone the Repository

Clone this repository to your local machine:

git clone https://github.com/mcules/docker-mmrelay.git
cd docker-mmrelay

Step 2: Register a Matrix Bot

Follow the T2Bot Access Token Guide to:

  1. Register a bot account on your Matrix homeserver.
  2. Get the access token for the bot.
  3. Note down the bot's user ID and access token for later configuration.

Step 3: Obtain the Sample 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 Configuration

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

matrix_rooms:
    meshtastic_channel: 2
  - id: "#meshtastic@myChannel:matrix.domain.tld"
  • Define the Matrix rooms to relay messages to/from Meshtastic channels.

Meshtastic Configuration

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 to network, serial, or ble based on your setup.
  • Configure host or other parameters (e.g., serial_port or ble_address) as needed.

Step 4: Start the Application

Start the container with Docker Compose:

docker-compose up -d

Step 5: Verify the Setup

Check the logs to ensure the application is running correctly:

docker logs meshtastic-relay

Configuration Changes

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.

Additional Information

  • 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.

About

Easily set up and run Meshtastic-Matrix-Relay with Docker. This repository provides a ready-to-use Dockerized environment to enable message relays between Matrix and Meshtastic networks.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published