NOOB requesting help working with caddy as revers proxy for nextcloudPi

On PureOS a Debian based Linux
A kind person(online) helped me install Caddy with this docker command:
sudo docker run --name caddy -d -p 8080:80 -p 8443:443 -v /home/sherab/Caddy/config:/config -v /home/sherab/Caddy/data:/data -v /home/sherab/Caddy/config/Caddyfile:/etc/caddy/Caddyfile --restart unless-stopped caddy

here’s how it looks like
07a22eac980b caddy "caddy run --config …" 2 days ago Up 2 days 2019/tcp,>80/tcp,>443/tcp caddy

Caddy is now installed on a machine ( that has a running nextcloudpi instance(with docker).
c8585711b820 ownyourbits/nextcloudpi "/ shera…" 13 months ago Up 3 months>80/tcp,>443/tcp,>4443/tcp nextcloudpi

I have two folders ~/caddy and ~/Caddy
in ~/Caddy/config/Caddyfile I have these two entries: {
} {

When visiting localhost on my browser I get a Caddy works! slanted page.

Now - what should I do next (remeber - noob :slight_smile: )

How do I connect from the outside world to my machines?
Each machine has its own nextcloudpi instance needing a Letsencrypt cert(I undrestand that this is where Caddy as reverse proxy can help)

Domain 1 → (nextcloudpi on this machine is working locally but has no letsencrypt)
Domain 2 → (nextcloudpi on this machine is already working and has letsencrpyt)(prot forwarding is working external 80 & 443 to internal 80 and 443)

I suppose my main problem is not knowing how to prot forward to caddy because caddy is in a docker container - which will have a different IP??

What should I do next
Kind regards

This wiki article will probably help:

(But I don’t use Docker so you’ll have to factor that in.)

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