Daemon log with brew services caddy

1. Caddy version (caddy version):


2. How I run Caddy:

brew services start caddy

a. System environment:

macOS catalina

b. Command:

brew services start caddy

c. Service/unit/compose file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">

d. My complete Caddyfile or JSON config:

paste config here, replacing this text
DO NOT REDACT anything except credentials

3. The problem I’m having:

this is global options

  # acme_ca "https://acme-staging-v02.api.letsencrypt.org/directory"
import sites-enabled/*.caddy

log directive is for site, how to view daemon log when started caddy with brew services.

everytime i want to see the log, i have to stop caddy service, and copy commands from plist or type

caddy run --config /usr/local/etc/Caddyfile

A quick Google search gave me this answer:

I don’t use a Mac so your mileage may vary.

Please note that you’re using an older version of Caddy, please upgrade to v2.1.1


you remind me i can customize the stdout, stderr path.

just send a pr, before pr merged,
here is my solution:

you can just go to brew --cellar caddy folder and edit homebrew.mxcl.caddy.plist and add


after RunAtLoad.

then brew services restart caddy

tail -f /usr/local/var/log/caddy.log

1 Like