# Online license activation/unactivation via CLI/gwcmd?

**URL:** <https://forum.inductiveautomation.com/t/online-license-activation-unactivation-via-cli-gwcmd/71412>\
**Category:** Ignition\
**Tags:** license, sdk, ignition81, scripting\
**Created:** [March 21, 2023, 8:50pm UTC](https://forum.inductiveautomation.com/t/online-license-activation-unactivation-via-cli-gwcmd/71412 "2023-03-21T20:50:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mboroden](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@mboroden](https://forum.inductiveautomation.com/u/mboroden)\
**Post date:** [March 21, 2023, 8:50pm UTC](https://forum.inductiveautomation.com/t/online-license-activation-unactivation-via-cli-gwcmd/71412/1 "2023-03-21T20:50:30Z")

</div>

Is there a good way to finish the activation of a license from the CLI? I see that `gwcmd -a` will generate the `activation_message.txt`, but nothing about actually submitting it to the licensing endpoint of `api.inductiveautomation.com`. We were thinking to do a POST with the `activation_message.txt` as a payload and hope to get back the `license.ipl` that we can apply with `gwcmd -w`.

Thoughts? Or suggested format for the POST request?

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [March 21, 2023, 8:55pm UTC](https://forum.inductiveautomation.com/t/online-license-activation-unactivation-via-cli-gwcmd/71412/2 "2023-03-21T20:55:42Z")

</div>

Welcome!

What's the intended purpose of fully scripted?

For a headless server, I simply fire up Chrome etc on a remote session and use a browser to apply the license, assuming the server (gateway) has internet access.

If it does not, then I also use a remote session to do the offline activation process.

Once a license is applied there is no need to go through the process, unless moving servers, bolting on a new module, or if the server infrastructure has a catastrophic failure.

---

<div class="post-metadata">

**Author:** ![mboroden](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@mboroden](https://forum.inductiveautomation.com/u/mboroden)\
**Post date:** [March 21, 2023, 9:00pm UTC](https://forum.inductiveautomation.com/t/online-license-activation-unactivation-via-cli-gwcmd/71412/3 "2023-03-21T21:00:37Z")

</div>

Thanks for the quick reply!

What you described is our current process. However we have 60-100+ ignition servers per site so we are heavily automating the deployment, upgrade, and config processes. The licensing is really the only piece we have been unable to automate so far.

Additionally, we're considering dockerization of our ignition deployments, and this would require a license unactivation and then reactivation every time the container version changes (such as when we update to a newer version of ignition). This gets unwieldy the more we scale.

I also admit I've forgotten to go through the manual unactivation process upon destroying some of our servers via terraform, and therefore had to request a license refresh too many times 🙂 , so the automation would for my forgetfulness as well.

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [March 21, 2023, 9:06pm UTC](https://forum.inductiveautomation.com/t/online-license-activation-unactivation-via-cli-gwcmd/71412/4 "2023-03-21T21:06:51Z")

</div>

Well, do you have EAM with that many gateways?

There is this feature:

[https://docs.inductiveautomation.com/display/DOC81/License+Management](https://docs.inductiveautomation.com/display/DOC81/License+Management)

There are also _Leased Licenses_, designed for Docker, if you do go that route.

[https://docs.inductiveautomation.com/display/DOC81/Licensing+and+Activation](https://docs.inductiveautomation.com/display/DOC81/Licensing+and+Activation)

Sorry, I'm not directly answering your original question, just throwing out some food for thought.

---

<div class="post-metadata">

**Author:** ![mboroden](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@mboroden](https://forum.inductiveautomation.com/u/mboroden)\
**Post date:** [March 21, 2023, 9:14pm UTC](https://forum.inductiveautomation.com/t/online-license-activation-unactivation-via-cli-gwcmd/71412/5 "2023-03-21T21:14:19Z")

</div>

We do not have EAM but will look into it. And thanks for leased licenses link. I appreciate any discussion! so thank you!

Still open for ideas on the POST request to the licensing endpoint for anyone else reading.
