Skip to content

Environment variables ​

Complete reference of the MeshSat Bridge environment variables.

Environment values are first-boot defaults. Once the bridge has started, the dashboard writes its own configuration to the database and that takes precedence, so changing a variable later only affects a setting the dashboard has never touched.

See the Configuration guide for the settings most people need.

Core ​

VariableDefaultDescription
MESHSAT_MODEcubeosSet to direct for standalone USB access
MESHSAT_PORT6050HTTP port for dashboard and API
MESHSAT_DB_PATH/cubeos/data/meshsat.dbSQLite database path. The standalone compose file sets this to /data/meshsat.db
MESHSAT_RETENTION_DAYS30Days of message and telemetry history to keep
MESHSAT_WEB_DIR""Override the embedded SPA path. Development only

Serial ports ​

auto scans USB by VID:PID table and protocol probe. Pin a port explicitly when two devices share a VID:PID, which happens with some ZigBee and Meshtastic boards.

VariableDefaultDescription
MESHSAT_MESHTASTIC_PORTautoMeshtastic radio
MESHSAT_IRIDIUM_PORTautoIridium 9603N (SBD)
MESHSAT_IMT_PORTautoRockBLOCK 9704 (IMT/JSPR)
MESHSAT_CELLULAR_PORTautoCellular modem
MESHSAT_ZIGBEE_PORTautoZigBee coordinator

Iridium 9603N GPIO ​

Only the SBD modem uses GPIO. The 9704 is USB and needs none of these.

VariableDefaultDescription
MESHSAT_GPIO_CHIPgpiochip4libgpiod chardev. Pi 5 is 4, Pi 4 is 0
MESHSAT_IRIDIUM_SLEEP_PIN0Sleep and wake GPIO, BCM numbering, 0 disables
MESHSAT_IRIDIUM_NETAV_PIN0Network Available input, high means satellite visible
MESHSAT_IRIDIUM_RI_PIN0Ring indicator input, active low
IRIDIUM_SBDIX_TIMEOUT90SBDIX timeout in seconds. Note the missing MESHSAT_ prefix

Routing and rate limiting ​

VariableDefaultDescription
MESHSAT_PAID_RATE_LIMIT60Minimum seconds between paid satellite sends
MESHSAT_MAX_HOPS8Maximum interfaces a message may traverse
MESHSAT_MESH_WATCHDOG_MIN0Minutes of channel silence before the Meshtastic serial port is reopened. 0 disables it, and the device-health mesh probe covers a stalled radio. A radio that still answers local requests is never reopened
MESHSAT_MESH_MTU100Largest text in bytes the delivery intents send on the mesh, range 1 to 237

SMS bundle counter ​

For prepaid SIMs. The counter tracks +CMGS results against the bundle and warns before it runs out.

VariableDefaultDescription
MESHSAT_SMS_BUNDLE_SIZE0Bundle size in segments, 0 disables the counter. First-boot default only. Record a top-up with PUT /api/cellular/bundle {"size":250}
MESHSAT_SMS_BUNDLE_WARN_AT50Segments left that turn the SMS chip amber, log a warning and send the reminder once per bundle
MESHSAT_SMS_ALERT_NUMBER""E.164 number that receives the top-up reminder. Also settable as alert_number on the bundle API

Out of band management ​

Authenticated single-message commands that ride any bearer, so a bridge that has lost its network can still be reached over SMS or APRS.

VariableDefaultDescription
MESHSAT_OOB_ENABLEDfalseAccept authenticated OOB commands. First-boot default, managed in the dashboard afterwards
MESHSAT_OOB_REPLY_BUDGET12OOB replies per peer per hour
MESHSAT_OOB_HOST_SOCKET/run/meshsat-oob/agent.sockHost agent socket, installed by scripts/install-oob-agent.sh
MESHSAT_OOB_REQUEST_TTL_MIN15Minutes a command this bridge sends stays valid. A peer that receives it later, for example a satellite message held until the kit had sky, refuses it
MESHSAT_OOB_EXPIRY_SKEW_S120Clock difference allowed when judging whether a received command has expired. Not judged at all while the kit's clock is not established

When the MQTT link to a Hub goes down, the bridge can keep reporting over a satellite or SMS bearer, sending compact position, health and SOS frames instead of the full telemetry stream.

VariableDefaultDescription
MESHSAT_HUB_SAT_FALLBACKtrueEnable the fallback uplink
MESHSAT_HUB_SMS_NUMBER""Hub inbound number for the SMS leg, empty disables it
MESHSAT_HUB_FALLBACK_AFTER_MIN5Minutes of broker loss before the first frame
MESHSAT_HUB_FALLBACK_POSITION_MIN15Minutes between position frames while down
MESHSAT_HUB_FALLBACK_HEALTH_MIN60Minutes between health frames while down
MESHSAT_HUB_FALLBACK_BEARERautoauto, satellite or sms. auto prefers satellite only when that gateway is connected and recently active
MESHSAT_IMT_MT_POLL_MIN10Minutes a RockBLOCK 9704 may go without a satellite session before the bridge sends a short health report over it, so messages waiting at Iridium come down. 0 turns it off

Hub relay ​

VariableDefaultDescription
MESHSAT_HUB_RELAY_ENABLEDtrueServe this bridge's API to the tenant's phones through the Hub WebSocket relay. The bridge is the TLS server of every tunnel, so the Hub carries ciphertext only
MESHSAT_HUB_API_URL""Hub HTTPS API base. Empty derives it from the MQTT URL

