Skip to main content
Install Meshtasticd on Raspberrypi for Off-Grid Communication
  1. Posts/

Install Meshtasticd on Raspberrypi for Off-Grid Communication

·1871 words·9 mins·
Raspberrypi Meshtastic Linux

Do you want to build your own off-grid communication network? This guide explains how to install meshtasticd. meshtasticd is the Linux program (often called a daemon because it runs in the background) for the Meshtastic project. We’ll show you how to set it up on devices like the Raspberry Pi and other Linux systems. By following these steps, you can create a working Meshtastic node using a LoRa radio. This node can chat with others without needing the internet or cell service.

This guide will cover:

  • Hardware and operating systems needed
  • Step-by-step installation instructions
  • How to configure the software for your hardware
  • Running meshtasticd automatically
  • Answers to common questions

What You Need: Hardware & OS for Meshtasticd
#

Before we dive into how to install meshtasticd, let’s make sure you have the right parts and software.

Hardware Requirements
#

You’ll need these key pieces:

  • Linux Device: A computer running Linux. A Raspberry Pi (models Zero 2, 3, 4, 400, or Pi 5 work well) is a popular choice.
  • LoRa Radio: A LoRa radio module that works with Meshtastic. This part sends and receives messages over long distances. Common types include:
    • USB devices like the MeshStick (uses a CH341 chip).
    • Raspberry Pi ‘HATs’ (Hardware Attached on Top). These connect using SPI (a communication method). Examples include Adafruit RFM9x, MeshAdv-Pi, and Elecrow Lora RFM95. Important: HATs that use UART communication are not supported by meshtasticd.
    • Warning: Some hardware has known issues. The Waveshare SX1262 LoRaWAN Hat might struggle with sending long messages or relaying messages for others. The Pine64 Pinedio has similar problems and isn’t recommended.
  • Antenna: You must connect an antenna to your LoRa radio before powering it on. This prevents damage to the radio.
  • Multiple USB Radios: Using multiple USB radios with the CH341 chip? Each one needs a unique serial number saved in its memory (called EEPROM). This helps Linux identify each radio correctly.

Here’s a quick summary of some compatible LoRa modules:

LoRa Module Connection Type Notes
MeshStick USB Uses CH341 chip
Adafruit RFM95/96/98 SPI Common type of Pi HAT
RAK4631 SPI Needs a separate baseboard
LILYGO TTGO T-Beam SPI Includes LoRa and GPS
Waveshare SX1262 SPI Known issues; might need extra steps

(Remember to check local rules for radio frequencies. For example, use 915 MHz in North America or 868 MHz in Europe.)

Operating System Compatibility
#

meshtasticd runs smoothly on several common Linux systems:

  • Raspberry Pi OS: Bookworm (version 12) is best for Raspberry Pi.
  • Debian: Bookworm (version 12) is supported. Newer versions might work but are considered experimental.
  • Ubuntu: Versions 24.10 (Oracular), 24.04 LTS (Noble), and 22.04 LTS (Jammy) are supported. Newer versions are experimental.
  • Fedora: Versions 41 and 40 are supported.
  • RedHat (EPEL): EPEL 9 and EPEL 10 (for systems like CentOS Stream, RHEL, AlmaLinux, Rocky Linux) are supported.
  • Docker: If you like using containers, Docker images are ready for different computer types (linux/amd64, linux/arm64, linux/arm/v7).

Installation Guide: How to Install Meshtasticd
#

Now, let’s install meshtasticd. The commands differ slightly depending on your Linux system.

  1. Add the Meshtastic Software Source: You need to tell your system where to download meshtasticd from.
    • For Debian or Raspberry Pi OS:
      # Add the source repository location
      echo 'deb http://download.opensuse.org/repositories/network:/Meshtastic:/beta/Debian_12/ /' | sudo tee /etc/apt/sources.list.d/network:Meshtastic:beta.list
      # Add the security key for the repository
      curl -fsSL https://download.opensuse.org/repositories/network:Meshtastic:beta/Debian_12/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/network_Meshtastic_beta.gpg > /dev/null
      
    • For Ubuntu:
      # Install tool needed to add PPAs (Personal Package Archives)
      sudo apt install software-properties-common
      # Add the Meshtastic PPA
      sudo add-apt-repository ppa:meshtastic/beta
      
    • For Fedora or RedHat (EPEL):
      # Enable the CRB repository (needed for EPEL on some systems)
      sudo dnf config-manager --set-enabled crb
      # Install the EPEL repository release package
      sudo dnf install epel-release
      # Enable the Meshtastic COPR repository
      sudo dnf copr enable @meshtastic/beta
      
  2. Update Package List: Refresh your system’s list of available software.
    • For Debian, Raspberry Pi OS, or Ubuntu: sudo apt update
    • For Fedora or RedHat (EPEL): sudo dnf update
  3. Install meshtasticd: Now, install the main program.
    • For Debian, Raspberry Pi OS, or Ubuntu: sudo apt install meshtasticd
    • For Fedora or RedHat (EPEL): sudo dnf install meshtasticd

