Yet another reverse SSH tunnel question - 404: Not Found


The issue is when I attempt to access my I get 404: Not Found
If I run it on my local network it works just fine.

What have I attempted to do:

  1. Manually installed Home Assistant onto a Raspi using virtualenv(behind ISP NAT).
  2. SSH reverse proxy from Home assistant device to Cloud machine(has public IP and assigned to domain name)
  3. On cloud machine there is Caddy which reverse proxies the https request and forward the request to the Raspi with Haas.

More details
On Raspi haas device I’ve manually installed autossh and created a service. However for testing i’m using an ssh cmd like this(I can see the connection made on the Cloud machine):

ssh -i /home/pi/.ssh/ssh-key-2020-10-21.key -R 8888:localhost:8123 ubuntu@mypublicip

My Caddyfile: {
    reverse_proxy * localhost:8888

What am I missing? :frowning:


Is this a copy paste error in your Caddy file?

Shouldn’t it be:

Not sure. no? DuckDNS doesn’t do folders does it? Shouldn’t it be a sub domain? That is how my caddy works.

Woah that really helped David! Thanks!

Part of the solution was removing the ‘/haas’ at the end so now my domain looks just like

The other big issue was that the Oracle cloud instance I’m running seems to reset it’s iptables(I’m not aware of the when/why). Suddenly the machine will be inaccessible via port 80 + 443. Using iptables-persistent sorted that out.


In case you want to do this with an HA addon, I’ve written a guide and published an add-on, just for this.