Architecture guide
Running ChirpStack v4 on AWS: A Production Checklist
A private network server gives you full control of devices, keys and data. Here is the checklist we use to run ChirpStack v4 reliably on AWS.
By Faraz, Co-Founder, CTO & Head of R&D, MatrixAI · · 9 min read
The building blocks
A ChirpStack v4 deployment has five parts. Each is a separate process, which lets you scale or move them independently later.
- ChirpStack — the combined network and application server, with the web interface and API
- Gateway connectivity — ChirpStack Gateway Bridge for Semtech UDP or Basic Station gateways, or the ChirpStack MQTT Forwarder running on the gateway itself
- PostgreSQL — devices, applications, gateways and keys
- Redis — device sessions, de-duplication and short-lived state
- An MQTT broker such as Mosquitto — gateway traffic and application events
Choose the AWS region and instance
- Host close to your gateways and users. For UAE projects the AWS Middle East (UAE) region keeps latency low and helps with data-residency requirements.
- A single EC2 instance running all components is fine for a pilot. As the fleet grows, move PostgreSQL to Amazon RDS and Redis to ElastiCache so the database layer is managed and backed up.
- Use an Elastic IP or a stable DNS name so gateways never need reconfiguring.
Connect gateways securely
The legacy Semtech UDP packet forwarder (UDP port 1700) is simple but unencrypted and unauthenticated. For production, prefer Basic Station over TLS or the ChirpStack MQTT Forwarder connecting to your broker over TLS with per-gateway credentials.
- Security group: open only the ports you use — for example 8883 for MQTT over TLS, or 3001 for Basic Station — and restrict them to known gateway IPs where possible.
- Never expose the ChirpStack web interface port directly. Put it behind a reverse proxy with HTTPS, or restrict it to a VPN.
- Keep PostgreSQL and Redis on private subnets with no public access.
Configure the region
ChirpStack v4 can serve several regions from one instance. Enable only what you use. For UAE deployments that is usually EU868:
# chirpstack.toml
[network]
net_id = "000000"
enabled_regions = ["eu868"]The region file defines the channels, RX2 settings and duty-cycle behaviour. Review it rather than accepting defaults, especially if you plan to send many downlinks.
Get data out cleanly
Applications publish events to MQTT topics of the form application/APPLICATION_ID/device/DEV_EUI/event/up. Subscribe to these for dashboards, databases and BMS or CAFM integration, or use ChirpStack's HTTP, InfluxDB and other integrations.
Write payload decoders (codecs) in the device profile so events arrive as named, scaled values. Test them against real payloads before roll-out.
Back up and monitor
- Back up PostgreSQL daily (RDS snapshots or pg_dump to S3) and test a restore. The database holds your device keys.
- Take EBS snapshots of the instance and keep configuration files in version control.
- Enable ChirpStack's Prometheus metrics and alert on gateways not seen recently, uplink rates dropping and downlink errors.
- Alert on disk space, memory and broker connection counts with CloudWatch.
Upgrade safely
- Pin component versions rather than pulling the latest image automatically.
- Read the release notes, run the upgrade on a staging copy with a database snapshot, then upgrade production in a quiet window.
- Upgrade gateway connectivity components separately from ChirpStack itself.
Frequently asked questions
Can ChirpStack v4 run on a single server?
Yes. For a pilot or a small network, ChirpStack, PostgreSQL, Redis and the MQTT broker can share one instance. Split them out as the fleet grows.
Which gateway protocol should we use with ChirpStack?
For production, use Basic Station over TLS or the ChirpStack MQTT Forwarder over TLS. The Semtech UDP forwarder is unencrypted and should be limited to trusted networks.
Is a private network server better than a public LoRaWAN operator?
A private server gives you full control of devices, keys and data with no per-device fees, but you operate it. Public or managed services reduce operations work. The right choice depends on scale, data-residency needs and in-house skills.