Let's encrypt doesn't work with MyFritz and Nextcloud

  • Hi,


    I followed the guides here in the forum and by TechnoDadLife to set up Let's encrypt with Nextcloud, as DDNS-provider I'm using MyFritz. In the settings of my FritzBox it's possible to use certificates from let's encrypt automatically for my MyFritz address (something.myfritz.net), I've activated it and it does work if I'm accessing my FritzBox from outside via https://something.myfritz.net:1234.


    I then created a port release for Nextcloud and linked it to MyFritz which worked as well, I can reach my Nextcloud now via myNAS.something.myfritz.net:444. However, the let's encrypt certificate I created before obviously doesn't include this subdomain thus I'm getting a warning message when accessing. Firefox says the certificate comes from linuxserver.io. Further on I set up the letsencrypt-docker, according to docker logs -f letsencrypt everything seems to work, no errors reported. I set the domain to something.myfritz.net and subdomain to myNAS and Let's encrypt seems to create a certificate for myNAS.something.myfritz.net indeed, but when accessing my Nextcloud nothing has changed, the certificate is still not trusted and comes from linuxserver.io. Does anyone have a clue how to get this work?

  • Further infos: My nextcloud and letsencrypt dockers are currently connected to two networks, bridge and my-network like in the video by TechnoDadLife . When I remove my-network from nextcloud, myNAS.something.myfritz.net does not get redirected automatically to myNAS.somethin.myfritz.net like before. Thus I'm getting 502 Bad Gateway when accessing it, but the certificate by Let's encrypt works here. So it looks like either this certificate doesn't include port 444 or it is somehow overwritten by this linuxserver certificate when accessing port 444.


    Furthermore when I'm trying to access https://something.myfritz.net I'm getting a warning now, that its certificate (Let's encrypt) is only valid for myNAS.something.myfritz.net. Otherwise, when I'm trying to access my FritzBox settings via MyFritz (something.myfritz.net:port) the certificate is valid, it looks like this is the certificate I configured in the FritzBox settings directly. I find that a liitle bit weird :/

  • Ok, I found out what was wrong. Because the Nextcloud-adress I got from MyFritz is not like nextcloud.example.com, but nextcloud.something.example.com:444 I thought I had to add the port in the config.php of the Nextcloud docker as well. I removed it now from overwrite.cli.url and overwritehost (but kept it in trusted_domains so far, it seems to make no difference) and now I'm able to access my Nextcloud via myNAS.something.myfritz.net directly, without being redirected to port 444. If I'm calling myNAS.something.myfritz.net:444 now, I'm being redirected to myNAS.something.myfritz.net, where there's a valid certificate :)


    I guess the downside of it may be, that I'm now only able to access a single service (i.e. Nextcloud) of my NAS publicly, because I'm getting essentially the same link by MyFritz for everything on my NAS distiguished only by the trailing ports for which the certificates don't work. For now this is not an issue for me though :thumbup:

  • lapulga

    Added the Label resolved
  • Hi!


    I would like to set up nextcloud on my OMV exactly the same: I have a fritz box with a let's encrypt certificate already signed and I would like to access nextcloud via nextcloud.verylongfritzstrangeaddresswithmany1234.myfritz.net... but how? 😅

    How you solved that?

  • Hi, sorry for the late reply. I just switched to Nextcloud AIO and set it up using the guide here in the forum via a reverse proxy.

    For the proxy I followed this guide:


    The issue I had then was, that I couldn't get an SSL-certificate from Let's encrypt, because the domain nextcloud.xyz.myfritz.net was not registered. I eventually found a trick how to do it without any external DNS service providers:


    • Requirements for the following are, that you created a myfritz-account and got a personal URL xyz.myfritz.net for your Fritzbox and set up a port release for your server (e.g. ports 80 and 443). There are How-To's by AVM for doing this. This will register the URL myserver.xyz.myfritz.net
    • Now go to Internet - Network (Internet - Netzwerk in german, not sure if my translation applies) and rename yourserver in nextcloud (or anything you want in your subdomain)
    • Back to Internet - Releases (Internet - Freigaben) and edit the port release for myserver (pen symbol next to it). Scroll to the bottom, add new release: MyFRITZ!-Release - HTTPS-Server - activate release.
    • This registers nextcloud.xyz.myfritz.net, the release can (and probably should) be removed again. You can repeat this for as many subdomains as you want (?).
  • Hi!!! Thank you very much for your reply!


    In the meantime I did some more experiments (read it as "mess"). I also tried the aio version but had no luck with that, again due to certificates and the fritz url. Eventually I went back to the official OMV installation guide, but removed the swag container. It was quite working, also without the certificate, but it was totally unstable. Also edited the php config files, but it was not consistent.


    I'm going to try again this weekend, but this time with the aio version and following your tips. Are you still using the *.myfritx.net url or something different (duckdns, for example)?

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!