Connect to a private back-end

If you’ve followed the installer, you’ve configured your gateway to connect to The Things Network. What if you want to connect your gateway to a private back-end, or to a specific router?

Alternatively you can download the private network installer and execute it like this:

export ACCOUNT_SERVER_DOMAIN=myaccount.domain
export ROUTER_MQTT_ADDRESS=mymqtt.domain:port | bash

Find the MQTT address of the bridge

First, you’ll need to figure out what’s the MQTT address and port of the bridge. Here are a few examples:

Change the bridge configuration

Open with vi the /var/config/lora/local_conf.json file:

$ vi /var/config/lora/local_conf.json

You should then edit those values:

  • server_address: Change this value to the MQTT address and port of the bridge, in a <address>:<port> format.

  • serv_gw_id: the ID of your gateway.

  • serv_gw_key: the key of your gateway.

Apply the configuration

Restart the packet forwarder to apply those changes:

$ /etc/init.d/ttn-packet-forwarder restart