Using TTI scripts

Regarding migration, if you’d rather test migration before executing it for all devices, it might be better that you use directly our migration tool (for LinuxmacOS and Windows).

The usage would be the following:

migrate --from-app-id <current app id> --from-access-key <current app access key> --to-discovery-server <domain_id>:1900 --to-account-server https://account.<domain_id> --to-app-id <new app id> --to-access-key <new app access key>

For example, if you’d like to import from an app called test-app on The Things Network to an app called production on your Enterprise network, this is a command you would execute:

migrate --from-app-id test-app --from-access-key ttn-v2-account.AccessKeyFromTheConsole --to-discovery-server <domain>:1900 --to-account-server https://account.<domain> --to-app-id production --to-access-key <id>-account.AccessKeyFromTheConsole



A few considerations before using this tool:

  • You’ll need to create the destination app on the Enterprise private network server before starting the migration.

  • You’ll need, both on the origin and on the destination app, an access key to the application. You can either use a pre-existing one or a new one, as long as it has the devices right. You can manage and create access keys for applications on the Console, by clicking on an application and scrolling to the Access Keys section at the bottom of the page.

  • When this tool is executed, it migrates all devices from TTN application to your Enterprise server application, and deletes them from the TTN application. Thus, if you’re planning to only test migration on a few devices for the moment, we recommend using it on an application that doesn’t have a lot of devices.