N8n Connection Lost after close the login OS session

I use this command to start the n8n docker version (as in the documentation):
sudo docker run -it --rm --name n8n -p 5678:5678 -v ~/.n8n:/home/node/.n8n n8nio/n8n

After I closed the linux login session or after a period of time, UI shows connection lost.


Is there another command that can start the n8n docker in the background?



Hi @anderson.wong ,

to run the container in detached (background) mode, just try to add parameter -d to your call like so:

sudo docker run -d -it --rm --name n8n -p 5678:5678 -v ~/.n8n:/home/node/.n8n n8nio/n8n

I hope that helps. :slight_smile:


1 Like

Great, it works. Thank you very much.

You’re welcome! :slight_smile:

1 Like

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