mirror of
https://github.com/l5yth/potato-mesh.git
synced 2026-07-06 18:01:19 +02:00
1b934ee6f7
Adds an optional passive UDP transport (TRANSPORT=udp) that reads the node's "Mesh via UDP" LAN multicast instead of holding the radio's single API/serial slot, filters to the PRIMARY channel by channel-hash (fail-closed), decrypts with the default PSK, and enriches payloads to match the API-path packet shape so the collector receives identical records. Implemented as a MeshProtocol provider; 100% unit coverage on new modules; real-capture fixtures included (node IDs/GPS anonymized). See PR description for details. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
128 lines
4.5 KiB
Bash
128 lines
4.5 KiB
Bash
# Copyright © 2025-26 l5yth & contributors
|
|
# Licensed under the Apache License, Version 2.0 (see LICENSE)
|
|
#
|
|
# PotatoMesh Environment Configuration
|
|
# Copy this file to .env and customize for your setup
|
|
|
|
# =============================================================================
|
|
# REQUIRED SETTINGS
|
|
# =============================================================================
|
|
|
|
# Public domain name for this PotatoMesh instance (required for webapp)
|
|
# Provide a hostname (with optional port) that resolves to the web service.
|
|
# Example: mesh.example.org or mesh.example.org:41447
|
|
INSTANCE_DOMAIN="mesh.example.org"
|
|
|
|
# API authentication token (required for ingestor communication)
|
|
# Generate a secure token: openssl rand -hex 32
|
|
API_TOKEN="your-secure-api-token-here"
|
|
|
|
# Mesh radio connection target (required for ingestor)
|
|
# Common serial paths:
|
|
# - Linux: /dev/ttyACM0, /dev/ttyUSB0
|
|
# - macOS: /dev/cu.usbserial-*
|
|
# - Windows (WSL): /dev/ttyS*
|
|
# You may also provide an IP:PORT pair (e.g. 192.168.1.20:4403) or a
|
|
# Bluetooth address (e.g. ED:4D:9E:95:CF:60).
|
|
CONNECTION="/dev/ttyACM0"
|
|
|
|
# Mesh protocol to use (meshtastic or meshcore)
|
|
# Default: meshtastic
|
|
PROTOCOL="meshtastic"
|
|
|
|
# =============================================================================
|
|
# SITE CUSTOMIZATION
|
|
# =============================================================================
|
|
|
|
# Your mesh network name
|
|
SITE_NAME="My Meshtastic Network"
|
|
|
|
# Default Meshtastic channel
|
|
CHANNEL="#LongFast"
|
|
|
|
# Default frequency for your region
|
|
# Common frequencies: 868MHz (Europe), 915MHz (US), 433MHz (Worldwide)
|
|
FREQUENCY="915MHz"
|
|
|
|
# Map center coordinates (latitude, longitude)
|
|
# Berlin, Germany: 52.502889, 13.404194
|
|
# Denver, Colorado: 39.7392, -104.9903
|
|
# London, UK: 51.5074, -0.1278
|
|
MAP_CENTER="38.761944,-27.090833"
|
|
|
|
# Maximum distance to show nodes (kilometers)
|
|
MAX_DISTANCE=42
|
|
|
|
# =============================================================================
|
|
# OPTIONAL INTEGRATIONS
|
|
# =============================================================================
|
|
|
|
# Community chat link or Matrix room for your community (optional)
|
|
# Matrix aliases (e.g. #meshtastic-berlin:matrix.org) will be linked via matrix.to automatically.
|
|
CONTACT_LINK="#potatomesh:dod.ngo"
|
|
|
|
# Enable or disable PotatoMesh federation features (1=enabled, 0=disabled)
|
|
FEDERATION=1
|
|
|
|
# Hide public mesh messages from unauthenticated visitors (1=hidden, 0=public)
|
|
PRIVATE=0
|
|
|
|
|
|
# =============================================================================
|
|
# ADVANCED SETTINGS
|
|
# =============================================================================
|
|
|
|
# Debug mode (0=off, 1=on)
|
|
DEBUG=0
|
|
|
|
# Energy saving mode — sleep between ingestion cycles (0=off, 1=on)
|
|
ENERGY_SAVING=0
|
|
|
|
# Default map zoom override
|
|
# MAP_ZOOM=15
|
|
|
|
# Docker image architecture (linux-amd64, linux-arm64, linux-armv7)
|
|
POTATOMESH_IMAGE_ARCH="linux-amd64"
|
|
|
|
# Docker image tag (use "latest" for the newest release or pin to vX.Y)
|
|
POTATOMESH_IMAGE_TAG="latest"
|
|
|
|
# Docker Compose networking profile
|
|
# Leave unset for Linux hosts (default host networking).
|
|
# Set to "bridge" on Docker Desktop (macOS/Windows) if host networking
|
|
# is unavailable.
|
|
# COMPOSE_PROFILES="bridge"
|
|
|
|
# =============================================================================
|
|
# PASSIVE UDP TRANSPORT
|
|
# =============================================================================
|
|
# Ingest by passively listening to the node's "Mesh via UDP" LAN multicast
|
|
# instead of holding the radio's single API/serial slot. Enable it on the node
|
|
# first: `meshtastic --set network.enabled_protocols 1`. Requires host
|
|
# networking (multicast can't reach a bridged container). See the
|
|
# "Passive UDP transport" section of README.md.
|
|
|
|
# Transport: "api" (Meshtastic library over serial/TCP/BLE) or "udp" (passive).
|
|
# TRANSPORT=udp
|
|
|
|
# Ingest only channel 0. In UDP mode filtering is unconditional; this flag only
|
|
# affects the api/serial transport.
|
|
# PRIMARY_CHANNEL_ONLY=1
|
|
|
|
# Base64 primary-channel PSK (Meshtastic default key shown).
|
|
# PRIMARY_CHANNEL_KEY=AQ==
|
|
|
|
# Name of channel 0 — the preset name (MediumFast/LongFast/...) when the radio
|
|
# leaves the name blank, as shown by `meshtastic --info`. REQUIRED for UDP
|
|
# primary-only: it resolves the channel hash that separates the primary channel
|
|
# from a secondary channel sharing the default key. If unset, UDP mode drops ALL
|
|
# traffic (fail closed).
|
|
# PRIMARY_CHANNEL_NAME=MediumFast
|
|
|
|
# Host node id used for the ingestor heartbeat (UDP can't auto-detect "self").
|
|
# INGESTOR_NODE_ID=!xxxxxxxx
|
|
|
|
# Multicast group/port for "Mesh via UDP" (defaults shown).
|
|
# MESH_UDP_GROUP=224.0.0.69
|
|
# MESH_UDP_PORT=4403
|