External Cloud Server + Dynamic IP + Downlink

Hi!!! I have all the instances of chirpstack (Bridge+NetworkServer+AppServer)running in RAK2245 and my own server running my dashboard on the cloud.
I have the uplinks working right with the HTTP integration pointing to my serverURL (own ip).
In downlink schedule, I can make the downlinks manually and through the MQTT publisher but IN THE SAME NETWORK, through the same IP… I want to send downlinks from my server to the GW considering that the instances run in different IPs and maybe the IP on the GW could change (its not a static ip).
I expect I explained correctly,
Thank you!
PS: I dont know if it is the right section to post, you could move it out

Hi @Francisco_Quarin,

What is exactly your question, about setting up the components in different IPs or about sending Downlinks?

Thankyou @pulidoj. I want to send downlinks but from another IP, not in the local network.

Right, did you try to do it through API instead of MQTT?.

You can send an API command to the Application Server IP and APP Server do the rest, independently of how your components are running.

Did you have a look at this?

Yes. I dont know how the API works exactly, do you have an example of post/get with HTTP?

Another question: what about the next situation: if the devices are for example in IP 190.X.X.X (dynamic)
And my own cloud server is in 186.X.X.X(static).
If the dynamic IP changes, how can I solve the downlinks?


Well, you can use some curl commands in python.

Here you are an example

The following is the structure of sending a downlink to a device to execute some command.
You have to fill certain parameters:

url = "http://YOUR_IP:YOUR_PORT/api/devices/" + YOUR_DEVICE_DEVEUI "/queue";
method = "POST";
headers = {
"Grpc-Metadata-Authorization": YOUR API TOKEN
payload = {
    "deviceQueueItem": {
        "confirmed": TRUE OR FALSE,
        "data": YOUR COMMAND IN BASE64,
        "fPort": YOUR DOWNLINK PORT

YOUR_IP is the IP of your Chirpstack Application Server.
YOUR_PORT is the port in your IP to access the Chirpstack Application Server
YOUR API TOKEN, you have to generate it in your User in Chirpstack in order to have access from outside to insert a command via API in your Chirpstack Application Server.

Related to your second question, your devices are NOT in any IP, they have no IP in LoRaWAN.
The one that will have an IP would be your LoRa Gateway.

If the IP of the LoRa Gateway is dynamic is not a problem, because you should have setup its LoRa Server parameter as 186.X.X.X.
Here it connects with the Chirpstack Gateway Bridge in UDP mode, so it does not matter with internal IP the gateway has.

1 Like

Related yo the 1st question: great! I understand!
Related ti the second one i Guess i wasnt very clear. I referred that My GW is connected to an IP from My internet provider but i this ip isnt static and i want to send downlinks from an external source(not in same network )
Is there in chirpstack simple solution for this?
Please if i’m not clear i coould reformule the Question.