AS_PUBLIC_SERVER config setting

Hello.

I have a doubt about AS_PUBLIC_SERVER in lora-app-server config.
Can you, briefly, explain what exactly is this used for?
The only reference I seem to find is that himself access to this, but I dont see how loraserver access to lora-app-server.

https://docs.loraserver.io/lora-app-server/install/config/

Application Server public host
When running LoRa App Server on a different host than LoRa Server, make sure to set the --as-public-host to the correct hostname:port on which LoRa Server can reach LoRa App Server. The port must be equal to the port as configured by the --bind / BIND configuration.

Yes, read that, but don’t really know how does it work. It is aTCP connection? Do I have to open that port in docker confighuration? Wich is its real utility?

I don’t seem to see anything releated to AS server in loraserver configuration.

I see 3 ports that don’t know really what they do.

loraserver: 8002, 8003
lora-app-server: 8001

When you connect to LoRa Server in LoRa App Server (by creating a network-server entity), LoRa App Server also creates a routing-profile in LoRa Server holding the value of AS_PUBLIC_SERVER.

When uplink data is received, LoRa Server will forward this data to AS_PUBLIC_SERVER. This port must be the same as the LoRa App Server --bind.

Example, you have two servers: as.example.com and ns.example.com. When you tell LoRa App Server (as.) to connect to LoRa Server (ns.) and you create a device. LoRa Server must on uplink be able to send this data to as.example.com. In this case this config value will have the value as.example.com:8001.

For a docker-compose.yml example see: https://docs.loraserver.io/install/docker/.

Yes, using your docker-compose example for testing purpose.

Thanks for the explanation.

Last question about this.

When running LoRa App Server on a different host than LoRa Server, make sure to set the --as-public-host to the correct hostname:port on which LoRa Server can reach LoRa App Server.

Have been reading the documentation and cannot find “–as-public-host” option anywhere.

That should have been --as-public-server :slight_smile:

Ok.

I think I saw another typo in MQTT Json packet if I find it again will open an issue.

Thanks.

Cheers, or create a pull request :wink: