# Connection Lost - Local Docker Image

**URL:** <https://community.n8n.io/t/connection-lost-local-docker-image/27542>\
**Category:** Questions\
**Tags:** core, deployment\
**Created:** [June 28, 2023, 7:21am UTC](https://community.n8n.io/t/connection-lost-local-docker-image/27542 "2023-06-28T07:21:32Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![yarlanda](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/yarlanda/32/26702_2.png) [@yarlanda](https://community.n8n.io/u/yarlanda)\
**Post date:** [June 28, 2023, 7:21am UTC](https://community.n8n.io/t/connection-lost-local-docker-image/27542/1 "2023-06-28T07:21:32Z")

</div>

Hello,

I have tested n8n a while ago and now I have a use case for it.  
So what I did was essentially spin the docker image and get started.  
But I cannot seem to launch/execute any workflow

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/9/1/91d78904f532d68c089eeaed007041d5f360b307.png)

I do not have any firewall whatsoever blocking anything  
I do not have any errors in the log

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/e/8/e8dce23d09961b8e44ea015667653cf28450117b.png)

Am I missing something?

Cheers,  
Yanick

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [June 28, 2023, 7:30am UTC](https://community.n8n.io/t/connection-lost-local-docker-image/27542/2 "2023-06-28T07:30:27Z")

</div>

Hey @yarlanda,

Welcome to the community 🍰

Are you using a reverse proxy at all or are you connecting directly to container on port 5678?

---

<div class="post-metadata">

**Author:** ![yarlanda](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/yarlanda/32/26702_2.png) [@yarlanda](https://community.n8n.io/u/yarlanda)\
**Post date:** [June 28, 2023, 7:34am UTC](https://community.n8n.io/t/connection-lost-local-docker-image/27542/3 "2023-06-28T07:34:08Z")

</div>

Hello Jon

No am not using any reverse proxy.

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [June 28, 2023, 8:12am UTC](https://community.n8n.io/t/connection-lost-local-docker-image/27542/4 "2023-06-28T08:12:47Z")

</div>

Hey @yarlanda,

Does that mean it is a direct connection to the container on port 5678? Normally we only see that message when something is not configured correctly. Can you share how you started n8n and the options you set (removing anything sensitive)?

---

<div class="post-metadata">

**Author:** ![yarlanda](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/yarlanda/32/26702_2.png) [@yarlanda](https://community.n8n.io/u/yarlanda)\
**Post date:** [June 28, 2023, 9:13am UTC](https://community.n8n.io/t/connection-lost-local-docker-image/27542/5 "2023-06-28T09:13:57Z")

</div>

@Jon Yeah it’s a direct connection to the port 5678

I tried it with my WSL with same result  
I tried to spin it up on a Virtual Machine same thing

Here’s my docker compose:

```auto
services:
  n8n:
    image: n8nio/n8n
    ports:
      - "5678:5678"

```

Let me know if you any additional information

Cheers

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [June 28, 2023, 9:58am UTC](https://community.n8n.io/t/connection-lost-local-docker-image/27542/6 "2023-06-28T09:58:28Z")

</div>

Hey @yarlanda,

Nothing else I can think of that same setup seems to work ok for me 🤔 When it shows that message is there anything in the browser dev console?

---

<div class="post-metadata">

**Author:** ![yarlanda](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/yarlanda/32/26702_2.png) [@yarlanda](https://community.n8n.io/u/yarlanda)\
**Post date:** [June 28, 2023, 12:08pm UTC](https://community.n8n.io/t/connection-lost-local-docker-image/27542/7 "2023-06-28T12:08:57Z")

</div>

![image](https://europe1.discourse-cdn.com/n8n/original/3X/9/9/9929c61b241cd00ea33ad580ac8d0055bc345b07.png)  
Nothing on the console

Nothing on network as well  
All status code 200 or 304

---

<div class="post-metadata">

**Author:** ![yarlanda](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/yarlanda/32/26702_2.png) [@yarlanda](https://community.n8n.io/u/yarlanda)\
**Post date:** [June 28, 2023, 12:10pm UTC](https://community.n8n.io/t/connection-lost-local-docker-image/27542/8 "2023-06-28T12:10:52Z")

</div>

Just noticed this GET request is in pending  
 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/6/6/662d0290337e11889891c2bf6da2524893b74f1a.png)

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [June 28, 2023, 12:29pm UTC](https://community.n8n.io/t/connection-lost-local-docker-image/27542/9 "2023-06-28T12:29:41Z")

</div>

Hey @yarlanda,

Are you accessing n8n using `n8n.local` or the IP?

2 possible things you can try is…

Set `N8N_PUSH_BACKEND` to `websocket`

or

Set `VUE_APP_URL_BASE_API` to `http://n8n.local:5678` (if using the default port and the n8n.local address instead of the IP)

---

<div class="post-metadata">

**Author:** ![yarlanda](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/yarlanda/32/26702_2.png) [@yarlanda](https://community.n8n.io/u/yarlanda)\
**Post date:** [June 29, 2023, 4:42am UTC](https://community.n8n.io/t/connection-lost-local-docker-image/27542/10 "2023-06-29T04:42:36Z")

</div>

At first I was using an IP only  
Then I saw someone online having a similar issue and I tried to add some DNS record to access n8n.  
Then I realised they had n8n behind a proxy and their issue was entirely different

Ok I’ll try what both arguments

---

<div class="post-metadata">

**Author:** ![yarlanda](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/yarlanda/32/26702_2.png) [@yarlanda](https://community.n8n.io/u/yarlanda)\
**Post date:** [June 29, 2023, 4:56am UTC](https://community.n8n.io/t/connection-lost-local-docker-image/27542/11 "2023-06-29T04:56:06Z")

</div>

Hey @Jon

It works when I set the N8N\_PUSH\_BACKEND to websocket  
I see this is documented as well here:  
[Environment variables reference | n8n Docs](https://docs.n8n.io/hosting/environment-variables/environment-variables/#deployment)

But I cannot get around why it does not work with the default “sse” option.  
Is my system misconfigured or is there some requirements for SSE to work?  
Maybe it needs https connection?

By the way thanks for your help on this.

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [June 29, 2023, 6:31am UTC](https://community.n8n.io/t/connection-lost-local-docker-image/27542/12 "2023-06-29T06:31:17Z")

</div>

Hey @yarlanda,

That I am not sure about, for me SSE works but we are changing the default to websocket in v1 anyway.

I suspect it will be some local network setting but I am not sure what it is, could even be something in Docker.

---

<div class="post-metadata">

**Author:** ![yarlanda](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/yarlanda/32/26702_2.png) [@yarlanda](https://community.n8n.io/u/yarlanda)\
**Post date:** [June 29, 2023, 7:01am UTC](https://community.n8n.io/t/connection-lost-local-docker-image/27542/13 "2023-06-29T07:01:47Z")

</div>

Yeah you’re probably right.  
Anyways thanks for your help on this

Cheers

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [July 6, 2023, 7:01am UTC](https://community.n8n.io/t/connection-lost-local-docker-image/27542/14 "2023-07-06T07:01:50Z")

</div>

Closed on July 6, 2023, 7:01am UTC

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