Caddyfile not read during install frankenphp

1. The problem I’m having:

I am trying to install frankenphp image in docker.

2. Error messages and/or full log output:

``georg@hpradio1:~$ docker run -p 80:80 -p 443:443 -v $PWD:/app dunglas/frankenphp
{"level":"info","ts":1765790016.298575,"msg":"maxprocs: Leaving GOMAXPROCS=4: CPU quota undefined"}
{"level":"info","ts":1765790016.2987885,"msg":"GOMEMLIMIT is updated","package":"github.com/KimMachineGun/automemlimit/memlimit","GOMEMLIMIT":7499999232,"previous":9223372036854775807}
{"level":"info","ts":1765790016.2989192,"msg":"using config from file","file":"/etc/frankenphp/Caddyfile"}
{"level":"warn","ts":1765790016.2990096,"msg":"No files matching import glob pattern","pattern":"Caddyfile.d/*.caddyfile"}
{"level":"info","ts":1765790016.3003488,"msg":"adapted config to JSON","adapter":"caddyfile"}
{"level":"warn","ts":1765790016.3003647,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/frankenphp/Caddyfile","line":5}
{"level":"info","ts":1765790016.3303647,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
{"level":"info","ts":1765790016.33072,"logger":"http.auto_https","msg":"server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS","server_name":"srv0","https_port":443}
{"level":"info","ts":1765790016.3307493,"logger":"http.auto_https","msg":"enabling automatic HTTP->HTTPS redirects","server_name":"srv0"}
{"level":"info","ts":1765790016.3308015,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc000465080"}
{"level":"info","ts":1765790016.3310869,"logger":"pki.ca.local","msg":"root certificate trust store installation disabled; unconfigured clients may show warnings","path":"storage:pki/authorities/local/root.crt"}
{"level":"info","ts":1765790016.3312361,"logger":"http","msg":"enabling HTTP/3 listener","addr":":443"}
{"level":"info","ts":1765790016.3313773,"msg":"failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 7168 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes for details."}
{"level":"info","ts":1765790016.3315046,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
{"level":"warn","ts":1765790016.3315735,"logger":"http","msg":"HTTP/2 skipped because it requires TLS","network":"tcp","addr":":80"}
{"level":"warn","ts":1765790016.3315833,"logger":"http","msg":"HTTP/3 skipped because it requires TLS","network":"tcp","addr":":80"}
{"level":"info","ts":1765790016.3315861,"logger":"http.log","msg":"server running","name":"remaining_auto_https_redirects","protocols":["h1","h2","h3"]}
{"level":"info","ts":1765790016.3315895,"logger":"http","msg":"enabling automatic TLS certificate management","domains":["localhost"]}
{"level":"info","ts":1765790016.3351142,"logger":"tls.obtain","msg":"acquiring lock","identifier":"localhost"}
{"level":"info","ts":1765790016.3373432,"logger":"tls","msg":"cleaning storage unit","storage":"FileStorage:/data/caddy"}
{"level":"info","ts":1765790016.3398829,"logger":"tls.obtain","msg":"lock acquired","identifier":"localhost"}
{"level":"info","ts":1765790016.3399513,"logger":"tls.obtain","msg":"obtaining certificate","identifier":"localhost"}
{"level":"info","ts":1765790016.342669,"logger":"tls","msg":"finished cleaning storage units"}
{"level":"info","ts":1765790016.3507185,"logger":"tls.obtain","msg":"certificate obtained successfully","identifier":"localhost","issuer":"local"}
{"level":"info","ts":1765790016.3507931,"logger":"tls.obtain","msg":"releasing lock","identifier":"localhost"}
{"level":"warn","ts":1765790016.3511708,"logger":"tls","msg":"stapling OCSP","identifiers":["localhost"]}
{"level":"info","ts":1765790016.3678062,"logger":"frankenphp","msg":"FrankenPHP started 🐘","php_version":"8.5.0","num_threads":8,"max_threads":8}
{"leve`georg@hpradio1:~$ docker run -p 80:80 -p 443:443 -v $PWD:/app dunglas/frankenphp
{"level":"info","ts":1765790016.298575,"msg":"maxprocs: Leaving GOMAXPROCS=4: CPU quota undefined"}
{"level":"info","ts":1765790016.2987885,"msg":"GOMEMLIMIT is updated","package":"github.com/KimMachineGun/automemlimit/memlimit","GOMEMLIMIT":7499999232,"previous":9223372036854775807}
{"level":"info","ts":1765790016.2989192,"msg":"using config from file","file":"/etc/frankenphp/Caddyfile"}
{"level":"warn","ts":1765790016.2990096,"msg":"No files matching import glob pattern","pattern":"Caddyfile.d/*.caddyfile"}
{"level":"info","ts":1765790016.3003488,"msg":"adapted config to JSON","adapter":"caddyfile"}
{"level":"warn","ts":1765790016.3003647,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/frankenphp/Caddyfile","line":5}
{"level":"info","ts":1765790016.3303647,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
{"level":"info","ts":1765790016.33072,"logger":"http.auto_https","msg":"server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS","server_name":"srv0","https_port":443}
{"level":"info","ts":1765790016.3307493,"logger":"http.auto_https","msg":"enabling automatic HTTP->HTTPS redirects","server_name":"srv0"}
{"level":"info","ts":1765790016.3308015,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc000465080"}
{"level":"info","ts":1765790016.3310869,"logger":"pki.ca.local","msg":"root certificate trust store installation disabled; unconfigured clients may show warnings","path":"storage:pki/authorities/local/root.crt"}
{"level":"info","ts":1765790016.3312361,"logger":"http","msg":"enabling HTTP/3 listener","addr":":443"}
{"level":"info","ts":1765790016.3313773,"msg":"failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 7168 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes for details."}
{"level":"info","ts":1765790016.3315046,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
{"level":"warn","ts":1765790016.3315735,"logger":"http","msg":"HTTP/2 skipped because it requires TLS","network":"tcp","addr":":80"}
{"level":"warn","ts":1765790016.3315833,"logger":"http","msg":"HTTP/3 skipped because it requires TLS","network":"tcp","addr":":80"}
{"level":"info","ts":1765790016.3315861,"logger":"http.log","msg":"server running","name":"remaining_auto_https_redirects","protocols":["h1","h2","h3"]}
{"level":"info","ts":1765790016.3315895,"logger":"http","msg":"enabling automatic TLS certificate management","domains":["localhost"]}
{"level":"info","ts":1765790016.3351142,"logger":"tls.obtain","msg":"acquiring lock","identifier":"localhost"}
{"level":"info","ts":1765790016.3373432,"logger":"tls","msg":"cleaning storage unit","storage":"FileStorage:/data/caddy"}
{"level":"info","ts":1765790016.3398829,"logger":"tls.obtain","msg":"lock acquired","identifier":"localhost"}
{"level":"info","ts":1765790016.3399513,"logger":"tls.obtain","msg":"obtaining certificate","identifier":"localhost"}
{"level":"info","ts":1765790016.342669,"logger":"tls","msg":"finished cleaning storage units"}
{"level":"info","ts":1765790016.3507185,"logger":"tls.obtain","msg":"certificate obtained successfully","identifier":"localhost","issuer":"local"}
{"level":"info","ts":1765790016.3507931,"logger":"tls.obtain","msg":"releasing lock","identifier":"localhost"}
{"level":"warn","ts":1765790016.3511708,"logger":"tls","msg":"stapling OCSP","identifiers":["localhost"]}
{"level":"info","ts":1765790016.3678062,"logger":"frankenphp","msg":"FrankenPHP started 🐘","php_version":"8.5.0","num_threads":8,"max_threads":8}
{"level":"info","ts":1765790016.3739095,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"}
{"level":"info","ts":1765790016.3739412,"msg":"serving initial configuration"}
`l":"info","ts":1765790016.3739095,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"}
{"level":"info","ts":1765790016.3739412,"msg":"serving initial configuration"}
``

3. Caddy version:

4. How I installed and ran Caddy:

The instruction you can see above.

a. System environment:

Debian 13.1, docker 26.1.5+dfsg1

b. Command:

I can't successful install Caddy.

c. Service/unit/compose file:

d. My complete Caddy config:

I can't use caddy fmt, because Caddy is not running yet!

But the Caddyfile seems to be my current problem. In the console output, above, I always got a warning that something is wrong with the Caddyfile //etc/frankenphp/Caddyfile) on line 5. I can make changes on the Caddyfile, but I still got the same warning, for line 5.
I even have hanged Caddyfile to xCaddyfilex , so usuall no Caddyfile should exists. But the warning for line 5 is still the same, what I absolutly don’t understand.

5. Links to relevant resources:

Warning about the config formatting is not an error. It’s just a warning.

What does that mean?

1 Like

FrankenPHP reads Caddyfile from /etc/frankenphp/Caddyfile, which by default looks like this:

Line 5 is just an empty, non-commented line in that file, and the Caddy’s parser only issues a warning, essentially saying, “It’s not pretty.” However, it’s not an error; your FrankenPHP simply launches without any problems. At least, I don’t see any problems, but I’m reading your post on my phone.

1 Like

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