When you say “on each device” you mean this configuration would refer to the services running on that device right? Not that every client device needs to have this set up?
The device that runs multiple services will set that up, yes. Not the client.
All my web services use apache or lighttd. Do I use caddy just for this or do I have to figure out how to move each of them to use this web server?
Apache and lighttpd can both do the same thing that Caddy does (multiplex many services via subdomain names on port 80). Caddy is just simpler and hence recommended.
You can move all services to use Caddy, takes some learning but overall better. Alternatively, if you already set up apache/lighttpd for each of your services, you can put Caddy in front and do something like
http://service1.devicename.lan/ { tls off reverse_proxy localhost:<port-that-apache-listens-on> }
Also does it work for non-web services, like ssh or samba? (Which wasn’t in my original question, I only thought of it now.)
No. Also, those should be running on their dedicated ports anyways
laserjet@lemmy.dbzer0.com
kossa@feddit.org 1 day ago
No, your services stay basically untouched. They still need to deliver their content via a webserver. But instead of delivering it straight to your browser, they now pass it to your reverse proxy (caddy), which delivers it to you.