# Module Installation on Linux via terminal

**URL:** <https://forum.inductiveautomation.com/t/module-installation-on-linux-via-terminal/16487>\
**Category:** Ignition\
**Created:** [January 5, 2018, 5:18pm UTC](https://forum.inductiveautomation.com/t/module-installation-on-linux-via-terminal/16487 "2018-01-05T17:18:25Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![tim.schultz](https://avatars.discourse-cdn.com/v4/letter/t/71e660/32.png) [@tim.schultz](https://forum.inductiveautomation.com/u/tim.schultz)\
**Post date:** [January 5, 2018, 5:18pm UTC](https://forum.inductiveautomation.com/t/module-installation-on-linux-via-terminal/16487/1 "2018-01-05T17:18:25Z")

</div>

Hello - I’m testing out using Ignition on Linux in AWS. I’ve had issues in the past uploading 3rd-party modules from my laptop to an Ignition gateway, and have only been successful by remoting in and uploading through localhost page with local files. I don’t know how to do that via terminal… any suggestions?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 5, 2018, 5:29pm UTC](https://forum.inductiveautomation.com/t/module-installation-on-linux-via-terminal/16487/2 "2018-01-05T17:29:46Z")

</div>

You can “install” a module by putting it into `/var/lib/ignition/user-lib/modules` and restarting the gateway service; so you could `wget` the files directly from our website or simply copy them from your local machine, then drop them into the appropriate directory.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 5, 2018, 8:11pm UTC](https://forum.inductiveautomation.com/t/module-installation-on-linux-via-terminal/16487/3 "2018-01-05T20:11:41Z")

</div>

You might also want to script the injection of your module certificate’s public key thumbprint. Something like so:

```auto
# Add Automation Professionals to the list of pre-approved certificates
sqlite3 ${tgt}/data/db/config.idb <<-cert-EOF
    Insert Into certificates (certificates_id, thumbprint, subjectname)
    Values (1, X'0C3A3D8E103AF9F790DECFEF717090C8DC9754E7', 'Automation Professionals, LLC');
cert-EOF

```

The above assumes the cert is the first third-party cert to be installed. Adjust the `certificates_id` value if that’s not true.

---

<div class="post-metadata">

**Author:** ![tim.schultz](https://avatars.discourse-cdn.com/v4/letter/t/71e660/32.png) [@tim.schultz](https://forum.inductiveautomation.com/u/tim.schultz)\
**Post date:** [January 9, 2018, 4:47pm UTC](https://forum.inductiveautomation.com/t/module-installation-on-linux-via-terminal/16487/4 "2018-01-09T16:47:46Z")

</div>

Good point on the certificate piece - I didn’t think about that.

I’ll admit to some more ignorance here - where do I obtain these certificates from? I don’t see this listed anywhere in the downloads sections.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 9, 2018, 5:49pm UTC](https://forum.inductiveautomation.com/t/module-installation-on-linux-via-terminal/16487/5 "2018-01-09T17:49:53Z")

</div>

> [@tim.schultz](#):
>
> where do I obtain these certificates from?

You purchase them. It's a code signing certificate. Mine is from [DigiCert](https://www.digicert.com/), fwiw.

---

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [January 9, 2018, 9:45pm UTC](https://forum.inductiveautomation.com/t/module-installation-on-linux-via-terminal/16487/6 "2018-01-09T21:45:14Z")

</div>

If you are installing a module from a third party, and are not compiling on your own, you do not need to buy a certificate. They will be signed as part of the module.

---

<div class="post-metadata">

**Author:** ![tim.schultz](https://avatars.discourse-cdn.com/v4/letter/t/71e660/32.png) [@tim.schultz](https://forum.inductiveautomation.com/u/tim.schultz)\
**Post date:** [January 9, 2018, 10:00pm UTC](https://forum.inductiveautomation.com/t/module-installation-on-linux-via-terminal/16487/7 "2018-01-09T22:00:01Z")

</div>

Thanks Kyle - that was my confusion. I thought Phil was referring to scripting the license acceptance/certificate installation piece.

FWIW, I was able to place the module into the directory /var/lib/ignition/user-lib/modules via wget, reboot the gateway via gwcmd, and then accept the license/certificate for the third party through the Module Configuration webpage. This was for the third-party AWS injector module; other modules may not require that step.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 9, 2018, 10:08pm UTC](https://forum.inductiveautomation.com/t/module-installation-on-linux-via-terminal/16487/8 "2018-01-09T22:08:06Z")

</div>

> [@tim.schultz](#):
>
> I thought Phil was referring to scripting the license acceptance/certificate installation piece.

I was. To see what you need for the script above, use sqlite3 or Ignition's advanced configuration interface to read out that thumbprint on a system where you've manually accepted the cert.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 9, 2018, 10:22pm UTC](https://forum.inductiveautomation.com/t/module-installation-on-linux-via-terminal/16487/9 "2018-01-09T22:22:20Z")

</div>

The sqlite3 cli renders the blob as raw text by default. Use this to read it out:

```auto
sqlite3 ${tgt}/data/db/config.idb 'select certificates_id, hex(thumbprint), subjectname from certificates;'

```

---

<div class="post-metadata">

**Author:** ![wdougmiller](https://avatars.discourse-cdn.com/v4/letter/w/a9a28c/32.png) [@wdougmiller](https://forum.inductiveautomation.com/u/wdougmiller)\
**Post date:** [December 17, 2021, 5:22pm UTC](https://forum.inductiveautomation.com/t/module-installation-on-linux-via-terminal/16487/10 "2021-12-17T17:22:40Z")

</div>

Thank you for the information provided in this post. I am curious if 3 years later there happens to be a native way in ignition to install modules unattended (we are looking to use Ansible to install Ignition) and accept the certificate? or is the sql insert still the only unattended method? (I admit to a lot of ignorance here with sql)

Thanks in advance for your input!

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [December 17, 2021, 5:34pm UTC](https://forum.inductiveautomation.com/t/module-installation-on-linux-via-terminal/16487/11 "2021-12-17T17:34:18Z")

</div>

Nothing has really changed first-party, though we’re hoping to make some changes for this kind of use case in 8.2.

If you’re looking at automatic system orchestration, you might get some utility out of Kevin Collins’ Ignition images:  
[https://hub.docker.com/r/kcollins/ignition](https://hub.docker.com/r/kcollins/ignition)

---

<div class="post-metadata">

**Author:** ![Kevin.Collins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.collins/32/13497_2.png) [@Kevin.Collins](https://forum.inductiveautomation.com/u/Kevin.Collins)\
**Post date:** [December 17, 2021, 8:05pm UTC](https://forum.inductiveautomation.com/t/module-installation-on-linux-via-terminal/16487/12 "2021-12-17T20:05:11Z")

</div>

… and more specifically [register-modules.sh](https://github.com/thirdgen88/ignition-docker/blob/master/8.1/register-modules.sh) which I split out from the main entry point earlier this year. This script looks at a separate path for additional modules (currently hard-coded as `/modules`) and performs:

1. sym-linking into place within the Ignition `user-lib/modules` folder.
2. retrieval of the embedded license for a given module and inserting the appropriate record into the `EULAS` table.
3. retrieval of the embedded certificate for a given module and inserting the appropriate record into the `CERTIFICATES` table.

**Note:** you will need to have `IGNITION_INSTALL_LOCATION` set as an environment variable if you’re using the script on its own. It should point to the root of the Ignition installation.

---

<div class="post-metadata">

**Author:** ![wdougmiller](https://avatars.discourse-cdn.com/v4/letter/w/a9a28c/32.png) [@wdougmiller](https://forum.inductiveautomation.com/u/wdougmiller)\
**Post date:** [December 18, 2021, 6:45pm UTC](https://forum.inductiveautomation.com/t/module-installation-on-linux-via-terminal/16487/13 "2021-12-18T18:45:15Z")

</div>

Is this usable in a standard install? Mainly looking for a way to automate the installation of MQTT-Transmission, but there could be other modules needed later.

---

<div class="post-metadata">

**Author:** ![Kevin.Collins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.collins/32/13497_2.png) [@Kevin.Collins](https://forum.inductiveautomation.com/u/Kevin.Collins)\
**Post date:** [December 21, 2021, 3:32pm UTC](https://forum.inductiveautomation.com/t/module-installation-on-linux-via-terminal/16487/14 "2021-12-21T15:32:23Z")

</div>

> [@wdougmiller](#):
>
> Is this usable in a standard install?

Yes, with how this script is setup, you can use it stand-alone without much trouble. I've got "compile my various Ansible efforts against Ignition over the past few years into something useful and public" on my holiday hacking list, so I may integrate this into that example..

---

<div class="post-metadata">

**Author:** ![wdougmiller](https://avatars.discourse-cdn.com/v4/letter/w/a9a28c/32.png) [@wdougmiller](https://forum.inductiveautomation.com/u/wdougmiller)\
**Post date:** [December 21, 2021, 8:07pm UTC](https://forum.inductiveautomation.com/t/module-installation-on-linux-via-terminal/16487/15 "2021-12-21T20:07:55Z")

</div>

Nice, I like your holiday hacking list! Think you will publish it to Ansible Galaxy?

---

<div class="post-metadata">

**Author:** ![Kevin.Collins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.collins/32/13497_2.png) [@Kevin.Collins](https://forum.inductiveautomation.com/u/Kevin.Collins)\
**Post date:** [December 21, 2021, 8:26pm UTC](https://forum.inductiveautomation.com/t/module-installation-on-linux-via-terminal/16487/16 "2021-12-21T20:26:37Z")

</div>

Yes, the thought is a public GH repo and GH Actions to push to Ansible Galaxy. 🕶
