I can't start Caddy

1. The problem I’m having:

I’m trying to restart Caddy and connect to my sites url’s but can’t

2. Error messages and/or full log output:

× caddy.service - Caddy
     Loaded: loaded (/usr/lib/systemd/system/caddy.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Thu 2024-07-04 15:07:07 AEST; 30s ago
       Docs: https://caddyserver.com/docs/
    Process: 46399 ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile (code=exited, status=1/FAILURE)
   Main PID: 46399 (code=exited, status=1/FAILURE)
     Status: "loading new config: http app module: start: listening on :80: listen tcp :80: bind: address already in use"
        CPU: 81ms

Jul 04 15:07:07 plexserver caddy[46399]: {"level":"info","ts":1720069627.9428687,"logger":"http.auto_https","msg":"enabling automatic HTTP->HTTPS redirects","server_name":"srv0"}
Jul 04 15:07:07 plexserver caddy[46399]: {"level":"info","ts":1720069627.9567704,"logger":"pki.ca.local","msg":"root certificate is already trusted by system","path":"storage:pki/authorities/local/root.crt"}
Jul 04 15:07:07 plexserver caddy[46399]: {"level":"info","ts":1720069627.9569309,"logger":"http","msg":"enabling HTTP/3 listener","addr":":443"}
Jul 04 15:07:07 plexserver caddy[46399]: {"level":"info","ts":1720069627.957072,"msg":"[INFO][FileStorage:/var/lib/caddy/.local/share/caddy] Lock for 'storage_clean' is stale (created: 2024-07-04 14:52:35.209832648 +1000 AEST, last update: 2024-07-04 14>
Jul 04 15:07:07 plexserver caddy[46399]: {"level":"info","ts":1720069627.9571962,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
Jul 04 15:07:07 plexserver caddy[46399]: {"level":"info","ts":1720069627.957293,"logger":"tls.cache.maintenance","msg":"stopped background certificate maintenance","cache":"0xc000428c00"}
Jul 04 15:07:07 plexserver caddy[46399]: Error: loading initial config: loading new config: http app module: start: listening on :80: listen tcp :80: bind: address already in use
Jul 04 15:07:07 plexserver systemd[1]: caddy.service: Main process exited, code=exited, status=1/FAILURE
Jul 04 15:07:07 plexserver systemd[1]: caddy.service: Failed with result 'exit-code'.
Jul 04 15:07:07 plexserver systemd[1]: Failed to start caddy.service - Caddy.

3. Caddy version:

v2.7.6 h1:w0NymbG2m9PcvKWsrXO6EEkY9Ru4FJK8uQbYcev1p3A=

4. How I installed and ran Caddy:

I don’t remember, I think I followed a guide on caddy site. But Caddy isn’t installed in Docker.

a. System environment:

Ubuntu 24.04
Docker version 26.1.3, build b72abbb

b. Command:

sudo systemctl restart caddy

c. Service/unit/compose file:

PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.

d. My complete Caddy config:

# The Caddyfile is an easy way to configure your Caddy web server.
#
# Unless the file starts with a global options block, the first
# uncommented line is always the address of your site.
#
# To use your own domain name (with automatic HTTPS), first make
# sure your domain's A/AAAA DNS records are properly pointed to
# this machine's public IP, then replace ":80" below with your
# domain name.
{
	admin 0.0.0.0:2020
	acme_dns XXXX XXXXXXXXXXX
}

nc.sceptic.au: {
	tls internal
	reverse_proxy localhost:11000
}

sonarr.sceptic.au {
	tls internal
	reverse_proxy 192.168.50.242:8989
}

homepage.sceptic.au {
	tls internal
	reverse_proxy localhost:3000
}

overseerr.sceptic.au {
	tls internal
	reverse_proxy localhost:5055
}

maintainerr.sceptic.au {
	tls internal
	reverse_proxy localhost:6246
}

radarr.sceptic.au {
	tls internal
	reverse_proxy localhost:7878
}

readarr.sceptic.au {
	tls internal
	reverse_proxy localhost:8787
}

lidarr.sceptic.au {
	tls internal
	reverse_proxy localhost:8686
}

sabnzbd.sceptic.au {
	tls internal
	reverse_proxy localhost:8089
}

prowlarr.sceptic.au {
	tls internal
	reverse_proxy localhost:9696
}

https://audio.sceptic.au:443 {
	tls internal
	reverse_proxy localhost:13378
}

tautulli.sceptic.au {
	tls internal
	reverse_proxy localhost:8181
}

paperless.sceptic.au {
	tls internal
	reverse_proxy localhost:8003
}

actual.sceptic.au {
	tls internal
	reverse_proxy localhost:5006
}

freshrss.sceptic.au {
	tls internal
	reverse_proxy localhost:8282
}

immich.sceptic.au {
	tls internal
	reverse_proxy localhost:2283
}

dozzle.sceptic.au {
	tls internal
	reverse_proxy localhost:8888
}

ukuma.sceptic.au {
	tls internal
	reverse_proxy localhost:3001
}

filebrowser.sceptic.au {
	tls internal
	reverse_proxy localhost:8383
}

dockge.sceptic.au {
	tls internal
	reverse_proxy localhost:5001
}

linkding.sceptic.au {
	tls internal
	reverse_proxy localhost:9090
}

change.sceptic.au {
	tls internal
	reverse_proxy localhost:5000
}

duplicati.sceptic.au {
	tls internal
	reverse_proxy localhost:8200
}

stirlingpdf.sceptic.au {
	tls internal
	reverse_proxy localhost:8088
}

wallos.sceptic.au {
	tls internal
	reverse_proxy localhost:8484
}

reader.sceptic.au {
	tls internal
	reverse_proxy localhost:5005
}

vikunja.sceptic.au {
	tls internal
	reverse_proxy localhost:3456
}

watcharr.sceptic.au {
	tls internal
	reverse_proxy localhost:3080
}

money-balancer.sceptic.au {
	tls internal
	reverse_proxy localhost:8030
}

jelu.sceptic.au {
	tls internal
	reverse_proxy localhost:11111
}

readeck.sceptic.au {
	tls internal
	reverse_proxy localhost:8022
}

silverbullet.sceptic.au {
	tls internal
	reverse_proxy localhost:3004
}

codeserver.sceptic.au {
	tls internal
	reverse_proxy localhost:8090
}

scrutiny.sceptic.au {
	tls internal
	reverse_proxy localhost:8188
}

mealie.sceptic.au {
	tls internal
	reverse_proxy localhost:9925
}

emulator.sceptic.au {
	tls internal
	reverse_proxy localhost:86
}

bittorrent.sceptic.au {
	tls internal
	reverse_proxy localhost:8586
}

hoarder.sceptic.au {
	tls internal
	reverse_proxy localhost:3088
}

olivetin.sceptic.au {
	tls internal
	reverse_proxy localhost:1337
}

netalertx.sceptic.au {
	tls internal
	reverse_proxy localhost:20211
}

searxng.sceptic.au {
	tls internal
	reverse_proxy localhost:8092
}

# Refer to the Caddy docs for more information:
# https://caddyserver.com/docs/caddyfile

5. Links to relevant resources:

I added this to the Caddyfile:

auto_https disable_redirects

That allowed me to restart caddy, but I can’t access my sites.

skepticalme@plexserver:~$ systemctl status caddy.service
● caddy.service - Caddy
     Loaded: loaded (/usr/lib/systemd/system/caddy.service; enabled; preset: enabled)
     Active: active (running) since Thu 2024-07-04 16:49:53 AEST; 18s ago
       Docs: https://caddyserver.com/docs/
   Main PID: 76875 (caddy)
      Tasks: 11 (limit: 38163)
     Memory: 12.6M (peak: 13.1M)
        CPU: 85ms
     CGroup: /system.slice/caddy.service
             └─76875 /usr/bin/caddy run --environ --config /etc/caddy/Caddyfile

Jul 04 16:49:53 plexserver caddy[76875]: {"level":"warn","ts":1720075793.263747,"logger":"tls","msg":"stapling OCSP","error":"no OCSP stapling for [duplicati.sceptic.au]: no OCSP server specified>
Jul 04 16:49:53 plexserver caddy[76875]: {"level":"warn","ts":1720075793.2638934,"logger":"tls","msg":"stapling OCSP","error":"no OCSP stapling for [jelu.sceptic.au]: no OCSP server specified in >
Jul 04 16:49:53 plexserver caddy[76875]: {"level":"warn","ts":1720075793.2640438,"logger":"tls","msg":"stapling OCSP","error":"no OCSP stapling for [vikunja.sceptic.au]: no OCSP server specified >
Jul 04 16:49:53 plexserver caddy[76875]: {"level":"warn","ts":1720075793.2642083,"logger":"tls","msg":"stapling OCSP","error":"no OCSP stapling for [radarr.sceptic.au]: no OCSP server specified i>
Jul 04 16:49:53 plexserver caddy[76875]: {"level":"warn","ts":1720075793.2643604,"logger":"tls","msg":"stapling OCSP","error":"no OCSP stapling for [maintainerr.sceptic.au]: no OCSP server specif>
Jul 04 16:49:53 plexserver caddy[76875]: {"level":"warn","ts":1720075793.264519,"logger":"tls","msg":"stapling OCSP","error":"no OCSP stapling for [codeserver.sceptic.au]: no OCSP server specifie>
Jul 04 16:49:53 plexserver caddy[76875]: {"level":"warn","ts":1720075793.264666,"logger":"tls","msg":"stapling OCSP","error":"no OCSP stapling for [actual.sceptic.au]: no OCSP server specified in>
Jul 04 16:49:53 plexserver caddy[76875]: {"level":"info","ts":1720075793.2647824,"msg":"autosaved config (load with --resume flag)","file":"/var/lib/caddy/.config/caddy/autosave.json"}
Jul 04 16:49:53 plexserver caddy[76875]: {"level":"info","ts":1720075793.2648351,"msg":"serving initial configuration"}
Jul 04 16:49:53 plexserver systemd[1]: Started caddy.service - Caddy.

I solved it, it was a problem in my router with the pi.hole address. Fixed now.

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