Server
vim /etc/caddy/Caddyfile
-----
yourdomain.com {
log {
output file /var/log/caddy/yourdomain.com.log {
roll_size 100MiB
roll_keep 7
roll_keep_for 240h
roll_gzip true
}
}
encode zstd gzip
reverse_proxy /web* http://127.0.0.1:8080
reverse_proxy * http://127.0.0.1:8081
}
-----
Add a namespace “default”
Get headscale api key
Client (OPNsense)
Install tailscale
Start tailscale
Enable route (Server)
Add interface at OPNsense control panel