Command-line interface only
The instructions below use the command-line interface (CLI).
This section provides an example on how to claim your gateway. You can update the example with your tenant ID and cluster ID by providing your values below.
Prerequisites
- An user account in The Things Industries Cloud or a The Things Stack Enterprise cluster.
- EUI of the gateway that you wish to claim.
- The Claim Authentication Code for the gateway (shared out of band by the current gateway owner).
- The Current CUPS Key used by the gateway (for LoRa Basics™ Station only).
General
For the commands below, the --target-gateway-id
field is optional. If left blank, the server will attempt to use eui-<gateway-id>
as the gateway ID. If a gateway already exists with either Gateway ID values, claiming will fail.
If the gateway has been successfully claimed, so you can return to the Console and you will see it in your list of gateways.
Once a gateway is claimed, it needs to restarted for the new changes to take effect.
Claim a Gateway (LoRa Basics Station)
If the gateway is a LoRa Basics™ Station gateway and has a CUPS server configured to a The Things Industries Cloud tenant, then you must additionally set up CUPS redirection. This means that when the newly claimed gateway connects to the CUPS server, the server will update the CUPS endpoint and credentials to the ones of the new owner.
The additional fields that need to be set are
-
--target-cups-uri
: The URI of the CUPS server once the gateway is claimed. For The Things Industries Cloud, this would be:https://..cloud.thethings.industries:443
-
--current-gateway-key
: The API Key that is currently used by the gateway currently to connect to the CUPS Server.
Replace <gateway-id>
with the Gateway ID of the gateway that you created in prerequisites, and run the following command in the CLI:
ttn-lw-cli gateways claim <gateway-eui> --authentication-code <claim-authentication-code> --user-id <user-id> --target-gateway-id [target-gateway-id] --target-cups-uri <target-cups-uri> --current-gateway-key <current-cups-key>
Claim a Gateway (non LoRa Basics Station)
Replace <gateway-id>
with the Gateway ID of the gateway that you created in prerequisites, and run the following command in the CLI:
ttn-lw-cli gateways claim <gateway-eui> --authentication-code <claim-authentication-code> --user-id <user-id> --target-gateway-id [target-gateway-id]