ERR_SSL_PROTOCOL_ERROR with Digital Ocean

Describe the problem/error/question

I followed the documentation and installed everything. Something is probably missing for the DNS part.

What is the error message (if any)?

I’m getting this error when I try to connect to the domain :

This site can’t provide a secure connection

68.183.208.118 sent an invalid response.

ERR_SSL_PROTOCOL_ERROR

.env

DATA_FOLDER=/home/thozh/n8n-docker-caddy

# The top level domain to serve from, this should be the same as the subdomain you created above
DOMAIN_NAME=rimoloc.fr

# The subdomain to serve from
SUBDOMAIN=n8n.rimoloc.fr

# 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/Paris

# The email address to use for the SSL certificate creation
[email protected]

docker-compose file

GNU nano 6.2                                      docker-compose.yml
version: "3.7"

services:
  caddy:
    image: caddy:latest
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ${DATA_FOLDER}/caddy_data:/data
      - ${DATA_FOLDER}/caddy_config:/config
      - ${DATA_FOLDER}/caddy_config/Caddyfile:/etc/caddy/Caddyfile

  n8n:
    image: n8nio/n8n
    restart: always
    ports:
      - 5678:5678
    environment:
      - N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}
      - N8N_PORT=5678
      - N8N_PROTOCOL=https
      - NODE_ENV=production
      - WEBHOOK_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/
      - GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
    volumes:
      - ${DATA_FOLDER}/local_files:/files
      - ${DATA_FOLDER}/.n8n:/home/node/.n8n
volumes:
  caddy_data:
    external: true
  caddy_config:

caddy_config/Caddyfile file

  GNU nano 6.2                                    caddy_config/Caddyfile
n8n.rimoloc.fr {
    reverse_proxy n8n:5678 {
      flush_interval -1
    }
}

My domain name is registered on ionos :slight_smile:


Here is the translation :
Type : Any domain
Redirect destination : http://68.183.208.118
The redirection destination address can be a domain of your choice or a valid URL. Please note: To use SSL encryption, it must be enabled for the redirection destination.

Also configure for www sub-domains.

Redirection type
HTTP redirection (Recommended)
Automatically redirects your domain to the target domain. The browser address bar shows the Internet address (URL) of the target domain.

Frame redirection
Automatically redirects your domain to the target (=destination) domain. However, the Internet address (URL) of the original domain remains visible in the browser address bar, as the content of the target domain is displayed in a frame.

Hey @thozh,

Welcome to the community :tada:

I suspect the SSL certificate has not been created correctly, Looking at your your env file you have the Subdomian set to the full URL rather than just n8n so it will be trying to create a certificate for n8n.rimoloc.fr.rimoloc.fr try updating the sub domain and starting the contianer again to see if that helps.