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

Participate now!

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