How to connect gateway OS gateway bridge to MQTT broker?

Hey all, I could really use some help.

For the last few days I have been trying to connect my Raspberry PI 3 (RAK 831) based gateway to the application server and network server that are running on my latop using the provided docker images. (I use the images with all their default configuration files). The Raspberry Pi is connected to my laptop through an ethernet cable (this is also where it gets its internet connection from).

Basically, my application and network server seem to be running fine on my laptop using docker, and the mosquitto broker should be running on I ran netstat -an as recommended on another forum I was reading to confirm this (image 1 below)

The packet forwarder part of the gateway OS also seems to be working as I am receiving packets from a nearby sensor which are being logged and published (image 2 below)

The problem however arises in connecting the chirpstack-gateway-bridge to the MQTT broker, in the configuration file I thought I had to put in:, but this does not seem to work. I figured this is probably due to the broker running on my laptop while the bridge runs on the Raspberry PI, so I tried pointing it to: (the port the Mosquitto Docker container is running on), but this gives a time out error (image 3)

edit: I tested connecting the gateway-bridge to tcp:// and this seemed to work just fine.

I have been stuck at this point for a while now and any help would be highly appreciated, thanks for your time.

Hi @lawko95,

Just to fix how it should work.

You have the Chirpstack Gateway Bridge installed in raspberry, so it should publish the messages where Network Server and Application Server can read, this is the broker in your laptop.
So your Gateway Bridge should be setup to yours laptop IP. is wrong.

You should check why Gateway Bridge cannot connect to your laptop IP:1883


I think it depends if the Docker container is publicly accessible, or only accessible from the Docker host. This depends on how the port mapping is setup.

Thank you @pulidoj and @brocaar for your replies! I managed to fix it this morning. The problem was twofold:

  1. The port of the docker container the MQTT broker was running was being forwarded to instead of to This was fixed in the VirtualBox settings of the virtual machine that the container runs on. After this the IP address that the gateway bridge had to connect to was: (The IP address of my laptop from the gateway’s point of view).
  2. My firewall was not allowing inbound traffic on port 1883. This was fixed by adding an inbound rule that allows for tcp connections on port 1883 to my firewall.