Can't access nextcloud on a local network after using certbot

Nextcloud version (eg, 20.0.5): 24.05
Operating system and version (eg, Ubuntu 20.04): 20.04
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.52-1ubuntu4.1
PHP version (eg, 7.4): (unknown)

The issue you are facing:

Is this the first time you’ve seen this error? N:

Steps to replicate it:

  1. install fresh nextcloud.
  2. create SSL cert using nextcloud interface.
  3. can not be accessed via local network when using the new SSL cert domain name. Says Bad ssl cert in every browser.

I am going to skip the rest of the info for now, as this happens on a MUCH earlier version of nextcloud (14) as well, so I feel it’s something with how the certs are created and handled. and sure there is an easy fix.

To be clear. I am NOT making a .local ssl cert.
I created an external domain, Example: nextcloud.test.org
that domain DNS records point to my server, and I have the ports 80, 443, forwarded to the server, and I can access the site from anywhere outside my network.
when on my network, when I type in nextcloud.test.org it browser says there is an ssl cert error.
Is there a fix for this by chance? I’m sure there is, just every search was about a self signed cert, and that’s not what I’m dealing with.

thanks for the help!

First step is to verify DNS points to your internal Nextcloud IP when on your LAN.

we tried to do that VIA editing the host file, but that solution will not work on a grand scale.(we have users who work at home and in the office)

we tried to route our Mikrotik entry’s to point to the internal address, as well as our window’s DNS server, and those did not solve the issue. Same error as above.

I will be closing the ticket out. SOMEHOW it fixed itself. I’m guessing there was maybe a DNS cache issue or something. Thank you for helping!