Using Docker Instead? If you prefer Docker, download the correct image:

docker pull meshtastic/meshtasticd:beta-debian
# Or, for a smaller image:
docker pull meshtastic/meshtasticd:beta-alpine

Configuring Meshtasticd: Setup for Your Hardware
#

After installing, you must configure meshtasticd to work with your specific hardware.

Enable Hardware Connections on Raspberry Pi
#

Your Raspberry Pi needs specific communication channels turned on. This allows it to talk to your LoRa radio or GPS module. You do this by editing the Pi’s main configuration file, usually located at /boot/firmware/config.txt (or /boot/config.txt on older systems).

Use a text editor with sudo privileges, like sudo nano /boot/firmware/config.txt.

  • For SPI (used by most LoRa HATs): Add these lines to enable the SPI interface:
    dtparam=spi=on
    dtoverlay=spi0-0cs
    
  • For I²C (used by some sensors/displays): Add this line if needed:
    dtparam=i2c_arm=on
    
  • For UART (often used by GPS modules): Add this line:
    enable_uart=1
    
    • If you have a Raspberry Pi 5, you also need to add:
      dtoverlay=uart0
      

Very Important: You must reboot your Raspberry Pi after saving changes to /boot/firmware/config.txt. The changes only take effect after a restart.

Set Up the config.yaml File
#

meshtasticd stores its main settings in a file named config.yaml, located at /etc/meshtasticd/config.yaml. You’ll need sudo rights to edit it (e.g., sudo nano /etc/meshtasticd/config.yaml).

  1. Choose a Hardware Preset: meshtasticd includes example settings for common hardware. These are found in /etc/meshtasticd/available.d/. Find the file that matches your LoRa radio (like lora-Adafruit-RFM9x-SPI0-CE0.yaml). Copy only this file to the active settings folder:
    # Example: Copy settings for Adafruit RFM9x using SPI0 CE0
    sudo cp /etc/meshtasticd/available.d/lora-Adafruit-RFM9x-SPI0-CE0.yaml /etc/meshtasticd/config.d/
    
    Make sure only one hardware preset file is inside /etc/meshtasticd/config.d/. Remove any others if needed.
  2. Edit the Main config.yaml: Open /etc/meshtasticd/config.yaml with your editor.
    • GPS Setup: If you have a GPS module connected via UART, find the GPS section. Remove the # symbol (uncomment) from the SerialPath: line. Set the correct port name:
      • Usually /dev/ttyS0 for older Pi models.
      • Usually /dev/ttyAMA0 for Raspberry Pi 5.
      GPS:
        SerialPath: /dev/ttyS0 # Or use /dev/ttyAMA0 for Pi 5
      
    • Web Server (Optional): Want a web page to check status? Find the Webserver section. Uncomment the Port: and RootPath: lines by removing the # at the beginning:
      Webserver:
        Port: 443 # Port for Webserver & Webservices
        RootPath: /usr/share/meshtasticd/web # Root Dir of WebServer
      
      (Note: Port 443 is standard for secure HTTPS, which needs extra setup. You might want to use a different port like 8080 for simpler HTTP access initially.)
    • LoRa Region: Double-check the LoRa region setting in the file. Make sure it matches the legal rules for your location.

YAML Formatting Warning: Be very careful when editing .yaml files! They use spaces (indentation) to understand the structure. Use spaces, not tabs, and make sure the indentation matches the existing lines exactly.

Running Meshtasticd as a Service
#

To make meshtasticd start automatically every time your device boots up, set it up as a background service using systemd. If you installed meshtasticd using the package manager steps earlier, this service is usually created and enabled for you automatically. These steps are mainly for reference or if you installed manually.

  1. Create Service File (if needed): Open a new file for the service definition: sudo nano /etc/systemd/system/meshtasticd.service
  2. Add Content: Paste the following configuration into the file:
    [Unit]
    Description=Meshtastic Daemon
    After=network.target
    
    [Service]
    ExecStart=/usr/sbin/meshtasticd # Check if this path is correct for your install
    Restart=always
    User=root
    Group=root
    Type=simple
    
    [Install]
    WantedBy=multi-user.target
    
  3. Reload systemd: Tell systemd to read the new file: sudo systemctl daemon-reload
  4. Enable on Boot: Make the service start automatically: sudo systemctl enable meshtasticd

