Use domain in n8n

Hi dear friends;

I am windows user. (install n8n on my windows server).
I want use domain on n8n.
Is my process is correct?

In my domain panel (I have cpanel for my host) I set A record for my server ip:
example: n8n.mydomain.com set to my vps ip
then I try to use below address against localhost:5678
http://myip:5678 or http://n8n.mydomain.com

or maybe:
I should edit file in below address:
C:\Users\Administrator\AppData\Roaming\npm\node_modules\n8n\dist\config\index.js

my problem is that my subdomain address show nothing (This site can’t be reached) in all browsers except in my own windows server.

can anyone help me please?

Best regards;

First of all that will not be an easy task if you never did it before. For that reason did I create the following guide:
https://docs.n8n.io/#/server-setup
That includes everything you have to do and I strongly advise you to run everything with docker-compose like described.

Anyway if not, is your windows server web accessible? So does it have a fixed IP address? Because you have to use that fixed IP address in the A record. Also, will you need an SSL certificate and you have to set up a reverse proxy.

Btw. you should never make changes to any files in the node_modules folder! They will be overwritten the next time you update n8n. Everything in the config can be overwritten with environment variables.

dear @jan
unfortunately my server have limited resources.
I have VPS that is installed Windows server 2012 with fix IP and web access.
unfortunately I don’t have ssl certificate but now I search about it.
So can I setup it without docker?

Yes, you can for sure do it without Docker. However, I expect that if you have no prior experience setting things like that up, you will probably spend something between 5h and a few days on it.

1 Like

My time it doesn’t matter.
Could you please advise me to set it on n8n installed on my windows server please, step by step as you have time please?

All works I’ve done are:

  • my VPS has windows server 2012 OS and fixed IP.that I have installed n8n.
  • In my domain and shared host I set A record for a subdomain to my VPS IP.
    and then please let me know.

My main problem is how to set setting without removing Current ones

Sorry I have not the slightest idea about Windows server and how to set anything up with it because I never used it.

But it sounds like that what is missing is some kind of reverse proxy. So whatever you currently have which serves your existing website (like Apache or Nginx) you have to configure in a way to redirect the incoming traffic to the n8n.* subdomain to n8n.