Nginx, Let's Encrypt and Logitech Media Server

Hi all,

Been ages since I was last here - I don’t get time like I once did but lucky for me, my HA install has been rock solid!

I’m wanting to use an iFrame card to embed LMS onto my dashboard but I’m running HTTPS.

I gather if I go unencrypted, then use Nginx for external access, I might be able to get the iFrame working?

How might I go about doing this?

Thanks!

An iframe is just a pointer to the browser on where to find the contents. Little more than

<iframe src="http://192.168.0.42/"></iframe>

Your browser than connects to the URL given and displays it there.

When you connect remotely the contents of the iframe don’t change, and your browser won’t be able to reach the LAN address.

Sorry I probably wasn’t clear enough; I know how it works and I’m not looking for remote access to my LMS through HA; my HA is currently set up for HTTPS so browsers won’t display LMS because it’s HTTP, even internally.

I have three options:

  • Secure LMS via Nginx (I don’t want to do this as for Let’s Encrypt I would need to expose LMS to the internet, which I don’t think is a particularly good idea).

  • Make HA HTTP and use Nginx for SSL (preferred option, though my HA will look a bit less elegant when it shows iFrame errors whilst away from home).

  • Wildcard cert and secure both sites with the same one (still exposes LMS to the internet but saves me having to remove HTTPS and use Nginx for my HA install; app for example will just use one URL).

Assuming the second option is best for me I’m just struggling with how to go back to HTTP; is it as simple as removing the HTTP lines from my configuration.yaml, adding these lines, installing the Nginx addon and pointing it to the cert files that the Let’s Encrypt addon dumps?

I just don’t want to do anything stupid like lock myself out.

Thanks!

Pretty much.

If you do it in stages you can’t lock yourself out:

  1. Remove port forward
  2. Remove ssl lines from HA (use SSH) and restart HA
  3. Verify local http access
  4. Set up NGINX with SSL
  5. Set up port forward to NGINX

You mean from configuration.yaml? Why use SSH?

Thanks!

Yes

Because SSH works when HA doesn’t - and if you have problems you can use SSH to fix things :wink:

1 Like

Got it, thanks. Marked your reply as solution, worked a treat!

1 Like