Connect to a private back-end
Outdated: this section documents The Things Network V2, which is no longer maintained. See the documentation for The Things Stack V3, or browse the V2 docs index.
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
https://raw.githubusercontent.com/egourlao/multitech-installer/master/installer.sh | 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:
-
If you’ve set up the back-end yourself, using our private routing guide, the MQTT address will be, by default,
<machine IP>:1883. -
If you’re using a The Things Industries installation, your MQTT address will be
<routing services address>:1882.
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