Caddy - exit status 1

  1. Caddy version (caddy version):
    v2.4.6 h1:HGkGICFGvyrodcqOOclHKfvJC0qTU7vny/7FhYp9hNw=

  2. How I run Caddy:

caddy run

error after the command

run: adapting config using caddyfile: subject does not qualify for certificate: '}'

a. System environment:
Debian running on a Raspberry PI

b. Command:

caddy run

c. Service/unit/compose file:

Portainer - docker
OMV
Jellyfin
Nextcloud
Duplicati

d. My complete Caddyfile or JSON config:

:2015

respond "Hello, world!"

3. The problem I’m having:

my domain name is showing the caddy webpage although I have the “Hello, world!” message and adjusted the /www/var/html

and when i run the run command i get the below error

4. Error messages and/or full log output:

run: adapting config using caddyfile: hostname appears in more than one automation policy, making certificate management ambiguous: *

caddy start provides the below error

run: adapting config using caddyfile: subject does not qualify for certificate: '}'

start: caddy process exited with error: exit status 1

There’s some details missing here. Are you sure you’re using the right config? Because the errors you posted don’t match the config you say you’re using.

How did you install Caddy? How exactly are you running Caddy? From what directory are you trying to run it?

1 Like

I believe the confusion came because I changed something in Caddyfile by mistake between the commands hence mixed errors above as I removed # from #root * /usr/share/caddy.

  • Anyways I did something and now I do not even have access to caddy page to continue setup

I did install from the following link caddy

sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo tee /etc/apt/trusted.gpg.d/caddy-stable.asc
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy

I put in caddy run i get the following error:

2022/02/10 06:34:51.744	INFO	using adjacent Caddyfile
run: adapting config using caddyfile: subject does not qualify for certificate: '}'

I put in caddy start I get the following error:

2022/02/10 06:36:15.975 INFO using adjacent Caddyfile

run: adapting config using caddyfile: subject does not qualify for certificate: '}'

start: caddy process exited with error: exit status 1

Directory:
/etc/caddy/Caddyfile
/var/www/html


One more question I do not need to create a config.json since I have a Caddyfile, am I correct

Thanks in advance.

nevermind I actually I made it work my challenge I create the Caddyfile in the wrong directory and my commands was incorrect from this perspective.

But now I have Error 525 - SSL handshake failed.

This topic was automatically closed after 30 days. New replies are no longer allowed.