Change ports 8000 and 8001


#1

Hi @brocaar,
I was looking to find a way to change the port 8000 used by the lora-app-server to listen the loraserver.
And to change the port 8001 used by the loraserver to listen the lora-app-server.
I’ve got other apps on my machine, which used those ports.

I have got your sources and after a quick look, it seem that changing the ports will take some times.
i konw that in the config files you can change the ports but not for the listenner.

Thanks :slight_smile:


#2

To change the port for the listener, you need to change this section in the loraserver.toml file:

  # Network-server API
  #
  # This is the network-server API that is used by LoRa App Server or other
  # custom components interacting with LoRa Server.
  [network_server.api]
  # ip:port to bind the api server
  bind="0.0.0.0:8000"

The same applies for other bind config options in loraserver.toml and lora-app-server.toml. Please note that when adding the network-server in the LoRa App Server web-interface, the port number must match. E.g. when changing 0.0.0.0:8000 --> 0.0.0.0:9000, you must enter localhost:9000 for the network-server in the web-interface (given that both LoRa Server and LoRa App Server are running on the same machine).


#3

OK for the port 8000, but for the 8001 (internal api) on the side of the loraserver, there is no wy to change this port.

I can change it on the lora-app-server side but not for the loraserve. :confused:

Thanks


#4

You need to change the (lora-app-server.toml):

  # Public ip:port of the application-server API.
  #
  # This is used by LoRa Server to connect to LoRa App Server. When running
  # LoRa App Server on a different host than LoRa Server, make sure to set
  # this to the host:ip on which LoRa Server can reach LoRa App Server.
  # The port must be equal to the port configured by the 'bind' flag
  # above.
  public_host="localhost:8001"

to how LoRa Server can resolve the LoRa App Server API interface. E.g. when the LoRa App Server API is listening on 9001 you set this to localhost:9001. When associating the network-server (in the web-interface), LoRa App Server will create a routing profile with that host:port combination.


#5

Ok thanks, i’m just stupid i think…


#6

Hello!
I’m im the same boat, tried to changed ports like this:

loraserver.toml

[network_server.api]
bind=“0.0.0.0:9000”
[join_server.default]
server=“http://localhost:9003

lora-app-server.toml

[application_server.api]
bind=“0.0.0.0:9001”
public_host:“localhost:9001”
[application_server.external_api]
bind=“0.0.0.0:9080”
[join_server]
bind=“0.0.0.0:9003”

Also changed updated Netkwork Server port in the web app to 9000. But whet tried to see live packets, there is no such, but a message showing something like “unable to connect to websocket api”

There is another missing file where port config must be changed too?

Thanks!!


#7

Hi
Some test, changing only

[network_server.api]
bind=“0.0.0.0:9000”

And of course updating the network server port in the web app, behaves strange. Works partially! The node can join the server via OTAA, but the downlink responses for confirmed uplinks never sent nor enqueued.

Loraserver works very well with the default ports in loraserver.toml and lora-app-server.toml, but if something changed not.

I’m integrating loraserver with AWS greengrass core (that uses port 8000) so at this point i can’t make the two things work together.

Any help or light will be appreciated!


#8

@brocaar am I able to do the same with application_server_external_api bind: 0.0.0.0.8080. Can I change it to port 80?