Curl Works Browser Fails - Local Non-Docker

1. The problem I’m having:

Curl appears to respond correctly.

Chromium Browser (on the Caddy host server) fails to connect.

I’ve only installed up to the Local step.

Stock Debian arm 64 OS on a Raspberry Pi 4b using a 64g micro-sd.

(Should the router firewall have the IP of the host Pi opened for
2015-2019 for TCP and UDP, or is that unnecessary?)

dmc@dmc:~/caddy $ curl -vL http://localhost:2015
*   Trying 127.0.0.1:2015...
* Connected to localhost (127.0.0.1) port 2015 (#0)
> GET / HTTP/1.1
> Host: localhost:2015
> User-Agent: curl/7.88.1
> Accept: */*
> 
< HTTP/1.1 200 OK
< Accept-Ranges: bytes
< Content-Length: 221
< Content-Type: text/html; charset=utf-8
< Etag: "daif9jd2aujh65"
< Last-Modified: Tue, 10 Jun 2025 00:21:17 GMT
< Server: Caddy
< Vary: Accept-Encoding
< Date: Tue, 10 Jun 2025 13:59:24 GMT
< 
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link />
</head>
<body>
  TESTING CADDY
</body>
* Connection #0 to host localhost left intact
</html>dmc@dmc:~/caddy $ 

2. Error messages and/or full log output:

Jun 09 17:04:39 dmc systemd[1]: Starting caddy.service - Caddy...
Jun 09 17:04:39 dmc caddy[15741]: {"level":"info","ts":1749503079.6627772,"msg":"maxprocs: Leaving GOMAXPROCS=4: CPU quota undefined"}
Jun 09 17:04:39 dmc caddy[15741]: {"level":"info","ts":1749503079.663232,"msg":"GOMEMLIMIT is updated","package":"github.com/KimMachineGun/automemlimit/memlimit","GOMEMLIMIT":7381204992,"previous":9223372036854775807}
Jun 09 17:04:39 dmc caddy[15741]: caddy.HomeDir=/var/lib/caddy
Jun 09 17:04:39 dmc caddy[15741]: caddy.AppDataDir=/var/lib/caddy/.local/share/caddy
Jun 09 17:04:39 dmc caddy[15741]: caddy.AppConfigDir=/var/lib/caddy/.config/caddy
Jun 09 17:04:39 dmc caddy[15741]: caddy.ConfigAutosavePath=/var/lib/caddy/.config/caddy/autosave.json
Jun 09 17:04:39 dmc caddy[15741]: caddy.Version=v2.10.0 h1:fonubSaQKF1YANl8TXqGcn4IbIRUDdfAkpcsfI/vX5U=
Jun 09 17:04:39 dmc caddy[15741]: runtime.GOOS=linux
Jun 09 17:04:39 dmc caddy[15741]: runtime.GOARCH=arm64
Jun 09 17:04:39 dmc caddy[15741]: runtime.Compiler=gc
Jun 09 17:04:39 dmc caddy[15741]: runtime.NumCPU=4
Jun 09 17:04:39 dmc caddy[15741]: runtime.GOMAXPROCS=4
Jun 09 17:04:39 dmc caddy[15741]: runtime.Version=go1.24.2
Jun 09 17:04:39 dmc caddy[15741]: os.Getwd=/
Jun 09 17:04:39 dmc caddy[15741]: LANG=en_GB.UTF-8
Jun 09 17:04:39 dmc caddy[15741]: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Jun 09 17:04:39 dmc caddy[15741]: NOTIFY_SOCKET=/run/systemd/notify
Jun 09 17:04:39 dmc caddy[15741]: HOME=/var/lib/caddy
Jun 09 17:04:39 dmc caddy[15741]: LOGNAME=caddy
Jun 09 17:04:39 dmc caddy[15741]: USER=caddy
Jun 09 17:04:39 dmc caddy[15741]: INVOCATION_ID=ece4afb20c8b4b0bb83652c0dda6030e
Jun 09 17:04:39 dmc caddy[15741]: JOURNAL_STREAM=9:29590
Jun 09 17:04:39 dmc caddy[15741]: SYSTEMD_EXEC_PID=15741
Jun 09 17:04:39 dmc caddy[15741]: {"level":"info","ts":1749503079.6635659,"msg":"using config from file","file":"/etc/caddy/Caddyfile"}
Jun 09 17:04:39 dmc caddy[15741]: {"level":"info","ts":1749503079.6655188,"msg":"adapted config to JSON","adapter":"caddyfile"}
Jun 09 17:04:39 dmc caddy[15741]: {"level":"info","ts":1749503079.667991,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//127.0.0.1:2019","//localhost:2019","//[::1]:2019"]}
Jun 09 17:04:39 dmc caddy[15741]: {"level":"warn","ts":1749503079.6683786,"logger":"http.auto_https","msg":"server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server","server_name":"srv0","http_port":80}
Jun 09 17:04:39 dmc caddy[15741]: {"level":"info","ts":1749503079.6684682,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0x40003c4f00"}
Jun 09 17:04:39 dmc caddy[15741]: {"level":"warn","ts":1749503079.6785662,"logger":"http","msg":"HTTP/2 skipped because it requires TLS","network":"tcp","addr":":80"}
Jun 09 17:04:39 dmc caddy[15741]: {"level":"warn","ts":1749503079.678616,"logger":"http","msg":"HTTP/3 skipped because it requires TLS","network":"tcp","addr":":80"}
Jun 09 17:04:39 dmc caddy[15741]: {"level":"info","ts":1749503079.6786275,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
Jun 09 17:04:39 dmc caddy[15741]: {"level":"info","ts":1749503079.679115,"msg":"autosaved config (load with --resume flag)","file":"/var/lib/caddy/.config/caddy/autosave.json"}
Jun 09 17:04:39 dmc caddy[15741]: {"level":"info","ts":1749503079.6792428,"msg":"serving initial configuration"}
Jun 09 17:04:39 dmc systemd[1]: Started caddy.service - Caddy.
Jun 09 17:04:39 dmc caddy[15741]: {"level":"info","ts":1749503079.7324004,"logger":"tls","msg":"cleaning storage unit","storage":"FileStorage:/var/lib/caddy/.local/share/caddy"}
Jun 09 17:04:39 dmc caddy[15741]: {"level":"info","ts":1749503079.737316,"logger":"tls","msg":"finished cleaning storage units"}
Jun 09 17:05:55 dmc caddy[15741]: {"level":"info","ts":1749503155.0381134,"logger":"admin.api","msg":"received request","method":"POST","host":"localhost:2019","uri":"/stop","remote_ip":"127.0.0.1","remote_port":"48872","headers":{"Accept-Encoding":["gzip"],"Content-Length":["0"],"Origin":["http://localhost:2019"],"User-Agent":["Go-http-client/1.1"]}}
Jun 09 17:05:55 dmc caddy[15741]: {"level":"warn","ts":1749503155.0383046,"logger":"admin.api","msg":"exiting; byeee!! 👋"}
Jun 09 17:05:55 dmc caddy[15741]: {"level":"info","ts":1749503155.038388,"logger":"http","msg":"servers shutting down with eternal grace period"}
Jun 09 17:05:55 dmc caddy[15741]: {"level":"info","ts":1749503155.039198,"logger":"admin","msg":"stopped previous server","address":"localhost:2019"}
Jun 09 17:05:55 dmc caddy[15741]: {"level":"info","ts":1749503155.0392752,"logger":"admin.api","msg":"shutdown complete","exit_code":0}
Jun 09 17:05:55 dmc systemd[1]: caddy.service: Deactivated successfully.

3. Caddy version:

v2.10.0 h1:fonubSaQKF1YANl8TXqGcn4IbIRUDdfAkpcsfI/vX5U=

4. How I installed and ran Caddy:

Stable here: https://caddyserver.com/docs/install#debian-ubuntu-raspbian

5. Links to relevant resources:

You didn’t share your configuration.

I tried to follow all of the Help posting instructions. As noted it’s a generic install from here; https://caddyserver.com/docs/install#debian-ubuntu-raspbian and only as far as to test Local. What “configuration” information is missing and where might I find that, please? Thanks.

Well, I’m not sure but perhaps I accidentally triggered something good while gathering the information for my Help post - http://localhost:2015 is now working! (The only change I recall making was to add the debug section to Caddyfile.)

I just went back over the Help instructions and created a text file to use as a template in the future. (The Help instructions show up in a little box that’s difficult to navigate & I found some of it unclear.) 1. #4c. Service/unit/compose file:" - since I’m not using Docker, would “Service” be the contents of my Caddyfile? 2. Would you be willing to look at my template so that I might be sure I get it right the next time, please? Thanks.

If you can share the configuration or templates you’re working with, we might be able to help. Without seeing them, I still have no idea what you’re doing.. sorry.

The problem has resolved. I can run the Local test in both Browser and Curl successfully.

However, I want to be certain that in the 99% likely case that I have need of Help as I move to the next step in the setup, that the following template is correct - to be used to submit my request for Help …

1. The problem I’m having:

e.g.

Curl appears to respond correctly.

Chromium Browser (on the Caddy host server) fails to connect.

Help instructions say “Use curl -vL to show example requests.”

That didn’t work but

curl -vL http://localhost:2015
``` does work.

e.g.

dmc@dmc:~/caddy $ curl -vL http://localhost:2015

  • Trying 127.0.0.1:2015…
  • Connected to localhost (127.0.0.1) port 2015 (#0)

GET / HTTP/1.1
Host: localhost:2015
User-Agent: curl/7.88.1
Accept: /

< HTTP/1.1 200 OK
< Accept-Ranges: bytes
< Content-Length: 221
< Content-Type: text/html; charset=utf-8
< Etag: “daif9jd2aujh65”
< Last-Modified: Tue, 10 Jun 2025 00:21:17 GMT
< Server: Caddy
< Vary: Accept-Encoding
< Date: Tue, 10 Jun 2025 13:59:24 GMT
<

Document TESTING CADDY * Connection #0 to host localhost left intact dmc@dmc:~/caddy $ ```

2. Error messages and/or full log output:

Add “debug” inside { } to Caddyfile

$ journalctl -u caddy --no-pager | less +G

e.g.

Jun 09 17:04:39 dmc systemd[1]: Starting caddy.service - Caddy...
Jun 09 17:04:39 dmc caddy[15741]: {"level":"info","ts":1749503079.6627772,"msg":"maxprocs: Leaving GOMAXPROCS=4: CPU quota undefined"}
Jun 09 17:04:39 dmc caddy[15741]: {"level":"info","ts":1749503079.663232,"msg":"GOMEMLIMIT is updated","package":"github.com/KimMachineGun/automemlimit/memlimit","GOMEMLIMIT":7381204992,"previous":9223372036854775807}
Jun 09 17:04:39 dmc caddy[15741]: caddy.HomeDir=/var/lib/caddy
Jun 09 17:04:39 dmc caddy[15741]: caddy.AppDataDir=/var/lib/caddy/.local/share/caddy
Jun 09 17:04:39 dmc caddy[15741]: caddy.AppConfigDir=/var/lib/caddy/.config/caddy
Jun 09 17:04:39 dmc caddy[15741]: caddy.ConfigAutosavePath=/var/lib/caddy/.config/caddy/autosave.json
Jun 09 17:04:39 dmc caddy[15741]: caddy.Version=v2.10.0 h1:fonubSaQKF1YANl8TXqGcn4IbIRUDdfAkpcsfI/vX5U=
Jun 09 17:04:39 dmc caddy[15741]: runtime.GOOS=linux
Jun 09 17:04:39 dmc caddy[15741]: runtime.GOARCH=arm64
Jun 09 17:04:39 dmc caddy[15741]: runtime.Compiler=gc
Jun 09 17:04:39 dmc caddy[15741]: runtime.NumCPU=4
Jun 09 17:04:39 dmc caddy[15741]: runtime.GOMAXPROCS=4
Jun 09 17:04:39 dmc caddy[15741]: runtime.Version=go1.24.2
Jun 09 17:04:39 dmc caddy[15741]: os.Getwd=/
Jun 09 17:04:39 dmc caddy[15741]: LANG=en_GB.UTF-8
Jun 09 17:04:39 dmc caddy[15741]: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Jun 09 17:04:39 dmc caddy[15741]: NOTIFY_SOCKET=/run/systemd/notify
Jun 09 17:04:39 dmc caddy[15741]: HOME=/var/lib/caddy
Jun 09 17:04:39 dmc caddy[15741]: LOGNAME=caddy
Jun 09 17:04:39 dmc caddy[15741]: USER=caddy
Jun 09 17:04:39 dmc caddy[15741]: INVOCATION_ID=ece4afb20c8b4b0bb83652c0dda6030e
Jun 09 17:04:39 dmc caddy[15741]: JOURNAL_STREAM=9:29590
Jun 09 17:04:39 dmc caddy[15741]: SYSTEMD_EXEC_PID=15741
Jun 09 17:04:39 dmc caddy[15741]: {"level":"info","ts":1749503079.6635659,"msg":"using config from file","file":"/etc/caddy/Caddyfile"}
Jun 09 17:04:39 dmc caddy[15741]: {"level":"info","ts":1749503079.6655188,"msg":"adapted config to JSON","adapter":"caddyfile"}
Jun 09 17:04:39 dmc caddy[15741]: {"level":"info","ts":1749503079.667991,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//127.0.0.1:2019","//localhost:2019","//[::1]:2019"]}
Jun 09 17:04:39 dmc caddy[15741]: {"level":"warn","ts":1749503079.6683786,"logger":"http.auto_https","msg":"server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server","server_name":"srv0","http_port":80}
Jun 09 17:04:39 dmc caddy[15741]: {"level":"info","ts":1749503079.6684682,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0x40003c4f00"}
Jun 09 17:04:39 dmc caddy[15741]: {"level":"warn","ts":1749503079.6785662,"logger":"http","msg":"HTTP/2 skipped because it requires TLS","network":"tcp","addr":":80"}
Jun 09 17:04:39 dmc caddy[15741]: {"level":"warn","ts":1749503079.678616,"logger":"http","msg":"HTTP/3 skipped because it requires TLS","network":"tcp","addr":":80"}
Jun 09 17:04:39 dmc caddy[15741]: {"level":"info","ts":1749503079.6786275,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
Jun 09 17:04:39 dmc caddy[15741]: {"level":"info","ts":1749503079.679115,"msg":"autosaved config (load with --resume flag)","file":"/var/lib/caddy/.config/caddy/autosave.json"}
Jun 09 17:04:39 dmc caddy[15741]: {"level":"info","ts":1749503079.6792428,"msg":"serving initial configuration"}
Jun 09 17:04:39 dmc systemd[1]: Started caddy.service - Caddy.
Jun 09 17:04:39 dmc caddy[15741]: {"level":"info","ts":1749503079.7324004,"logger":"tls","msg":"cleaning storage unit","storage":"FileStorage:/var/lib/caddy/.local/share/caddy"}
Jun 09 17:04:39 dmc caddy[15741]: {"level":"info","ts":1749503079.737316,"logger":"tls","msg":"finished cleaning storage units"}
Jun 09 17:05:55 dmc caddy[15741]: {"level":"info","ts":1749503155.0381134,"logger":"admin.api","msg":"received request","method":"POST","host":"localhost:2019","uri":"/stop","remote_ip":"127.0.0.1","remote_port":"48872","headers":{"Accept-Encoding":["gzip"],"Content-Length":["0"],"Origin":["http://localhost:2019"],"User-Agent":["Go-http-client/1.1"]}}
Jun 09 17:05:55 dmc caddy[15741]: {"level":"warn","ts":1749503155.0383046,"logger":"admin.api","msg":"exiting; byeee!! 👋"}
Jun 09 17:05:55 dmc caddy[15741]: {"level":"info","ts":1749503155.038388,"logger":"http","msg":"servers shutting down with eternal grace period"}
Jun 09 17:05:55 dmc caddy[15741]: {"level":"info","ts":1749503155.039198,"logger":"admin","msg":"stopped previous server","address":"localhost:2019"}
Jun 09 17:05:55 dmc caddy[15741]: {"level":"info","ts":1749503155.0392752,"logger":"admin.api","msg":"shutdown complete","exit_code":0}
Jun 09 17:05:55 dmc systemd[1]: caddy.service: Deactivated successfully.

3. Caddy version:

e.g.

$ caddy version

v2.10.0 h1:fonubSaQKF1YANl8TXqGcn4IbIRUDdfAkpcsfI/vX5U=

4. How I installed and ran Caddy:

a. System environment:

OS, architecture, relevant versions, systemd? Docker? etc.

e.g.

Stable from here: https://caddyserver.com/docs/install#debian-ubuntu-raspbian

I've only installed up to the Local step.

Stock Debian arm 64 OS on a Raspberry Pi 4b using a 64g micro-sd.

b. Command:
e.g.

Browser: http://localhost:2015
curl -vL http://localhost:2015

c. Service/unit/compose file:

Copy-Paste contents of Caddyfile

d. My complete Caddy config:

Contents of Caddyfile in /home/dmc or home/dmc/caddy

e.g.

localhost:2015 {
respond “Hello, world!”
}
{
debug

5. Links to relevant resources:

Optional, but can help get us on the same page quickly.

When you run into a new problem, just select Help from the menu when creating a new topic - it’ll automatically give you the template. All you have to do is fill in the details:

The more information you provide, especially about your configuration, the easier it is for others to help. Otherwise, it’s mostly guesswork.

Including curl examples of how you tested your setup, along with the responses you received, can also be really helpful.

Cool. Thanks!