Caddy VHosts in Hassio iFrame panels

Hi,

I have Caddy addon on from Repository: Bestlibre Addons repository installed on Hassio and have Nodered, IDE and Terminal addons setup as vhosts in there. I can access all three of these addons by directly going to the vhost urls I’ve put in the config.

I’m trying to add these addons as panel iframes in Hassio so I can access them remotely while logged into my Hassio front-end. Is this possible? I can’t get it to work.

Here’s my Caddy config:

{
  "homeassistant": "a.duckdns.org",
  "vhosts": [
    {
      "vhost": "b.duckdns.org",
      "port": "1880"
    },
    {
      "vhost": "c.duckdns.org",
      "port": "7681"
    },
    {
      "vhost": "d.duckdns.org",
      "port": "8321"
    }
  ],
  "raw_config": [],
  "email": "[email protected]"
}

Here’s my panelIfram config:

panel_iframe:
  ide:
    title: IDE
    icon: mdi:code-braces
    url: https://d.duckdns.org:8321
  nodered_flows:
    title: 'Node-RED Flows'
    url: https://b.duckdns.org:1880
    icon: mdi:nodejs
  terminal:
    title: Terminal
    icon: mdi:console-line
    url: https://c.duckdns.org:7681

Thanks.

Got it. I had the port numbers in my iFrame config. Just had to remove them and it all works now. Off to bed now :slight_smile:

Can Caddy be used in effect as a proxy to redirect to an alternative local IP address as well as port number?

I believe you can by specifying the remote and port config values.

From the addon doco:

remote (str)
Ip or url for the proxified server. If not set default to 172.17.0.1 (docker host)