I am following this this tutorial to try and get NextCloud working remotely, but I am getting a "refuse to connect" error when trying to access Nextcloud through my domain.
During setup of everything, I get an error (another post) when I tried to add --network my-net to Extra arguments both in the nextcloud and letsencrypt containers. For the letsencrypt container, however, I am successfully able to add --cap-add=NET_ADMIN to Extra arguments. From my previous thread I created, I am pretty sure that the work around to the Extra arguments error I got was to go to the tab Networks in Docker, and then click on my-net to highlight it, and then click "Connect," and choose "nextcloud", leave everything else blank, and click save. And then do it all again and choose "letsencrypt." Then under "containers" in my-net, it shows "nextcloud,letsencrypt". This is the correct thing to do, right? If not, maybe that's what is causing me to not connect to my Nextcloud with my dns domain?
Another thing that happens, and doesn't go according to what the tutorial shows, is when I go to create certificates using the command docker logs -f letsencrypt. I do get (my DNS domain redacted):
However, after it says, "If you like Certbot, please consider supporting our work by" (and then some websites), this is what happens:
nginx: [alert] detected a LuaJIT version which is not OpenResty's; many optimizations will be disabled and performance will be compromised (see https://github.com/openresty/luajit2 for OpenResty's LuaJIT or, even better, consider using the OpenResty releases from https://openresty.org/en/download.html)nginx: [error] lua_load_resty_core failed to load the resty.core module from https://github.com/openresty/lua-resty-core; ensure you are using an OpenResty release from https://openresty.org/en/download.html (rc: 2, reason: module 'resty.core' not found:
I checked \AppData\Letsencrypt\etc\letsencrypt\live\myserver.domain.org and see fullchain.pem and privkey.pem there. At this point, if I use a port checker tool, ports 80 and 443 are open, and I can go to my domain in my browser and it shows "Welcome to our server". As soon as I edit nextcloud.subdomain.conf.sample and save it as nextcloud.subdomain.conf and restart the letsencrypt container, port 80 & 443 are blocked and my domain I'm trying to access refuses to connect. But I can continue to get into my Nexcloud using https://localipaddress:444. Here is everything that it is in my nextcloud.subdomain.conf file (it looks slightly different than what's in the video; it has an extra line with listen [::]:443 ssl;
If I continue with the tutorial and navigate to /sharedfolders/AppData/Nextcloud/www/nextcloud/config/ and try to open the config.php file with Notepad ++, it says "Can not open file." So I have to navigate to the config folder and use nano to edit config.php. After this, I still get a refuse to connect error, but I also can't get into my Nextcloud with the local IP address (it redirects to the subdomain, as expected after changed the config.php file).
So how do I narrow down where the problem is, and where do I begin to fix it?