Hey, I’m a newbie in n8n. Today I spent 4 hours installing n8n docker on the Hetzner Cloud server. I followed the guide here https://docs.n8n.io/hosting/installation/server-setups/hetzner/
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]
Caddyfile
:80 {
reverse_proxy 127.0.0.1:5678
}
116.203.21.64:80 {
reverse_proxy 127.0.0.1:5678
}
docker-compose.yml
services:
caddy:
image: caddy:latest
restart: unless-stopped
ports:
- "80:80"
volumes:
- caddy_data:/data
- ${DATA_FOLDER}/caddy_config:/config
- ${DATA_FOLDER}/caddy_config/Caddyfile:/etc/caddy/Caddyfile
n8n:
image: docker.n8n.io/n8nio/n8n
restart: always
ports:
- 5678:5678
environment:
- N8N_HOST=${DOMAIN_NAME}
- N8N_PORT=5678
- N8N_PROTOCOL=http
- NODE_ENV=production
- WEBHOOK_URL=http://${DOMAIN_NAME}/
- GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
volumes:
- n8n_data:/home/node/.n8n
- ${DATA_FOLDER}/local_files:/files
volumes:
caddy_data:
external: true
n8n_data:
external: true
Information on your n8n setup
- n8n version: 1.68.0
- Running n8n via (Docker, npm, n8n cloud, desktop app): DOCKER