Sample setup for self-hosting inside tailscale vpn network with proper https.
- In cloudflare DNS settings assign
*.yourdomain.netto your server's ip address in tailscale network. - Because sites are not publicly available we can't use default letsencrypt challendge to issue tls certificates. We have to use cloudflare api with Caddy plugin. link. Make token and save it in caddy.env
CLOUDFLARE_API_TOKEN="blahblah". - Open up your firewall
sudo ufw allow in on tailscale0 - Manually create docker network so we can use it in multiple docker-compose files
sudo docker network create tunnel-proxy-local