Say you have a spare Raspberry Pi, a few handhelds are already active in your local mesh, and you want a fixed node that runs around the clock, logs traffic and maybe forwards messages to MQTT or a dashboard. That is exactly what Meshtastic on Raspberry Pi is for. The short answer: you mount an SPI radio HAT such as the RAK6421 WisMesh Pi HAT, plug in a WisBlock LoRa module, install the meshtasticd package, enable SPI and the matching configuration file, and then set up the node through the web interface or the Meshtastic CLI.
The usual problems are elsewhere: a HAT that fits the header but carries no supported SPI radio, a missing region setting that keeps the transmitter silent, or a power supply that sags during transmit peaks.

What is meshtasticd (Meshtastic on Linux)?
meshtasticd is the native Linux build of the Meshtastic firmware. It shares its core with the firmware on nRF52 and ESP32 boards but runs as a regular Linux program. According to the Meshtastic documentation, it turns that computer into a full node that sends and receives messages, shares positions and communicates over LoRa or UDP. The radio connects either over SPI on the GPIO header or over USB, and all settings live in YAML files.
Do not confuse this with a different setup. You can plug a finished Meshtastic node into the Pi over USB and control it with the Meshtastic CLI or a Python script. In that case the Pi is only a client, and the node is still the separate device with its own firmware. With meshtasticd and a HAT, the Pi is the node: the operating system, the service and the radio module together form the device that shows up in the mesh.
That also tells you what the build is good for. Meshtastic lists always-on base stations, network gateways, MQTT bridges, home automation integration and remote monitoring as typical uses. If all you want is to send messages on the go, you do not need this stack.
Which Meshtastic Pi HAT do you need?
The Meshtastic hardware documentation states the ground rule plainly: only HATs that use an SPI radio work with meshtasticd. HATs that connect the radio over UART are out, and so are concentrator HATs built around the SX1302 or SX1303 chip, which are designed for LoRaWAN gateways.
The RAK6421 WisMesh Pi HAT is one of the options Meshtastic names itself. It sits on the standard 40-pin header and is designed for the Raspberry Pi 4 and Raspberry Pi 5. Instead of a soldered-on radio chip, it offers two WisBlock IO slots for LoRa modules. The compatible modules are the RAK13300 with a Semtech SX1262 for standard nodes and the RAK13302, a 1-watt module that pairs the SX1262 with a SKY66122 booster for fixed relays and rooftop sites.
On top of that you get four WisBlock sensor slots on the I²C bus for sensors or a GNSS module plus an I²C ADC for analog inputs. The HAT is HAT+ compliant and carries an EEPROM so the system can identify the board at boot. It draws power from the Pi’s 5 V rail, so it needs no separate supply connector.
Easy to miss: the HAT-only variant contains just the board and a screw set. You still need the Raspberry Pi, the LoRa module, an antenna, a power supply, an SD card and an enclosure. And whether a given sensor works depends on the installed Meshtastic version, not on whether the module physically fits the slot.
How to install Meshtastic on a Raspberry Pi
You have two routes for the software. For the RAK6421, RAKwireless recommends its own prepared image: flash it to an SD card, boot the Pi and connect through the web client. Alternatively, you install meshtasticd on a Raspberry Pi OS that you manage yourself, which makes sense when the Pi will run other services as well.
For the do-it-yourself route, use Raspberry Pi OS Lite; you do not need a desktop. Meshtastic publishes its packages through the openSUSE Build Service, currently for Bookworm (12) and Trixie (13). Pay attention to the architecture: the Raspbian packages are only meant for 32-bit Raspberry Pi OS, and for the 64-bit system the guide points you to the Debian packages. Add the matching repository and signing key as shown in the Meshtastic documentation, then install with sudo apt update and sudo apt install meshtasticd. For a node that should run reliably, stay on the beta channel rather than alpha or daily builds.
Next, the Pi has to enable the interfaces the HAT talks over. The LoRa module sits on the SPI bus, the sensors on the I²C bus. You turn on both with sudo raspi-config under Interface Options. For automatic detection of the HAT’s EEPROM, RAKwireless adds two lines to /boot/firmware/config.txt: dtparam=i2c_vc=on and dtoverlay=i2c0. After a reboot, the device files /dev/spidev0.0 and /dev/i2c-1 should exist.
One more note before you power up: attach the antenna to the LoRa module before the Pi boots. RAKwireless calls this out explicitly, since a transmitter running without a load can be damaged.
Meshtastic config.yaml: how do you enable the HAT radio?
The central file is /etc/meshtasticd/config.yaml. Out of the box, its radio section says Module: auto, while the actual pin mappings for known hardware ship as ready-made presets in /etc/meshtasticd/available.d. A preset only takes effect once you copy it into /etc/meshtasticd/config.d.
For the RAK6421, there is a preset for every combination of module and slot: lora-RAK6421-13300-slot1.yaml, lora-RAK6421-13300-slot2.yaml and the matching files for the RAK13302. With a RAK13300 in IO slot 1, the command is sudo cp /etc/meshtasticd/available.d/lora-RAK6421-13300-slot1.yaml /etc/meshtasticd/config.d/. The preset sets the chip type to SX1262, the IRQ, reset and busy pins, and the SPI device spidev0.0. There is also a preset labeled as the default for automatic configuration, which assumes a RAK13300 in slot 1. If your module sits elsewhere or is a RAK13302, copy the matching file explicitly. Keep only one LoRa preset in config.d so there is no doubt about which mapping applies.
In config.yaml itself, you uncomment the sections you want to use. For sensors, that is I2CDevice: /dev/i2c-1. A GNSS module in the large sensor slot A reaches meshtasticd over a serial port, which according to RAKwireless is /dev/ttyS0 on the Pi 4 and /dev/ttyAMA0 on the Pi 5. For the web interface, you also enable the Webserver section, covered next.
The service is managed by systemd. After every change, restart it with sudo systemctl restart meshtasticd, check its state with sudo systemctl status meshtasticd, and read the logs with journalctl -u meshtasticd -b. The log shows right away whether the radio initialized.
A last step people often overlook: a fresh node will not transmit until a region is set. In Germany and the rest of the EU, that is EU_868. Meshtastic uses the 869.4 to 869.65 MHz band for it, with a 10 percent duty cycle and a maximum of 27 dBm. You can set the region in the web interface or with the Meshtastic CLI using meshtastic --host localhost --set lora.region EU_868.

