ChirpStack NS. What ports to open?

I just installed ChirpStack on a R-PI to use the Network Server function.
As for now it is installed in my local network (home router) and has a local IP ( I was dealing with opening ports in the router to let the external gateways to see the NS from outside, and I was setting up ports 80 and 8080 to be able to access configuration (luCI) and Application Server, and my router wasn’t allowing me to NAT port 8080.
Then I realized that I don’t need to setup my system from outside, all I need is the external gateways to send UDP packets to my NS.
What ports do I need to NAT from outside to my local NS setup?

Thanks in advance!

Hi Edu_Gimeno,

First of all, did you install chirpstack gateway bridge? The command below shows how to check if it´s running on you system. The default port you have to open in yout firewall to receive external gateway data is UDP/1700 (as you can see in my netstat command).

root@iot-debian:~ # service chirpstack-gateway-bridge status
● chirpstack-gateway-bridge.service - ChirpStack Gateway Bridge
   Loaded: loaded (/lib/systemd/system/chirpstack-gateway-bridge.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2023-11-23 20:53:19 UTC; 2 months 12 days ago
 Main PID: 23720 (chirpstack-gate)
    Tasks: 10 (limit: 4718)
   Memory: 15.9M
   CGroup: /system.slice/chirpstack-gateway-bridge.service
           └─23720 /usr/bin/chirpstack-gateway-bridge
root@iot-debian:~ # netstat -tulpn | grep chirpstack
tcp        0      0  *               LISTEN      23544/chirpstack
udp6       0      0 :::1700                 :::*                                23720/chirpstack-ga

Let me know how everything works out for you!


Eduardo Bastos

Ok…First of all thank you for your detailed reply!
It looks like I don’t have CS-GW-Bridge installed…

root@chirpstack-4dc44e:~# service chirpstack-gateway-bridge status
Service "chirpstack-gateway-bridge" not found:

I do have ChirpStack listening on port 8080:

root@chirpstack-4dc44e:~# netstat -tulpn | grep chirpstack
tcp        0      0  *               LISTEN      1375/chirpstack

and I do have mosquito daemon listening for packets:

root@chirpstack-4dc44e:~# netstat -tanup | grep 1883
tcp        0      0  *               LISTEN      1461/mosquitto
tcp        0      0          ESTABLISHED 1375/chirpstack
tcp        0      0          ESTABLISHED 1375/chirpstack
tcp        0      0         ESTABLISHED 1461/mosquitto
tcp        0      0         ESTABLISHED 1461/mosquitto
tcp        0      0 :::1883                 :::*                    LISTEN      1461/mosquitto

I think I still can’t understand the role of the bridge…Does a gateway communicate to my NS thru UDP/1700 os thru MQTT? What’s does the bridge do in here?

Basically all I need is set up a basic GW so it can send LoRaWAN packets from a test device to my R-PI NS server. Initially my LoRAWAN gateway will be in my local wan (address 192.168.0.X forwaring to which is my NS) and later on it will be somewhere else pointing to my external WAN IP whan I manage to set up NAT on my router


Hi Edu_Gimeno,

Thanks for your kindly reply.

Your local gateway communicate with your local Chirpstack Gateway thru UDP/1700. From then on, the Chirpstack publish MQTT messages that are acessed by the Chirpstack LoraServer. However,
these messages can be accessed directly by you using the correct topic in your mosquitto client. You can see the Chirpstack architecture on the following link:

AFAIK, the easiest way to build a end-to-end LoRaWAN setup is as follows (note the internal auto-installed MQTT to connect the Bridge to the Server):

GW --UDP/1700-- ChirpStackBridge --MQTT-- ChirpStackServer

That´s my setup here. Please feel free to correct me if I am wrong. This archicteture is not so simple.


Eduardo Bastos

Ok my friend… To be honest with you I still don’t fully get it 100%. I had seen that layout several times before and I still don’t see the whole picture… And that’s probably what’s hindering my abilitiy to finish this setup
If I don’t see a proccess listening to port 1700 on my server it means I don’t have a gateway bridge process running right?
What would be the easiest way to install it? Luci web interce? Or CLI?
Sorry I was a Linux admin for many years but that was waaaay too many years ago :slight_smile:
Thanks in advance!

Hi Edu_Gimeno,

Please follow the instructions of the following link to install chirpstack-gateway-bridge on your system:

After that, check whether you have the process listening to udp/1700 port. If OK, configure your gateway to the IP address of your LoRa server and udp/1700 port.

That’s the way I have done for all my gateways (mainly heltec ones).

Do you have any configuration in your gateway? Would you mind sharing it?


Eduardo Bastos

:frowning: Im out of luck…
This setup doesn’t have APT installer so the recommended command:
sudo apt install chirpstack-gateway-bridge
doesn’t work on it
So I tried the “official” mathod to install on WRT which is LuCI, on its web server, but when I go to System-Software, after a usual “update”, I try to find package “chirpstack-gateway-bridge” but it states that

Manually install package

The package chirpstack-gateway-bridge is not available in any configured repository.

Any ideas?


You have to activate the chirpstack repository:

sudo apt-key adv --keyserver --recv-keys 1CE2AFD36DBCCA00

sudo echo "deb stable main" | sudo tee /etc/apt/sources.list.d/chirpstack_4.list
sudo apt update

And then:

sudo apt install chirpstack-gateway-bridge

The page below has pre-compiled binaries for different architectures:


Eduardo Bastos

:frowning: Thanks Eduardo, but I’m still 100% stuck.
This is a WRT distro and seems to lack both DEB and APT installers. Looks like it does work with ipkg/opkg packages directly.
Also it includes the web driven LuCi maintenance application, which does support the addition of an opkg source, but Im afraid the sources provided in the link you mentioned do not look related to this system.
Sorry I feel so outdated on this…
I know its very weird as the guide you pointed at is for Raspberry PI - ChirpStack OS gateway, which is exactly what I have, but I can’t execute any of those commands, all err out like they are made for a different distro of Linux…:frowning:


Would you mind sending a little topology (drawing) of your setup showing the functional rules of each box and their operating systems)? Maybe I have completely misunderstood what you are trying to achieve.


Eduardo Bastos

No worries Eduardo, I’m wasting a lot of your time, nothing to apologize for

My setup is extremely simple for now. All I have is a Raspberry PI 4 with ChirpStack OS installed from the SD images in their DOWNLOAD section. That’s it… I want this “box” to listen for loRaWan packets from any gateway I would configure later.

It’s not running yet but when the R-PI server is running I want to start with a Linovision G67 gateway, but that’s not even out of the box yet…


Im going to close this post… I got tired of this ChirpStack OS distro failing on me everytime so Im trying again from scratch using a clean Ubuntu install and then the instructions for docker install.
Will be back to a new post if anything fails…
Thanks everyone!

BTW just a final update on this. I started from scratch, I put an Ubuntu image in my SD, booted it in R-PI, followed all the install directions one by one, zero errors, this mkade a real good install with gateway-brige and all the needed components. I am now receiving LoraWAN packets from my device thru a gateway I added and decoding the info. Took me 1-2h to have it all working, I had put several days trying to get this working on ChirpStack OS Image…


Good to know, I have a basic setup working on my Rpi but all the instructions in the documentation are for command lines that don’t seem to work with the RPI Full download.
Which Ubuntu did you use 22.04 LTS or 23.10 or Core22?

I had to use command line instructions too, but they DID work perfectly and literally with no changes on a clean Ubuntu setup, unlike the directions I was having on the ChirpStack OS.
So yes I used the App Raspberry PI Imager, went to the “Other General Purpose OS”->Ubuntu and in my case I picked
Ubuntu 22.04.3 LTS
From then I logged in on the normal user and with SU as required I installed everything ChirpStack related.
I have had my CS NS service up and running non stop for the last month receiving UDP packets from a remote gateway that started in my house but it’s now on my friend’s house, usnig DynDNS and NAT in my router.
Let me know if I can be of any help

Good luck

I appreciate the response!

I was just setting up No-IP for DDNS last night.

I’m a pretty new user with Linux and I flashed Ubunutu Core 22 last night - literally spent hours trying trying to just get logged in. Coming from a Windows system, I could not get it working with OpenSSH built in.
Today I deleted all the SSH keys in Ubuntu One, Re-flashed UCore 22, and imported keys from Putty and I was able to get in and but I didn’t get very far with the whole “snap” and image creation. :man_facepalming:

I gave up and I’m flashing Ubuntu Server 22.04.04 LTS as I type this. And thought I would come back and see if you responded and you did! :rofl:

Hopefully this will go much smoother!

This topic was automatically closed after 90 days. New replies are no longer allowed.