# Enable https, but still access with local IP

**URL:** https://discourse.nodered.org/t/enable-https-but-still-access-with-local-ip/45417
**Category:** General
**Created:** [10 May 2021 07:39 UTC](https://discourse.nodered.org/t/enable-https-but-still-access-with-local-ip/45417 "2021-05-10T07:39:54Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![fmarzocca](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fmarzocca/32/35901_2.png) [@fmarzocca](https://discourse.nodered.org/u/fmarzocca)
#### Post date: [10 May 2021 07:39 UTC](https://discourse.nodered.org/t/enable-https-but-still-access-with-local-ip/45417/1 "2021-05-10T07:39:54Z")

</div>

How can I setup things so that I connect with https from outside, but still with [http://10.x.x.x](http://10.x.x.x). from LAN?

---

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [10 May 2021 07:59 UTC](https://discourse.nodered.org/t/enable-https-but-still-access-with-local-ip/45417/2 "2021-05-10T07:59:36Z")

</div>

@fmarzocca your question moved to it's own forum topic.

---

<div class="post-metadata">

### Author: ![Ranki](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ranki/32/41282_2.png) [@Ranki](https://discourse.nodered.org/u/Ranki)
#### Post date: [10 May 2021 08:26 UTC](https://discourse.nodered.org/t/enable-https-but-still-access-with-local-ip/45417/3 "2021-05-10T08:26:09Z")

</div>

Hi fmarzocca,

I understand that you want to access via http internally and via http **s** externally (via hostname/ domain) ... I think it should work out of the box. You should keep an eye on the node-red setting « **requireHttps** ». This should be set to « **false** », otherwise node-red tries to forward you every time from http to https and you will get a certificate error.

If you are not talking about node-red you should check the webserver settings. Normally you can set something similar, if https is required/ forced or not.

Cheers  
Ranki

---

<div class="post-metadata">

### Author: ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)
#### Post date: [10 May 2021 08:35 UTC](https://discourse.nodered.org/t/enable-https-but-still-access-with-local-ip/45417/4 "2021-05-10T08:35:21Z")

</div>

There are a couple of options

1. Use something like NGINX as a reverse proxy. You can have NGINX terminate all the HTTPS traffic and then forward requests via HTTP to the internal IP address. This way internal traffic will still be able to access Node-RED directly. Assuming this is a home setup, you then just get your router to forward traffic on port 443 to the NGINX instance. (You will need a domain name setup to get a real HTTPS certificate, probably from letsencrypt. You will also need either a fixed IP address or a dynamic DNS provider)

2. Use a service like [ngrok](https://ngrok.com/) that will generate a tunnel to your Node-RED instance based on a username appended to [ngrok.io](http://ngrok.io).

---

<div class="post-metadata">

### Author: ![fmarzocca](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fmarzocca/32/35901_2.png) [@fmarzocca](https://discourse.nodered.org/u/fmarzocca)
#### Post date: [10 May 2021 08:42 UTC](https://discourse.nodered.org/t/enable-https-but-still-access-with-local-ip/45417/5 "2021-05-10T08:42:29Z")

</div>

I tried this, but it still doesn't work

---

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [10 May 2021 08:47 UTC](https://discourse.nodered.org/t/enable-https-but-still-access-with-local-ip/45417/6 "2021-05-10T08:47:30Z")

</div>

Try accessing it by prefixing the IP address with `https://` - something like [https://192.168.1.8:8443](https://192.168.1.8:8443)  
You should get a browser warning that the https certificate is invalid (because the certificate is issued to your domain name, not your IP), but go ahead and access it anyway.  
You can leave `requirehttps` set to true.

![https](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/4/349f4ea99733f4661eab355e99e5606ea0ec59a6.jpeg)

---

<div class="post-metadata">

### Author: ![fmarzocca](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fmarzocca/32/35901_2.png) [@fmarzocca](https://discourse.nodered.org/u/fmarzocca)
#### Post date: [10 May 2021 09:09 UTC](https://discourse.nodered.org/t/enable-https-but-still-access-with-local-ip/45417/7 "2021-05-10T09:09:53Z")

</div>

yes this works on the browser. But I have few devices that are not able to send notifications over https, so that is a problem...

---

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [10 May 2021 09:12 UTC](https://discourse.nodered.org/t/enable-https-but-still-access-with-local-ip/45417/8 "2021-05-10T09:12:07Z")

</div>

> [@fmarzocca](#):
>
> But I have few devices that are not able to send notifications over https

How are they sending notifications, what format?  
Have you tried them?

---

<div class="post-metadata">

### Author: ![fmarzocca](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fmarzocca/32/35901_2.png) [@fmarzocca](https://discourse.nodered.org/u/fmarzocca)
#### Post date: [10 May 2021 09:14 UTC](https://discourse.nodered.org/t/enable-https-but-still-access-with-local-ip/45417/9 "2021-05-10T09:14:54Z")

</div>

Tasmota Websend. It does not support https and the message fails

---

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [10 May 2021 09:18 UTC](https://discourse.nodered.org/t/enable-https-but-still-access-with-local-ip/45417/10 "2021-05-10T09:18:06Z")

</div>

I've no idea what Tasmota Websend is, so maybe someone else may be able to help you.

---

<div class="post-metadata">

### Author: ![fmarzocca](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fmarzocca/32/35901_2.png) [@fmarzocca](https://discourse.nodered.org/u/fmarzocca)
#### Post date: [10 May 2021 09:19 UTC](https://discourse.nodered.org/t/enable-https-but-still-access-with-local-ip/45417/11 "2021-05-10T09:19:50Z")

</div>

it's just a tcp call to http://

---

<div class="post-metadata">

### Author: ![Ranki](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ranki/32/41282_2.png) [@Ranki](https://discourse.nodered.org/u/Ranki)
#### Post date: [10 May 2021 09:49 UTC](https://discourse.nodered.org/t/enable-https-but-still-access-with-local-ip/45417/12 "2021-05-10T09:49:56Z")

</div>

Hello fmarzocca,

you expect that we help you, may I expect that you deliver a few more information? 🙂

So, you tell me, that you tried this ( I assume the steps in my post with checking the node-red settings and https is not required). Did you try to open your node-red instance with a browser **w/o https**? What error message/ result did you receive?

If you directly tried it with the «websend» thing: What are the results/ error messages, if you receive some ... and: try it with a browser first.

We can only help, if we get some more information and I am pretty sure, a lot of people are interested to support you.

Cheers  
Ranki

---

<div class="post-metadata">

### Author: ![fmarzocca](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fmarzocca/32/35901_2.png) [@fmarzocca](https://discourse.nodered.org/u/fmarzocca)
#### Post date: [10 May 2021 10:14 UTC](https://discourse.nodered.org/t/enable-https-but-still-access-with-local-ip/45417/13 "2021-05-10T10:14:51Z")

</div>

Hi @Ranki , sorry for my previous message but I was in a hurry!  
Yes, I have set requireHttps=false but if I use a browser and try to connect to [http://10.0.0.26:1880](http://10.0.0.26:1880), I get an `ERR_EMPTY_RESPONSE` message. It works with https, even if I get the "invalid certificate" warning.

Concerning the websend, I have fixed it by using mqtt messages from the devices and not letting them send a tcp request.

---

<div class="post-metadata">

### Author: ![Ranki](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ranki/32/41282_2.png) [@Ranki](https://discourse.nodered.org/u/Ranki)
#### Post date: [10 May 2021 10:30 UTC](https://discourse.nodered.org/t/enable-https-but-still-access-with-local-ip/45417/14 "2021-05-10T10:30:42Z")

</div>

Hi fmarzocca,

did you restart node-red after changig the settings?

And in the end: Is your problem now solved? I maybe do not understand the last sentence ...

Cheers  
Ranki

---

<div class="post-metadata">

### Author: ![fmarzocca](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fmarzocca/32/35901_2.png) [@fmarzocca](https://discourse.nodered.org/u/fmarzocca)
#### Post date: [10 May 2021 10:46 UTC](https://discourse.nodered.org/t/enable-https-but-still-access-with-local-ip/45417/15 "2021-05-10T10:46:57Z")

</div>

Yes, I have fixed now. Thank you for your patience!
