# OPCUA SERVER from a Docker. BadCommunicationError

**URL:** <https://discourse.nodered.org/t/opcua-server-from-a-docker-badcommunicationerror/82559>\
**Category:** General\
**Tags:** docker, opcua\
**Created:** [2 November 2023 22:09 UTC](https://discourse.nodered.org/t/opcua-server-from-a-docker-badcommunicationerror/82559 "2023-11-02T22:09:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ahmaad](https://avatars.discourse-cdn.com/v4/letter/a/5e9695/32.png) [@Ahmaad](https://discourse.nodered.org/u/Ahmaad)\
**Post date:** [2 November 2023 22:09 UTC](https://discourse.nodered.org/t/opcua-server-from-a-docker-badcommunicationerror/82559/1 "2023-11-02T22:09:21Z")

</div>

Hello, I installed docker desktop then I installed nodered.

I used the following from NodeRed for this:

```auto
    docker run -it -p 1880:1880 -v node_red_data:/data --name mynodered nodered/node-red

```

Now I want to set up OPCUA server. I installed the necessary pallets for this.

1. node-red-comtrib-opcua
2. node-red-contrib-opcua-server

And this is the Flow (from Examples)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/7/0793d67125ef624cbe309bf945ba98145a849847.jpeg)

Everything looks good, the structure is obviously being built!

so I try to connect to this OPCUA server using UA-Expert, but it doesn't work.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/2/32087490d9ed726b923e72ec00a47a905a88215a.png)

I used “localhost” for the IP address. Port remained the same "54845".  
For the IP address i also used "host.docker.internal" but unfortunately not successful either.  
I get this message all the time: BadCommunicationError

Is it correct that I use "localhost" as IP address? If not, what else should I use?

Thank you very much!  
Ahmad

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [3 November 2023 07:41 UTC](https://discourse.nodered.org/t/opcua-server-from-a-docker-badcommunicationerror/82559/2 "2023-11-03T07:41:40Z")

</div>

Do you have a good reason for using docker? If not then I suggest you don't. It can make life difficult as you are finding out.

---

<div class="post-metadata">

**Author:** ![Ahmaad](https://avatars.discourse-cdn.com/v4/letter/a/5e9695/32.png) [@Ahmaad](https://discourse.nodered.org/u/Ahmaad)\
**Post date:** [3 November 2023 09:37 UTC](https://discourse.nodered.org/t/opcua-server-from-a-docker-badcommunicationerror/82559/3 "2023-11-03T09:37:09Z")

</div>

Hi Colin,  
yes I do.  
This is my reason:

> [@Problem with Flow with OPCUA Server](https://discourse.nodered.org/t/problem-with-flow-with-opcua-server/82533):
>
> Hello everyone, I have a problem with building an OPC UA server. I have built a flow where I use an OPC UA server. Everything worked great. I recently checked again and then I see that nothing works anymore. Node-Red runs on a server. All necessary palettes are added. I then deleted my flows and added an example flow from the library and tried it out. Unfortunately, this example doesn't work either. (see image) I use UA-Expert to check the connection. Picture 1: The problem is t…

😅

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [2 January 2024 09:37 UTC](https://discourse.nodered.org/t/opcua-server-from-a-docker-badcommunicationerror/82559/4 "2024-01-02T09:37:20Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