Compression sidecars ​

Both sidecars are optional. Without them SMAZ2 still works, since it is built in.

VariableDefaultDescription
MESHSAT_LLAMAZIP_ADDR""llama-zip gRPC sidecar address
MESHSAT_LLAMAZIP_TIMEOUT30RPC timeout in seconds
MESHSAT_MSVQSC_ADDR""MSVQ-SC gRPC sidecar address
MESHSAT_MSVQSC_TIMEOUT30RPC timeout in seconds
MESHSAT_MSVQSC_CODEBOOK""Codebook path, enables pure Go decode

Reticulum interfaces ​

VariableDefaultDescription
MESHSAT_TCP_LISTEN""TCP listen address for RNS interop, for example :4242
MESHSAT_TCP_CONNECT""Outbound TCP peer address for RNS interop
MESHSAT_ANNOUNCE_INTERVAL300Announce broadcast interval in seconds
MESHSAT_TIMESYNC_DISCOVERY_MIN10Minutes between time sync requests on an interface where no other bridge has answered. Where one has, the request goes every 30 s
MESHSAT_MQTT_RETICULUM_BROKER""MQTT broker for Reticulum packets
MESHSAT_MQTT_RETICULUM_PREFIXreticulum/meshsatMQTT topic prefix
MESHSAT_RNS_IFAC_NETNAME, MESHSAT_RNS_IFAC_NETKEY""Interface access code (network name and passphrase) on the TCP interface, as in rnsd
MESHSAT_RNS_PATH_TTL_HOURS168Path table lifetime, one week like upstream
MESHSAT_LXMF_ENABLEDtrueRun the LXMF endpoint
MESHSAT_LXMF_DISPLAY_NAMEMeshSat <hostname>Name announced with the LXMF destination
MESHSAT_LXMF_STAMP_COST0Stamp cost demanded of senders (0 = none)
MESHSAT_LXMF_MAX_OUTBOUND_STAMP_COST16Highest stamp cost the bridge will compute for a peer
MESHSAT_LXMF_ANNOUNCE_INTERVAL1800LXMF announce interval in seconds
MESHSAT_RNODE_PORT""Seeds an RNode interface once: auto, usb_serial:<sn>, a device path, tcp://host, ble://name. Settings > Routing owns it afterwards
MESHSAT_RNODE_PRESETeu-868us-915, eu-868, au-915, ism-433; MESHSAT_RNODE_FREQUENCY, _BANDWIDTH, _SF, _CR, _TXPOWER, _AIRTIME_SHORT, _AIRTIME_LONG override single fields
MESHSAT_RNODE_FLOW_CONTROL, MESHSAT_RNODE_ID_CALLSIGN, MESHSAT_RNODE_ID_INTERVALfalse, "", 600READY flow control and the station identification beacon
MESHSAT_UDP_LISTEN, MESHSAT_UDP_FORWARD, MESHSAT_UDP_DEVICE""Seeds a UDP interface once; a device derives both addresses from its broadcast address
MESHSAT_AUTO_IFACE_DEVICES, MESHSAT_AUTO_IFACE_GROUP"", reticulumSeeds an AutoInterface once on the named devices (never wlan0)
MESHSAT_KISS_PORT, MESHSAT_KISS_BAUD, MESHSAT_KISS_FLOW_CONTROL"", 115200, falseSeeds a KISS TNC interface once; tcp://host:8100 for a Mercury modem
MESHSAT_IMT_RNS_FRAMINGfalseCrossTalk's RNSI header on packets over Iridium IMT; the Routing settings override it live
MESHSAT_HF_RX_ENABLED, MESHSAT_HF_FREQ_HZfalse, 28124000Seeds the 10 m HF gateway once; receive borrows the RTL-SDR
MESHSAT_HF_RTLTCP_PORT, MESHSAT_HF_RTL_GAIN_DB6057, 20The HF gateway's own rtl_tcp
MESHSAT_HF_TX_CALLSIGN, MESHSAT_HF_TX_AUDIO_DEVICE, MESHSAT_HF_TX_CAT_PORT""HF transmit: locked without a callsign; ALSA device and CAT serial port of the radio

APRS and AX.25 ​

VariableDefaultDescription
MESHSAT_AX25_KISS_ADDR""KISS TNC address. The bundled Direwolf binds localhost:8001
MESHSAT_AX25_CALLSIGN""AX.25 source callsign, for example MESHSAT-1
MESHSAT_AX25_BITRATE1200The KISS modem's bit rate. Time sync requests on AX.25 are spaced to stay within 2% of it
MESHSAT_AIOC_CAPTURE94%Capture gain applied at every Direwolf start. Mixer scale, 94 % is -5.8 dB and 90 % is -9.6 dB. Lower it if Direwolf reports the audio input level as too high
MESHSAT_APRS_RX_WATCHDOG_MIN5Minutes without a decoded frame, after the channel was heard within two hours, before the recovery ladder runs. A deaf receiver scores 0 for failover. 0 disables

Key exchange ​

VariableDefaultDescription
MESHSAT_KEY_PASSPHRASE""Master key passphrase. Empty means device-derived
MESHSAT_BUNDLE_VERSIONv2Key bundle format. v2 carries a signing public key, v1 is legacy

See Security and key exchange for what the bundle format means in practice.