Controlling the Meshtasticd Service
#

Use these commands to manage the service:

  • Start the service now: sudo systemctl start meshtasticd
  • Check if it’s running and see status/errors: sudo systemctl status meshtasticd
  • Stop the service: sudo systemctl stop meshtasticd
  • View live log messages: sudo journalctl -u meshtasticd -f (Press Ctrl+C to stop viewing)

Avahi Setup for Auto-Discovery (Optional)
#

Do you want the Meshtastic Android app to find your meshtasticd node on your network automatically? You can set up Avahi (a network discovery tool).

  1. Install Avahi: Use your package manager. For Debian/Ubuntu/Raspberry Pi OS: sudo apt install avahi-daemon
  2. Create Avahi Service File: Make a new file: sudo nano /etc/avahi/services/meshtastic.service
  3. Add Content: Paste this XML configuration:
    <?xml version="1.0" standalone="no"?>
    <!DOCTYPE service-group SYSTEM "avahi-service.dtd">
    <service-group>
        <name>Meshtastic</name>
        <service protocol="ipv4">
            <type>_meshtastic._tcp</type>
            <port>4403</port>
        </service>
    </service-group>
    
  4. Restart Avahi: Apply the changes: sudo systemctl restart avahi-daemon

Answering Your Questions (People Also Ask About Meshtasticd)
#

Here are answers to some common questions about running Meshtastic, especially using meshtasticd.

  • Can a Raspberry Pi Run Meshtastic? Absolutely! Raspberry Pi models like the Zero 2 W, 3, 4, 400, and 5 are excellent choices for running meshtasticd. Using Raspberry Pi OS (especially Bookworm) is recommended. Just ensure your LoRa HAT uses SPI (not UART) and you configure it correctly in /boot/firmware/config.txt and /etc/meshtasticd/.

  • What hardware do I need for meshtasticd? The basics are: a Linux computer (like a Pi), a compatible LoRa radio module (USB or SPI HAT), and a suitable antenna connected before power-on. You’ll also usually need administrator rights (using sudo) to install software and edit system configuration files.

  • Can I run meshtasticd on a Raspberry Pi Zero? The newer Raspberry Pi Zero 2 W is supported and generally works well. The original Pi Zero (1 W) might be too slow and is not recommended for the best experience.

  • Which operating systems work with meshtasticd? It’s designed for Linux. Supported systems include Raspberry Pi OS, Debian, Ubuntu, Fedora, and Linux distributions based on RedHat Enterprise Linux (like CentOS Stream, AlmaLinux, Rocky Linux) using the EPEL repository.

  • Is there a Docker image for meshtasticd? Yes. Official Docker images are provided. This offers a flexible way to run meshtasticd on various systems and computer architectures (amd64, arm64, arm/v7).

  • How do I turn on the web server in meshtasticd? You need to edit the configuration file: /etc/meshtasticd/config.yaml. Find the section starting with Webserver:. Remove the # symbol from the beginning of the Port: and RootPath: lines. You can change the Port: number if needed (e.g., to 8080). Save the file and restart the meshtasticd service (sudo systemctl restart meshtasticd).

Conclusion: Your Off-Grid Network Awaits
#

You have now learned how to install meshtasticd and set it up on your Linux device or Raspberry Pi. This gives you a key piece for building a powerful, independent communication network.

Using a Raspberry Pi with meshtasticd is a great way to create low-power, flexible Meshtastic nodes. These devices talk directly to each other. They form a ‘mesh’ network that doesn’t need the internet or cell towers. This is ideal for remote places, emergency communication backups, or simply exploring decentralized technology.

Next Steps & Helpful Tips
#

  • SD Card Choice: If your Pi node will run constantly (24/7), use a ‘high endurance’ SD card. These last longer with continuous writing.
  • Improve Range: Try different LoRa antennas. Placement also matters – higher up is often better.
  • Power Options: Consider reliable power. Power over Ethernet (PoE) or small solar panels can help you place nodes almost anywhere.
  • Weather Protection: If putting nodes outside, use waterproof cases to protect the electronics.
  • Join the Community: Visit the Meshtastic forums or online groups. You can learn more, ask questions, and share what you’ve built.