APNIC 56 Network Automation tutorial
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Caddy reverse proxy

Setup Caddy web server

Note: This can run alongside NGINX proxy manager but since each server has one IPv4 & public DNS entry points that IPv4/IPv6, you should not run it along with NGINX proxy manager else Letsencrypt will have issues in issuing certificate. Stop and remove NGINX proxy manager before proceeding further.


(U) Step 1 - Create docker-compose.yml for Caddy

version: '3'
services:
  app:
    image: 'caddy:latest'
    restart: unless-stopped
    ports:
      - '80:80'
      - '443:443'      
    volumes:
      - /home/a01/docker/caddy/Caddyfile:/etc/caddy/Caddyfile
      - data:/data
      - config:/config

volumes:
  data:
  config:      

Step 2 - Write Caddyfile

Location: /home/a01/docker/caddy/Caddyfile

smokeping.a01.apnicdemo.the-net.work {
    reverse_proxy 10.10.10.10:8090
}    

Step 3 - Bring up the container

docker-compose up -d


At this stage wait for atleats 30-40 seconds for the TLS certificate process to complete with Letsencrypt and then try to access https://smokeping.a01.apnicdemo.the-net.work