I am on day 2 of trying to get n8n to run on aws lightsail running
Ubuntu 18.04.5 LTS (GNU/Linux 5.4.0-1028-aws x86_64)
I have followed the set up document - yml file is unaltered
env is
DATA_FOLDER=/root/n8n/
DOMAIN_NAME=bttrr.com
SUBDOMAIN=n8n
N8N_BASIC_AUTH_USER=commissionly
The password to use for autentication - IMPORTANT ALWAYS CHANGE!
N8N_BASIC_AUTH_PASSWORD=***********
I have set a static ip of 18.134.173.12
I have added an A records for n8n.bttrr.com to 18.134.173.12 and @.bttrr.com
The domain bttrr.com is hosted on Ionos and has a subdomain n8n pointing to the AWS DNS servers
I have added a rule to the DNS zone on AWS for Https port 443 for TCP
I have checked Docker is running and giving the following on start up
If you do that you should see the output of the processes. Mainly traefik as it looks like the problem is related to it. It seems not to be able to create the SSL certificate with letsencrypt and so probably does also not serve n8n correctly.
Just to be 100% sure. Did you set the values in the .env file correctly?
...
# The top level domain to serve from
DOMAIN_NAME=bttrr.com
# The subdomain to serve from
SUBDOMAIN=n8n
...
Are you sure that you set up the DNS record correctly? If I do:
ping n8n.bttrr.com
it displays me:
PING n8n.bttrr.com (18.134.173.12) 56(84) bytes of data.
but never resolves. So it looks like the server with the IP 18.134.173.12 is probably not live. Meaning its value is probably not correct. And just that you are aware of it, if you are not already. Changing the DNS entry multiple times can cause problems as they get cached and updates can take up to 24h (if it was never set before it works directly as there can not be a cache value, but afterward the chance is high that it will still resolve to the old IP).
Interesting. For me the ping to 18.134.173.12 does still not work. Neither from my notebook nor from my webserver.
But it looks also like that the above only says that n8n.bttrr.com resolves to 18.134.173.12. Which it also does for me. So if that IP is correct, then all is good. But none of the above says that the IP can actually be reached.
Ping is disabled by lightsail - will this stop the install working?
It is not currently possible to enable ICMP (the protocol required for ping) through Lightsail Networking > Firewall settings. Ping is generally disabled for security purposes and our team didn’t prioritize implementing that feature in our initial release.
Usually, you can replace ping with an http status check URL for automated monitoring or trying ssh locally if you’re manually checking your configuration.
Honestly no idea if that would be a problem. The problem you are having right now is related to traefik/letsencrypt and not n8n. So would be worth checking in those communities if they have any idea why you get this error.
But reading the error message it does not look like to be the problem here. It problem seems to be reading the host rule error while parsing rule Host(n8n.bttrr.com). Sadly do not understand why it causes problems for you but nobody else that uses the same file. So maybe worth trying to play around there a little bit. Maybe replacing the variables and hardcoding it and then using backticks, quotes, … and see if that helps.
If it does not, it would be worth googling some more and/or posting about the issue in the traefik forum like mentioned above. Sorry but have sadly not enough experience with traefik to be able to solve this issue.