DNS setup - Docker Compose

Hello, I am a neophyte.
I installed Ubuntu server 22.04 LTS on an old computer in my home network. I installed Docker Engine and Docker Compose. I got Portainer running. Now I am stuck at step 4 of the following guide:
https://docs.n8n.io/hosting/server-setups/docker-compose/

"
Add A record to route the subdomain accordingly:
Type: A
Name: n8n (or the desired subdomain)
IP address: <IP_OF_YOUR_SERVER>
"

I don’t understand if I have to create a file and put it in some folder or is there some other operation I’m missing.
Thank you in advance.

1 Like

Hi @JahKaio,
the setup you are going through is for hosting n8n on a public server with a public IP. Therefore you would need to configure an A Record in the DNS settings of your domain provider. In the next step 5 you will see this traefik configuration.

If you want to host n8n on your home server without access from the public internet, you can host it without traefik or https enabled. If you want to use a home server on your home network with public internet access you could also use a DynDns service like duckdns.

1 Like

First of all, thank you very much for your reply.
You guessed right and my intention is to expose my home server with duckdns. Duckdns only allows you to create subdomains, so if my deduction is correct I will create one for n8n on duckdns and go straight to step 5 skipping step 4. Correct me if I am wrong.

Another doubt I have is precisely where to create this docker-compose.yml file. Is any folder OK? Same doubt for point 6 for the .env file.

I also have a number of quick questions:
${DATA_FOLDER}, do I need to indicate the whole path?
${GENERIC_TIMEZONE}, what is the correct syntax?
${SSL_EMAIL}, will any mail be fine?

Thank you very much in advance for your time.

Yes you are right. Creating a duckdns subdomain is the equivalent of step 4.

Any folder will do, as long as you put all the files in the same folder. Docker compose will automatically pick up the .env file next to your docker-compose.yml.

Can’t hurt to give a full path :smile: but things like ~/n8n should also work.

In the .env sample file you see Europe/Berlin. On Ubuntu you can check cat /etc/timezone to see your timezone.

Yes any email should be fine. It’s used by letsencrypt to notify you about changes or errors to your generated ssl certificate.

Wow, thanks a lot. I’ll try it right away.