# HTTS - with cerbot

**URL:** <https://dietpi.com/forum/t/htts-with-cerbot/18687>\
**Category:** Troubleshooting\
**Created:** [18 December 2023 21:46 UTC](https://dietpi.com/forum/t/htts-with-cerbot/18687 "2023-12-18T21:46:36Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![miloose](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@miloose](https://dietpi.com/forum/u/miloose)\
**Post date:** [18 December 2023 21:46 UTC](https://dietpi.com/forum/t/htts-with-cerbot/18687/1 "2023-12-18T21:46:36Z")

</div>

Hi,  
I try to configure certbot as this page says : [https://dietpi.com/docs/software/system\_security/#lets-encrypt](https://dietpi.com/docs/software/system_security/#lets-encrypt)

 ![71970f97f99d0da939d3de31937a296d47398a49](https://dietpi.com/forum/uploads/default/original/2X/6/6d24f46b33e43fbfdcb82d80e69fbfb571214ba7.png)

And when I try to connect to my server using https, it’s not working ([https://my-ip/nextcloud](https://my-ip/nextcloud) ; [https://my-ip/8123](https://my-ip/8123), …)

For nextcloud I have this message :  
“Warning: Probable security risk Firefox detected a potential security threat and did not pursue xxx.xx.xxx.xxx. If you access this site, attackers could steal information such as passwords, emails, or credit card details. What can you do? The problem is probably with the website, so you can’t fix it. You can report this to the people who administer the site.”  
And after I can access to nextcloud

For Home Assistant I have this message :  
“Secure Connection Failed An error occurred while connecting to xxx.xx.xxx.xxx:8123. SSL received a record that exceeds the maximum allowed length. Error Code: SSL\_ERROR\_RX\_RECORD\_TOO\_LONG The page you are trying to view cannot be viewed because the authenticity of the data received cannot be verified. Please contact the website owners to inform them of this issue.”  
But I can’t access to Home Assitant.

All my port are forwarded in my router config (sfr in France) especially 80 and 443.

I use [no-ip.com](http://no-ip.com) to have personalize ddns (and https works for nextcloud, rutorrent, freshrss but not for webmin, home assistant, … and I don’t know why).

It could be cool if someone can help me.

PS : maybe I’m not clear in my explanation, tell me if you want more precision.

Regards

#### Required Information

- DietPi version | 8.25.1`
- Distro version | Book Worl
- Kernel version | Linux DietPi 6.1.0-16-amd64 #1 SMP PREEMPT\_DYNAMIC Debian 6.1.67-1 (2023-12-12) x86\_64 GNU/Linux
- SBC model | `Native PC (x86\_64)

---

<div class="post-metadata">

**Author:** ![Jappe](https://dietpi.com/forum/user_avatar/dietpi.com/jappe/32/1788_2.png) [@Jappe](https://dietpi.com/forum/u/Jappe)\
**Post date:** [19 December 2023 06:34 UTC](https://dietpi.com/forum/t/htts-with-cerbot/18687/2 "2023-12-19T06:34:54Z")

</div>

Some browsers

> [@miloose](#):
>
> “Warning: Probable security risk Firefox detected a potential security threat and did not pursue xxx.xx.xxx.xxx. If you access this site, attackers could steal information such as passwords, emails, or credit card details.

Probably a warning because of the self signed (cert or) certificate.

> [@miloose](#):
>
> Secure Connection Failed An error occurred while connecting to xxx.xx.xxx.xxx:8123

Https works on port 443, not 8123

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [19 December 2023 09:19 UTC](https://dietpi.com/forum/t/htts-with-cerbot/18687/3 "2023-12-19T09:19:55Z")

</div>

> [@Jappe](#):
>
> > [@miloose](#):
> >
> > Secure Connection Failed An error occurred while connecting to xxx.xx.xxx.xxx:8123
> 
> Https works on port 443, not 8123

This depends on the app. Individual apps could have own SSL ports 😉  
Question is if OP configured HTTPS on HA?? Or if he is just trying to connect assuming it would work ootb. I guess it will be needed to setup revers proxy for HA

* * *

> [@Jappe](#):
>
> > [@miloose](#):
> >
> > “Warning: Probable security risk Firefox detected a potential security threat and did not pursue xxx.xx.xxx.xxx. If you access this site, attackers could steal information such as passwords, emails, or credit card details.
> 
> Probably a warning because of the self signed (cert or) certificate.

For Nextcloud, if I understood you don’t use self signed certificate? It’s the one issued by Let’s Encrypt? And you are using the same hostname/ DDNS to connect as you specified within `dietpi-letsencrypt`?

Some years ago I created a very basic how-to [How can I secure connection to nextcloud? - #4 by Joulinar](https://dietpi.com/forum/t/how-can-i-secure-connection-to-nextcloud/3820/4)

---

<div class="post-metadata">

**Author:** ![Jappe](https://dietpi.com/forum/user_avatar/dietpi.com/jappe/32/1788_2.png) [@Jappe](https://dietpi.com/forum/u/Jappe)\
**Post date:** [19 December 2023 09:34 UTC](https://dietpi.com/forum/t/htts-with-cerbot/18687/4 "2023-12-19T09:34:32Z")

</div>

> [@Joulinar](#):
>
> This depends on the app. Individual apps could have own SSL ports 😉  
> Question is if OP configured HTTPS on HA?? Or if he is just trying to connect assuming it would work ootb. I guess it will be needed to setup revers proxy for HA

Or you tell HA where your certs are, then it should work also on port 8123:  
[https://www.home-assistant.io/integrations/http/#ssl\_certificate](https://www.home-assistant.io/integrations/http/#ssl_certificate)

---

<div class="post-metadata">

**Author:** ![miloose](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@miloose](https://dietpi.com/forum/u/miloose)\
**Post date:** [19 December 2023 20:15 UTC](https://dietpi.com/forum/t/htts-with-cerbot/18687/5 "2023-12-19T20:15:35Z")

</div>

Hi,  
Thank you for all of you for yours answers.

But I think my level in networks configuration is too poor. And I’m sorry but I don’t understand anything.

I think I can’t use no-ip to connect to my dietpi’s home assistant with this kind of web adress : [https://noipadress.com:8126](https://noipadress.com:8126) like my nextcloud ([https://noipadress.com/nextcloud](https://noipadress.com/nextcloud)).

Thank you  
Regards

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [20 December 2023 09:31 UTC](https://dietpi.com/forum/t/htts-with-cerbot/18687/6 "2023-12-20T09:31:59Z")

</div>

> [@miloose](#):
>
> I think I can’t use no-ip to connect to my dietpi’s home assistant

This is not correct. Your DDNS service has nothing to do with your applications that you want to reach from the Internet. DDNS is just a translation of your external Internet IP address into a readable hostname. It also enables the creation of SSL certificates. Which app you use is entirely up to you. It can be anything.

It’s best if we work on your challenges one by one. Let’s start with Nextcloud. Are you able to access your NC instance from the internet?

---

<div class="post-metadata">

**Author:** ![Jappe](https://dietpi.com/forum/user_avatar/dietpi.com/jappe/32/1788_2.png) [@Jappe](https://dietpi.com/forum/u/Jappe)\
**Post date:** [20 December 2023 09:37 UTC](https://dietpi.com/forum/t/htts-with-cerbot/18687/7 "2023-12-20T09:37:25Z")

</div>

You could forward the port you need (8126) and then connect vai http (not https) like [http://my.dnydns.domain:8126](http://my.dnydns.domain:8126)

---

<div class="post-metadata">

**Author:** ![miloose](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@miloose](https://dietpi.com/forum/u/miloose)\
**Post date:** [20 December 2023 13:25 UTC](https://dietpi.com/forum/t/htts-with-cerbot/18687/8 "2023-12-20T13:25:45Z")

</div>

Hi,  
Thank you @Joulinar & @Jappe for your help.

To Joulinar : I can access eto nextcloud with [http://myip/nextcloud](http://myip/nextcloud) and [https://subdomain.noip.com/netxcloud](https://subdomain.noip.com/netxcloud).  
It alsoworks whith rutorrent, freshrss.

To access to homeassitant it’s work with [http://myip:8123](http://myip:8123) but it doesn’t work whith [https://subdomain.noip.com:8123](https://subdomain.noip.com:8123)

To jappe : I really need to have HTTPS for Home Assistant.

Regards

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [20 December 2023 14:14 UTC](https://dietpi.com/forum/t/htts-with-cerbot/18687/9 "2023-12-20T14:14:04Z")

</div>

ok Nextcloud is working good.

For HA, did you already configured HA to use SSL?

---

<div class="post-metadata">

**Author:** ![Jappe](https://dietpi.com/forum/user_avatar/dietpi.com/jappe/32/1788_2.png) [@Jappe](https://dietpi.com/forum/u/Jappe)\
**Post date:** [20 December 2023 16:27 UTC](https://dietpi.com/forum/t/htts-with-cerbot/18687/10 "2023-12-20T16:27:58Z")

</div>

if not:  
In the `configuration.yaml` you have to modify these settings:

```auto
http:
  ssl_certificate: /etc/letsencrypt/live/YOUR_DOMAIN/fullchain.pem
  ssl_key: /etc/letsencrypt/live/YOUR_DOMAIN/privkey.pem

```

replace `YOUR_DOMAIN` with the actual domain name, then just restart and SLL should be working on port 8123.

---

<div class="post-metadata">

**Author:** ![miloose](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/m/71c47a/32.png) [@miloose](https://dietpi.com/forum/u/miloose)\
**Post date:** [22 December 2023 20:59 UTC](https://dietpi.com/forum/t/htts-with-cerbot/18687/11 "2023-12-22T20:59:26Z")

</div>

Hi,  
Sorry my two daughters are sick last days so I didn’t have time to lock at this.

> [@Joulinar](#):
>
> For HA, did you already configured HA to use SSL?

At " configuration / networks / " it’s wrote [http://myip:8123](http://myip:8123), I have to change this to https ?

@Jappe when I do this I can’t access to HA anymore.  
I try to replace `YOUR_DOMAIN` by :

- [http://myip](http://myip)
- [http://myip:8123](http://myip:8123)
- [https://myip](https://myip)
- [https://myip:8123](https://myip:8123)
- myip
- myip:8123
- [subdomain.noip.com](http://subdomain.noip.com)

I’m loose with it.

---

<div class="post-metadata">

**Author:** ![Jappe](https://dietpi.com/forum/user_avatar/dietpi.com/jappe/32/1788_2.png) [@Jappe](https://dietpi.com/forum/u/Jappe)\
**Post date:** [22 December 2023 21:22 UTC](https://dietpi.com/forum/t/htts-with-cerbot/18687/12 "2023-12-22T21:22:58Z")

</div>

> [@miloose](#):
>
> @Jappe when I do this I can’t access to HA anymore.  
> I try to replace `YOUR_DOMAIN` by :
> 
> - [http://myip](http://myip)
> - [http://myip:8123](http://myip:8123)
> - [https://myip](https://myip)
> - [https://myip:8123](https://myip:8123)
> - myip
> - myip:8123
> - [subdomain.noip.com](http://subdomain.noip.com)
> 
> I’m loose with it.

Put in just the domain, no IPs and no protocols like `https`, no subdomain beforehand (except your are using a dynDNS which can come with a subdomain in the free tiers).  
e.g. `[mydomain.noip.com](http://mydomain.noip.com)’ or ’ [google.com](http://google.com)’
