The Things Network include command line tool called ttnctl. The following guide will help you setup the command line tool for the public network and private networks.
This guide will not explain how to use ttnctl for this, please head here. Before starting you should know that ttnctl can interact with any TTN/TTI server, it is only a matter of configuration. The standard configuration point to the European region server.
Create a file called .ttnctl.yml in your home directory and fill it with the following information:
Now ttnctl is configured to use your private network !
For windows user make sure to use the --config flag with the full path to the confifuration file
ttnctl.exe --config fullpath/config.yml
- Get the an access code https://<domain_id>.thethings.industries/users/authorize?client_id=ttnctl&redirect_uri=/oauth/callback/ttnctl&response_type=code
ttnctl user login [access_code]
You are now login on your private network ! You should now see a folder named /.ttnctl in your home directory with private files. Make sure this are protected.
The following steps aren't necessary if you don't plan on using the public network
Create a file called community.yml in /home/<user_name>/.ttnctl/ with the following (for other region use the respective region name instead of eu):
- Get the access code https://account.thethingsnetwork.org/users/authorize?client_id=ttnctl&redirect_uri=/oauth/callback/ttnctl&response_type=code
ttnctl --config /home/<user_name>/.ttnctl/community.yml user login [access_code]
Define an alias on ttnctl --config /home/<user_name>/.ttnctl/community.yml to go faster !
In other articles when no configuration is specified it refer to your private networks. If there is an ambiguity on which configuration to use it will specified in the command line provided in the guide.