Caddy running on Pi, want to send traffic to Mac on the same network

1. The problem I’m having:

hi, all… I’m trying to run Caddy on a raspberry pi, with the I also want to run services on my mac, at The service on the mac runs on port 50000. I’m using Route53 to resolved the DNS. I can’t seem to figure out how to make the mac subdomain go to the mac and everything else go to the pi.

Feel like this should be fairly typical thing to do. But not sure what I’m doing wrong.

2. Error messages and/or full log output:

when I use the command: sudo service caddy restart, I get the following error:

Job for caddy.service failed because the control process exited with error code.
See "systemctl status caddy.service" and "journalctl -xeu caddy.service" for details.

the first command returns:

     Loaded: loaded (/lib/systemd/system/caddy.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Wed 2023-10-25 14:02:57 EDT; 3min 46s ago
    Process: 2011 ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile (code=exited, status=1/FAILURE)
   Main PID: 2011 (code=exited, status=1/FAILURE)
        CPU: 130ms

the second command returns:
no entries

3. Caddy version:


4. How I installed and ran Caddy:

I installed it with this command: sudo apt install caddy -y

a. System environment:

Raspberry Pi
MacOS M1 Mini 14.1
AWS Route53

b. Command:

sudo service caddy restart 

d. My complete Caddy config:


} {
        tls internal
        encode zstd gzip
} {
        encode zstd gzip

5. Links to relevant resources:

This is invalid config, you can only have one global options block.

Which Raspberry Pi are you using? Some versions don’t play well with the .deb install because of the CPU architecture it uses.

It’s Linux raspberrypi 6.1.21-v8+ on a Pi 4. Caddy used to run on it fine, until I tried to muck about it with it. :frowning:

Okay that Pi is new enough that it shouldn’t be a problem.

Did you fix your global options block? Does restarting after that work? I find it surprising that there wouldn’t be any error logs in your systemd output.

Make sure to read Keep Caddy Running — Caddy Documentation

1 Like

The systemctl status command should almost certainly output the most recent logs in addition to the status. If not, that might be a question for a linux forum, as to why…

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