Seeking assistance setting up traefik with wireguard server
I'm hoping someone can help me figure out what I'm doing wrong.
I have a VM on my local network that has Traefik, 2 apps (whomai and myapp), and wireguard in server mode (let's call this VM "server"). I have another VM on the same network with Traefik and wireguard in client mode (let's call this VM "client").
both VMs can can ping each other using their VPN IP addresses
wireguard successfully handshakes
I have myapp.mydomain.com as a host override on my router so every computer in my house points it to "client"
when I run curl -L --header 'Host: myapp.mydomain.com' from the myapp container it successfully returns the myapp page.
But when I browse to http://myapp.mydomain.com I get "Internal Server Error", yet nothing appears in the docker logs for any app (neither traefik container, neither wireguard container, nor the myapp container).
You'll have to give more details. Where are you browsing from? How is the tunnel between the VMs relevant? Are the VMs' IPs routed on the LAN? Is myapp.mydomain.com defined in a DNS server, and if so which? Is it the DNS server on the LAN or a public DNS? Do both VM and the machine you're browsing from resolve that address to the same IP, and is that IP reachable from the browser machine?
I'm browsing from my laptop on the same network as promox: 192.168.1.0/24
The tunnel is relevant in that my ultimate goal will be to have "client" in the cloud so I can access my apps from the world while having all traffic into my house be through a VPN.
The VM's IPs are 192.168.1.50 ("server") and 192.168.1.51 ("client"). They can see everything on their subnet and everything on their subnet can see them.
Everything is using my router for DNS, and my router points myapp.mydomain.com and whoami.mydomain.com to “client”. And by "everything" I mean all computers on the subnet and all containers in this project.
Both VMs and my laptop resolve myapp.mydomain.com and whoami.mydomain.com to 192.168.1.51, which is "client", and can ping it.
THanks for your help. My main issue ended up being that I was trying to use Let's Encrypt's staging mode, but since staging certs are self-signed, Traefik was not accepting the requests. Also, though I had to switch Traefik's logging level to Info instead of error to see that.
Both traefik containers (on the "server" and "client" VMs) and the wireguard server container were built with TRAEFIK_NETWORK_MODE=host. The VMs can ping each other and the Wireguard containers can ping each other.
Both traefik containers were built with TRAEFIK_LOG_LEVEL=warn but I changed them both to TRAEFIK_LOG_LEVEL=info just now. There's a tad more info in the logs, but nothing that seems pertinent.