Forward LoRaWAN gateway data from ChirpStack to The Things Network simultaneously
A lightweight bridge that allows your LoRaWAN gateways to send data to two network servers at once:
- ChirpStack (your private server)
- The Things Network (public community network)
All configuration happens on the server - zero changes needed on your gateways.
Gateway (Basic Station)
↓ WebSocket
ChirpStack Gateway Bridge
↓ MQTT (JSON)
├→ ChirpStack ✅
└→ LoRaBridge → TTN ✅
git clone https://github.com/jdanielcmedina/LoRaBridge.git
cd LoRaBridge
docker-compose up -dgit clone https://github.com/jdanielcmedina/LoRaBridge.git
cd LoRaBridge
sudo ./install.sh- ChirpStack 4.x with Gateway Bridge (Basic Station)
- Gateway Bridge must use JSON marshaling (see below)
- Gateways registered in both ChirpStack and TTN
Edit your Gateway Bridge config and add:
[integration]
marshaler="json" # Must be "json", not "protobuf"Then restart Gateway Bridge container.
Copy env.example to .env and adjust if needed:
TTN_SERVER=eu1.cloud.thethings.network # Change region if needed
CHIRPSTACK_MQTT_HOST=mosquitto
MQTT_TOPIC=eu868/gateway/+/event/upDocker:
docker-compose up -d
docker-compose logs -fStandalone:
sudo systemctl start chirpstack-ttn-bridge
sudo journalctl -u chirpstack-ttn-bridge -fThe bridge automatically detects all gateways. Just:
- Add gateway to ChirpStack
- Add gateway to TTN (same EUI)
- Configure gateway to point to your server
- Done! Bridge auto-forwards
Expected output:
✓ Connected to ChirpStack MQTT
📡 New gateway detected: fcc23dfffe20f0a7
✓ [fcc23dfffe20f0a7] Sent to TTN - Freq: 868.1 MHz, RSSI: -91 dBm
No data in TTN?
- Check Gateway Bridge config has
marshaler="json" - Verify gateway is registered in TTN with same EUI
- Check logs:
docker-compose logs -forjournalctl -u chirpstack-ttn-bridge -f
Protobuf errors?
- Gateway Bridge config issue - ensure
marshaler="json"is in[integration]section - Restart Gateway Bridge after changing config
.
├── README.md # This file
├── Dockerfile # Docker image
├── docker-compose.yml # Docker deployment
├── chirpstack-ttn-bridge-docker.py # Docker version
├── chirpstack-ttn-bridge.py # Standalone version
├── chirpstack-ttn-bridge.service # Systemd service
├── install.sh # Installation script
├── gateway-bridge-config.toml # Example config
└── env.example # Environment template
MIT License - see LICENSE
- ChirpStack - Open-source LoRaWAN Network Server
- The Things Network - Global LoRaWAN network