Not Able to Configure Remote Nextcloud

    • Offizieller Beitrag

    I am trying to set up things to remotely access my local instance of Nextcloud 15. I am able to reach it locally at https://192.168.1.101:444, and I have Letsencrypt running properly with Duckdns - I assume, because I when I go to https://pwh.duckdns.org I get the welcome splash screen stating "Welcome to our server The website is currently being setup under this address." As soon as I create a nextcloud.subdomain.conf file from the given .sample file and restart my containers the welcome page is no longer accessible. I have tried every combination imaginable in configuring my config.php and nextcloud.subdomain.comf files (according to gleanings from these forums, the videos, and the web), and restarting my containers after each version. My local Nextcloud remains accessible after each restart.


    I have built all of my containers using @TechnoDadLife videos, and they all seem to work fine independently. I just cannot get them to work together. Any assistance would be greatly appreciated. If I could get some of you to offer advice or pertinent snippets of config.php and nextcloud.subdomain.conf files it would be greatly appreciated. Thanks in advance.


    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

    Einmal editiert, zuletzt von Agricola () aus folgendem Grund: Trying to get the tags and omv 4 attached

  • Welcome to our server is the Letsencrypt default nginx homepage.


    Your configuration looks ok, but I had a similar problem as you so I fixed it by editing `nextcloud.subdomain.comf`


    This line:


    set $upstream_nexcloud nextcloud; -> set $upstream_nexcloud 192.168.0.20;


    192.168.0.20 being the server localhost IP, strange enough this fixed the problem for me and made nextcloud work.

    • Offizieller Beitrag

    @syrusstk Thanks for the reply. I have seen your comments on another thread and have tried that already. Just now did it again, and restarted letsencrypt and nextcloud containers, and nothing. Sorry.


    I also noticed that you changed the port number on the bottom line to 444. Was that beneficial?

  • @syrusstk Thanks for the reply. I have seen your comments on another thread and have tried that already. Just now did it again, and restarted letsencrypt and nextcloud containers, and nothing. Sorry.


    I also noticed that you changed the port number on the bottom line to 444. Was that beneficial?

    Just had a look over my config seems that it does as the way I am doing it is basically tell the proxy server to route the external 443 to the internal 444, actually maybe just change the 443 to 444 in the last line proxy_pass


    either way here is my config


    xxx is just personal data




    I have seen a lot of issues with this proxy configs, but this way worked for me and all the apps I have are routed like that now, using the internal IP routed to the internal ports.
    Plex, Heimdall, Delunge, Radarr, Sonarr, Jackett, all of them are routed properly.


    To understand my config my server is a laptop connected to a TP-Link Archer C2 router, the only thing I do on the router is just bind the IP address to my laptop so it never changes and open port 443 to the world and port 80 when I need to renew the Letsencrypt certificates, everything else is routed internally via Letsencrypt nginx even OMV

    • Offizieller Beitrag

    @syrusstk That worked but Firefox browser won't allow me to connect, because it claims that I have a self-signed certification, which I do not. The Cert with Letsencrypt is not "self-signed", is it? There was no "exception" button so I could not view the site via Firefox. I was able to access via Safari, Chrome, and Brave browsers after clicking "exception" buttons. Why am I getting "unsecure connection"?


    Anyway, I had my port forward set on my router to 443 -> 450, according to @TechnoDadLife Letsencrypt/Nextcloud video @ 7:00 minutes into the video. So I changed the port forward to 443 -> 444 and changed the upstream_nextcloud:443; to upstream_nextcloud:444; Changing line 13 to my url did not seem to make any difference so I changed it back to "nextcloud" with no ill effect.


    Thanks for the help.

  • First time when I configured my server with letsencrypt and nextcloud, everything worked from the first try but when I reinstalled my server for some reason it gave me a lot of trouble, nginx was not helping spent a full night and still did not manage to make it work.


    Now what i learned playing around with letsencrypt docker, you need port 80 and 443 opened on your router when it tries to get certificates. (And they need to point to letsencrypt ports that you setup in your docker container settings).


    Be sure that you are requesting certificates for your subdomains not the duckdns domain.


    Check the logs and see if letsencrypt managed to get the certificates.


    Below is my server on firefox so no issue with the certificate as far as I know, maybe a clear cache on firefox ?



    • Offizieller Beitrag

    @syrusstk Well I deleted my letsencrypt container, but it will not let me create a new one with port 443 forwarded to 444 because that port forwarding is in use by the nextcloud container.

  • I have left let's encrypt as host, to ports 443 and 80 are used or it, changed my omv to use another port 8080 in my case

    • Offizieller Beitrag

    But what ports are you using for the Nextcloud container?

  • To make a small recap


    Letsencrypt:
    Configured as host
    80:80
    443:443


    OMV
    changed port (in omv general settings -> web administration)
    5454:80


    Nextcloud
    Configured as bridge
    444:443
    91:80


    letsencrypt container manages all routing on my server.
    There is a reason why I chose host, when let's encrypt gets the certificates it needs to run on port 80 on the outside, and it was a hassle to always remap the ports in my router, I chose to change the port of OMV instead.



    //edit


    I just realised one thing I do not use any kind of --network flag in any of my containers, it is either host or bridge.



    Some pics below covered personal info and auto generated paths.

    • Offizieller Beitrag

    @syrusstk Wow! I will have to get my head around that. Ports and networks are like voodoo to me anyway. Now I understand the purpose of the --network flag in the Letsencrypt video. I will try it though in the next day or two. Thank you very much.

    • Offizieller Beitrag

    Well.....
    The first thing I did was attempt to change the omv port to 5454 in the general -> web admin panel. “Simple enough.” I say to myself. When I saved I got an error message, and it froze up. Had to ssh in with “shutdown -h +0”. Good thing I have a backup only 4 days old. Will retry this evening. So is there some trick to changing this setting like stopping all my containers or throwing salt over my shoulder?

    • Offizieller Beitrag

    So...
    I ssh in and run omv-firstaid and get my omv port set to 5454 and am able to access the web interface again. But setting up Letsencrypr container in host mode makes the port forwarding section of the container go away. Does host mode automatically set those ports?

  • So...
    I ssh in and run omv-firstaid and get my omv port set to 5454 and am able to access the web interface again. But setting up Letsencrypr container in host mode makes the port forwarding section of the container go away. Does host mode automatically set those ports?


    In host mode you don't need to remap anything.
    Now port 443 and 80 on your server is handled by letsencrypt container


    Host mode, docker container 80 will be host server port 80, container port 443 will be host server port 443
    Bridge mode: you remap, so container port 80 will be host server port 90, container port 443 will be host server port 445


    In host mode you would just access http and https
    In bridge mode will be http://ip:90 and https://ip:445


    Well.....
    The first thing I did was attempt to change the omv port to 5454 in the general -> web admin panel. “Simple enough.” I say to myself. When I saved I got an error message, and it froze up. Had to ssh in with “shutdown -h +0”. Good thing I have a backup only 4 days old. Will retry this evening. So is there some trick to changing this setting like stopping all my containers or throwing salt over my shoulder?

    Very strange things happening on your server never had a problem changing the port from OMV admin panel, well good that you managed to reset over ssh

    • Offizieller Beitrag

    I finally got Nextcloud to run with Letsencrypt/Duckdns. I thought I would post my sample config.php and nextcloud.subdomain.conf files in case anyone else faces a similar problem. To recap, I am running Nextcloud from a docker install on an Odroid hc2 running omv 4.


    I would like to thank @TechnoDadLife, @syrusstk, and @Nefertiti for the parts they played in this. It was @Nefertiti that added the final piece to the puzzle. After having all of the containers correct I "adjusted" my config.php and nextcloud.subdomain.conf files many multiple times, hoping to strike the correct combination. Restarting containers after each change - without success - I just about gave up. Finally, I was pouring over every detail of a config.php file supplied by @Nefertiti, when I noticed one little detail that I hadn't tried before. It was the next to the last line:



    Code
    proxy_max_temp_file_size 1024m;

    The stock setting shows the size at 2048m. I went back and changed everything else back to-out-of-the-box settings except this one line and it worked. If I unknowingly did something else different, I don't know what it was. Thanks all for your patience.
    sample-config.zip

  • I am currently trying to get past the 'Welcome to our server' screen.


    Still haven't found a fix, but noticed on the config.php sample file you uploaded that the web addresses are all 'nextcloud.subdomain.duckdns.org', not 'subdomain.duckdns.org' as shown in the technodadlife vids. Changing my config file to that didn't make it work, but which way should it be so that when I find the actual problem it will work?

  • I am currently trying to get past the 'Welcome to our server' screen.
    Still haven't found a fix, but noticed on the config.php sample file you uploaded that the web addresses are all 'nextcloud.subdomain.duckdns.org', not 'subdomain.duckdns.org' as shown in the technodadlife vids. Changing my config file to that didn't make it work, but which way should it be so that when I find the actual problem it will work?

    Here what is working for me but also do I noticed we need to remove nextcloud.sample and config.php sample sine sometime the system still want to use them.

    • Offizieller Beitrag

    @aykaydub I think the “nextcloud” subdomain at the front of the url is there because of the way I set up the Letsencrypt docker container. In the ENVIORNMENT SETTINGS there is a line preset for ONLY_SUBMAINS set to “false”.

    In the first video on Letsencrypt that line is changed to “true” and you place your Duckdns subdomains in the SUBDOMAINS line, and “duckdns.org” in the URL line.

    In the second video, the one that sets up Letsencrypt independently, the ONLY_SUBDOMAINS line remains at “false” and the SUBDOMAINS line merely contains “nextcloud” and the URL is changed to “your-subdomain.duckdns.org”.


    I’m fairly certain, if you follow the first Letsencrypt setup, that you can eliminate the “nextcloud” part of the url, but then you have to change your config.php file to match. I had been struggling with the set up for three month, so when I finally landed on something that worked for me I quit trying to eliminate the “Nextcloud”.

  • Hey Guys,
    just wanted to thank you for sharing the information about the process. It helped me a lot setting up Nextcloud/Letsencrypt (also on Odroid HC-2) myself. Yesterday night I struggled for approx. 3 hours to get this work. After several rewrites I just rechecked my config.php and nextcloud.subdomains.conf against the files you provided.


    I changed two things on my file according to @Agricola's nextcloud.subdomains.conf:


    I removed an entry:

    Code
    listen [::]:443 ssl;

    and changed:

    Code
    proxy_max_temp_file_size 2048m;   to   proxy_max_temp_file_size 1024m;


    After that, magically, it worked!

  • Hi guys.


    Hope you all are well. I followed your thread and advice here after two days of battling. Got way further using Virgil's method of changing OMV's default port and setting letsencrypt in host mode.
    One thing I am finding strange is when I try access nextcloud from the outside using chrome it shows me the Welcome to our server screen, when I use Edge for instance it works 100%. Even from my phone, using chrome I get nginx welcome screen, using safari I get my nextcloud site.


    Any ideas?


    Thanks Virgil for the info in this thread, it has helped me a lot, I was about to give up as this drobe me absolutely insane the past two days.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!