If you installed Caddy with apt
, then you’ll already have a Caddy instance running via a systemd service, using port 80.
You can find the config file for that service at /etc/caddy/Caddyfile
and the service file at /lib/systemd/system/caddy.service
.
I would recommend running Caddy using the service instead of the reverse-proxy
command. It’s very simple. You’ll just need to replace the contents of /etc/caddy/Caddyfile
with something like this:
domain.com {
reverse_proxy 127.0.0.1:8096
}
Then you’ll need to reload the Caddy instance with the new config by running the following:
sudo systemctl reload caddy
And you should be good to go. You can check the logs with:
journalctl --no-pager -u caddy | less