Docker error on Windows

Command
docker run -it --rm --name n8n -p 5678:5678 -v ~/.n8n:/home/node/.n8n n8nio/n8n n8n start --tunnel

docker: Error response from daemon: Ports are not available: listen tcp 0.0.0.0:5678: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
time=“2021-10-02T13:24:25+05:30” level=error msg=“error waiting for container: context canceled”

Is there a way that I can run n8n on a different port?

Hey @dstala,

You can change the first port for the host but it may not help, give it a go and see how you get on.

Worked! Thanks

host port set to 5676.
PS D:\git-repo> docker run -it --rm --name n8n -p 5676:5678 -v ~/.n8n:/home/node/.n8n n8nio/n8n n8n start --tunnel

2 Likes