How to open the Meshtastic web interface on a Raspberry Pi
meshtasticd includes its own web server, which serves the Meshtastic web client. It is already prepared in config.yaml under Webserver; remove the comment marker in front of Port: 9443 and restart the service. By default, the web files live in /usr/share/meshtasticd/web.
Find the Pi’s IP address with hostname -I. From a browser on a computer in the same network, open https://<Pi-IP>:9443. On first start, meshtasticd generates its own self-signed certificate, so the browser shows a security warning that you accept once. In the web client, create an HTTP connection to <Pi-IP>:9443 and check the region, modem preset and role under the LoRa settings.
For scripts and automation, the Meshtastic CLI is often more convenient. It talks to the service over the network, by default on API port 4403, with meshtastic --host localhost --info directly on the Pi or with the Pi’s IP address from another machine. Keep both on the local network; anyone who can reach them can reconfigure the node.
Raspberry Pi or WisMesh Pocket: when is a Pi node worth it?
The WisMesh Pocket V2 is a ready-made Meshtastic handheld with a display, GNSS and a battery that the Meshtastic documentation lists at 3,200 mAh. Unbox it, set the region, pair it with your phone, done. For anything that travels with you, that is the obvious choice.
A Pi node pays off when the Linux computer itself has a job to do. Typical examples are an MQTT gateway that forwards mesh traffic to a broker, logging every received packet, dashboards in Node-RED or Grafana, a home automation integration, or a lab setup where you test configurations in a repeatable way.
To be fair, the Pi has downsides too. It uses far more power, depends on an SD card, needs operating system updates, and needs someone who notices when a service no longer starts after an update. It also does not add range: that comes from the radio module, the antenna and above all the location. That is why the store describes the RAK6421 as a solution for fixed Pi nodes, not for low-power battery devices.
How much power does a Raspberry Pi Meshtastic node use?
The manufacturer’s figures give you a solid estimate. Raspberry Pi lists a typical bare-board active current of 600 mA for the Pi 4 and 800 mA for the Pi 5, both at 5 V. That is roughly 3 and 4 watts, or about 72 to 96 watt-hours per day, before the HAT, radio and sensors.
For comparison, a 3,200 mAh battery at 3.7 V stores just under 12 watt-hours. A Pi 4 would drain it in about four hours. That is why handhelds and solar repeaters run on low-power microcontrollers, while a Pi node almost always runs from a wall supply. Running a Pi on solar takes a panel and storage sized for several overcast winter days.
Do not cut corners on the power supply. Raspberry Pi recommends a 3 A supply for the Pi 4 and the 27 W, 5 A supply for the Pi 5; on a 3 A supply, the Pi 5 limits its USB ports to 600 mA. As a 1-watt module, the RAK13302 draws noticeably more current while transmitting than the RAK13300, and it hangs off the same 5 V rail through the HAT. Unstable voltage tends to show up as sporadic radio errors or a corrupted file system rather than a clean crash.
What to consider for a Raspberry Pi Meshtastic base station
For a base station, the antenna location comes first. Put the Pi where power and network are, and the antenna as high and clear as possible. A coax cable runs between them, and at 868 MHz every meter of thin cable costs measurable signal. Keep the run as short as you can or use thicker, low-loss cable. A rooftop antenna also belongs inside the building’s lightning and surge protection.
Be modest with the device role. Meshtastic recommends the CLIENT role for most nodes; ROUTER is meant for genuinely exposed sites that meaningfully extend the network. With the RAK13302, keep in mind that the permitted transmit power depends on local radio regulations, and the module must not be run at its maximum possible output in Europe. Make sure the configured power plus antenna gain stays within the legal limit.
systemd takes care of continuous operation: sudo systemctl enable meshtasticd makes the service start after every reboot. Test it by unplugging the Pi once and checking that service, region and channels come back. Back up the contents of /etc/meshtasticd and export the node settings with the Meshtastic CLI, so an SD card failure costs you minutes rather than an evening. With the package install, updates arrive through apt; schedule them rather than letting them run unattended, and check the log afterward.
Where can you buy a Meshtastic Pi HAT?
Before you order, run through the criteria from this guide. The HAT needs an SPI radio path that meshtasticd supports; UART HATs and LoRaWAN concentrator HATs are out. It has to match your Pi model, which for the RAK6421 means a Raspberry Pi 4 or 5. For the radio you need a matching module, usually the RAK13300, and the stronger RAK13302 only for a real relay site and with the permitted transmit power in mind. Add an 868 MHz antenna with the right connector, a power supply with enough headroom, an SD card and an enclosure suited to the location. Also confirm that a ready-made preset for your module and slot combination exists in available.d, and that the sensors you plan to use are supported by the current Meshtastic version.
If you are gathering the parts for Meshtastic on Raspberry Pi, you can find the RAK6421 and other devices in our Meshtastic category.
Meshtastic on Raspberry Pi FAQ
Which Raspberry Pi is best for Meshtastic?
meshtasticd runs on many Linux computers, so the HAT is what decides it. The RAK6421 WisMesh Pi HAT is designed for the Raspberry Pi 4 and Raspberry Pi 5. The Pi 4 uses a bit less power, while the Pi 5 has more headroom if dashboards or databases will run alongside Meshtastic.
Do you need a monitor to run Meshtastic on a Raspberry Pi?
No. You set up the Pi over SSH and operate the node through the web interface on port 9443 or the Meshtastic CLI. A display is only needed if you want to read messages on the device itself.
Can Meshtastic start automatically on a Raspberry Pi?
Yes. meshtasticd installs as a systemd service, and sudo systemctl enable meshtasticd makes it start on every boot. To confirm it works, check sudo systemctl status meshtasticd after a reboot and read the log with journalctl -u meshtasticd -b.