# Error in OPC Node

**URL:** <https://forums.losant.com/t/error-in-opc-node/5326>\
**Category:** Help\
**Tags:** edge, workflow, opc-ua\
**Created:** [November 9, 2023, 5:38pm UTC](https://forums.losant.com/t/error-in-opc-node/5326 "2023-11-09T17:38:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sasikumar\_Rajendran](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@Sasikumar\_Rajendran](https://forums.losant.com/u/Sasikumar_Rajendran)\
**Post date:** [November 9, 2023, 5:38pm UTC](https://forums.losant.com/t/error-in-opc-node/5326/1 "2023-11-09T17:38:46Z")

</div>

Getting below error while trying to connect with opcua server  
**Error**  
EACCES: permission denied, mkdir ‘/.config/node-opcua-default-nodejs/PKI’

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [November 9, 2023, 5:51pm UTC](https://forums.losant.com/t/error-in-opc-node/5326/2 "2023-11-09T17:51:15Z")

</div>

Can you please provide a screenshot of your OPC UA configuration?

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [November 9, 2023, 6:28pm UTC](https://forums.losant.com/t/error-in-opc-node/5326/3 "2023-11-09T18:28:54Z")

</div>

Can you please also let me know what version of the GEA you are using? Thanks!

---

<div class="post-metadata">

**Author:** ![Sasikumar\_Rajendran](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@Sasikumar\_Rajendran](https://forums.losant.com/u/Sasikumar_Rajendran)\
**Post date:** [November 9, 2023, 8:52pm UTC](https://forums.losant.com/t/error-in-opc-node/5326/4 "2023-11-09T20:52:48Z")

</div>

yes sure. Below OPC UA Configuration and using the Version:[Agent v1.43.0]

 ![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/b/b544356afca2a07667c431f90e626f1eb59398ab.png)

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [November 9, 2023, 10:02pm UTC](https://forums.losant.com/t/error-in-opc-node/5326/5 "2023-11-09T22:02:57Z")

</div>

It appears as though the value of your `HOME` environment variable may have been changed to a location where the GEA does not have permission to write. By default, it is `/home/losant` and the GEA has permission to write to that location inside the container.

You can see the value of the `HOME` environment variable by running any edge workflow and checking the debug output. You can see the environment variables on the `agentEnvironment` payload field:

> **[Edge Workflows](https://docs.losant.com/workflows/edge-workflows/#payload)**
>
> Learn more about creating and configuring Losant Edge Workflows.

Can you please provide a screenshot of those values so we can confirm that is has been changed.

---

<div class="post-metadata">

**Author:** ![Sasikumar\_Rajendran](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@Sasikumar\_Rajendran](https://forums.losant.com/u/Sasikumar_Rajendran)\
**Post date:** [November 9, 2023, 10:29pm UTC](https://forums.losant.com/t/error-in-opc-node/5326/6 "2023-11-09T22:29:36Z")

</div>

This is the config details.

![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/4/42a4b88d68ecd6053492476a08a0ccfa5d826319.png)

---

<div class="post-metadata">

**Author:** ![Brandon\_Cannaday](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/brandon_cannaday/32/14_2.png) [@Brandon\_Cannaday](https://forums.losant.com/u/Brandon_Cannaday)\
**Post date:** [November 9, 2023, 10:44pm UTC](https://forums.losant.com/t/error-in-opc-node/5326/7 "2023-11-09T22:44:48Z")

</div>

It does indeed look like something is changing your `HOME` environment variable from the default `/home/losant` to just `/`. The underlying OPC UA library is attempting to generate certificate files and store them in a folder based on the `HOME` variable.

The easiest solution is to not set a `HOME` environment variable when running the container. If a `HOME` value must be specified by whatever container management software you’re using, then you’ll need to set it to `/home/losant`.

---

<div class="post-metadata">

**Author:** ![Sasikumar\_Rajendran](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@Sasikumar\_Rajendran](https://forums.losant.com/u/Sasikumar_Rajendran)\
**Post date:** [November 10, 2023, 7:21pm UTC](https://forums.losant.com/t/error-in-opc-node/5326/8 "2023-11-10T19:21:26Z")

</div>

Yes It does work. Thanks
