I tried to set it with the IP address, not the domain name. So, basically, the goal is to put http://ip_address in the browser and get to the n8n web panel.
I tried many times, but I need help. Maybe someone would be so nice as to check the config files below and tell me what I’m doing wrong.
.env
# Replace <directory-path> with the path where you created folders earlier
#DATA_FOLDER=/<directory-path>/n8n-docker-caddy
DATA_FOLDER=/root/n8n-docker-caddy
# The top level domain to serve from, this should be the same as the subdomain you created above
#DOMAIN_NAME=example.com
DOMAIN_NAME=116.203.21.64
# The subdomain to serve from
#SUBDOMAIN=n8n
SUBDOMAIN=
# DOMAIN_NAME and SUBDOMAIN combined decide where n8n will be reachable from
# above example would result in: https://n8n.example.com
# Optional timezone to set which gets used by Cron-Node by default
# If not set New York time will be used
GENERIC_TIMEZONE=Europe/Berlin
# The email address to use for the SSL certificate creation
[email protected]
Hello,
Could you give a little bit more information on what kind of error you’re facing when trying to connect to the server. Is it a timeout ? Is it a 404 page ? Or any other error ?
Thank you for your interest. Today I finally make it work. I generated self-signed certificate and decided to go with https://. Important thing is to put in Caddyfile in reverse_proxy the container name not the IP address or localhost.
Below my files if anyone have similar problem:
.env
# Directory path for n8n data
DATA_FOLDER=/root/n8n-docker-caddy
# Use the server's public IP address
DOMAIN_NAME=116.203.21.65
SUBDOMAIN=
# Timezone configuration
GENERIC_TIMEZONE=Europe/Berlin
# Email address for SSL certificate creation (not used in this setup)
[email protected]
Glad you managed to make it work!
Indeed 127.0.0.1 doesn’t work because n8n and caddy are in different containers, they can’t communicate over localhost because docker isolates their network.
Though, docker should also make the n8n service available and this Caddy config should also work: