// the find
TheThingsArchive/ttn
The Things Network Stack V2
This is TTN Stack V2, the old Go-based backend for The Things Network LoRaWAN infrastructure. It's the reference implementation of a LoRaWAN network server, broker, handler, and router — the full stack needed to run a private LoRaWAN network. V3 (The Things Stack) replaced it years ago.
The architecture is well-decomposed: router, broker, network server, and handler are separate components that communicate over gRPC, which makes it possible to understand what each layer does in the LoRaWAN stack. The test coverage is genuinely good — nearly every core package has a corresponding _test.go file. The MQTT client package is a clean, self-contained Go module that still has real-world utility for TTN v2-era applications. The CayenneLPP codec implementation is standalone and correct.
This is dead software — last commit was November 2021, and the entire V2 network was shut down by The Things Network in December 2021. You cannot connect to the public TTN infrastructure with this. If you want to run a private LoRaWAN network, you need The Things Stack (V3), which is a completely different codebase. The dev setup requires Redis, RabbitMQ, and a full certificate infrastructure just to get started locally — the barrier to experimentation is high for something that's no longer relevant. The Go module structure is fragmented across multiple go.mod files in subdirectories in a way that makes the dependency graph confusing.