N8N Setup with Docker


I have installed n8n on my server and I was trying to use a webhooks node with my website contact form. At first, I was unable to pass the data through webhook then I have gone through the documentation and found something called Start n8n with Tunnel. Later, I used the command to start the n8n with tunnel and tried to pass the Details of the form to slack and it was successful. And I am able to trigger the webhook from my contact form and the complete workflow is working as I desire. I am just concern about the warning given for using the tunnel command. It is said to use tunnel only for the testing purpose, not for the production. I have tried to figure out how to get my workflow executed without using the tunnel and I was going through some of the tutorial videos in youtube and I find in a video that the URL is " https://jan.users.n8n.cloud " and the tutorial is explained on this domain which is having SSL installed. I want to set up my subdomain with n8n same as it is set up in " https://jan.users.n8n.cloud ". And moreover, I don’t have any idea what is docker and how to setup.

Tunnel URL is Secure with SSL I want my subdomain to have this tunnel kind of setup.

Try to finish some kind of tutorial in the next hours.

It is probably not the best tutorial ever but it should hopefully help anyway. It can be found now in the docs here:

1 Like

Thanks @jan for making the documentation so soon.

Actually should have already been available at the time of the launch. So would not call it soon. But better late than never :wink:

Hello @jan I have done the setup and I have a small doubt where should I place the docker-compose.yml file and .env file. I have placed them in /root directory for now and when I run the command to start docker which is " sudo docker-compose up -d " I get this warnings and I am unable to access n8n in https://n8n.mydomainname.com

I have got it @jan I did a small mistake. But thanks for the documentation it was great help for me. Thanks again pal.

Really great to hear that it was helpful! Have fun with n8n!


Hi @jan, Sorry if this is dumb question, but I’m not able to set n8n with docker compose. I followed the steps here @ Server Setup | Docs

  1. Installed docker and docker compose in a VM that runs Ubuntu (no webserver, nothing else installed. It only runs Ubuntu + docker + docker compose)
  2. Created the yml and .env files as mentioned in the document. And executed docker-compose up command. This works fine. docker ps shows traeffik and n8n containers running.
  3. Created a A record for n8n that points to the IP address of the VM.

Now when I access https://n8n.mywebsite.com, I get nothing but
“This site can’t be reached”

I am sure I’m missing something that’s pretty obvious. Could you please help me? I love n8n and have been trying out few examples in my local desktop. Now I would like to host it in a server. Thanks for your help.


Hey @Bala

Welcome to the community!

If you have followed the steps mentioned in the documentaion then everything should work fine.

Can you check the .env file and the YAML file to make sure the information is correct and that there is no typo? Also, please check the IP address that you have used in the A record.

Let me know if you still face any issues.

Thank you!


@harshil1712 I have redone the whole thing (but this time as an admin user, and not as root). It worked. Not sure what I missed while installing as root. But the main thing is now it works. Thanks for your response :slight_smile:


@Bala I am glad it worked! I will investigate and try out creating an instance for a root user and see if we are missing any steps in the documentation. :slightly_smiling_face:

@harshil1712 The issue was not with the account was used for installation. I installed n8n as root user in a VM (DO droplet) created through a cloud infrastructure manager which blocked all ports by default for security. I had to open port 80 and 443 for n8n to be accessible. That was the issue. And I thought it was issue with the root user by coincidence. When I installed n8n as an admin user (non root), I did it directly in a DO droplet created directly in DO manually. So all ports were open by default. So n8n worked. So it was just a coincidence.