Nextcloud with Letsencrypt using OMV and docker-compose - Q&A

  • Edit the file to comment the "proxy-redirect" part:

    nano nextcloud.subfolder.conf and then put a # in front of that line.

    Code
    proxy_set_header Range $http_range;
    proxy_set_header If-Range $http_if_range;
    # proxy_redirect off; <<<--- Commented or DELETE it completly
    proxy_ssl_session_reuse off;
    }


    Then docker restart swag

  • Hello:


    I have been following this thread for about a month in an attempt to get nextcloud up and running using duckdns.


    At this point I can get to the nextcloud screen only if I enter: https://myomvip:443/nextcloud..


    However, I receive a forbidden message blocking me from accessing nextcloud when I enter: https://mydomain.duckdns.org/nextcloud.


    I suspect there is something in my php file that needs to be changed:



    Any suggestions? thanks.

  • Small NOTICE for those running Nextcloud with "subfolder" (NOT subdomain) access:


    linuxserver made some changes to the "nextcloud.subfolder.conf.sample".


    If no edits were done to the original, to update the the file, you'll need to delete your conf and restart SWAG and then rename the new sample.

    rm -f ...swag/config/nginx/proxy-confs/nextcloud.subfolder.conf

    docker restart swag (you'll lose access to NC but SWAG will download the new sample)

    cp ...swag/config/nginx/proxy-confs/nextcloud.subfolder.conf.sample ...swag/config/nginx/proxy-confs/nextcloud.subfolder.conf

    docker restart swag

    docker logs -f swag (check that no errors occur and see if you regain access to NC)


    Done


    If you previously edited the file, you'll need to redo those edits (take notes of them before deleting the file).

    Apply those edits the the new file after doing the above update.

  • Hi,


    Very random question, whilst doing a few things i noticed my SWAG container had these lives in it

    Code
    Starting 2019/12/30, GeoIP2 databases require personal license key to download. Please retrieve a free license key from MaxMind,,
    and add a new env variable "MAXMINDDB_LICENSE_KEY", set to your license key.

    Do i need to do this?

  • Hi,


    Very random question, whilst doing a few things i noticed my SWAG container had these lives in it

    Code
    Starting 2019/12/30, GeoIP2 databases require personal license key to download. Please retrieve a free license key from MaxMind,,
    and add a new env variable "MAXMINDDB_LICENSE_KEY", set to your license key.

    Do i need to do this?

    I personally never have.

    Air Conditioners are a lot like PC's... They work great until you open Windows.


  • hello everyone !

    i have been using nextcloud for a couple of years with no problems until i updated not knowing that you can't jump versions...

    so i had to reinstall everything, unfortunately my previous method explained by DBtech is no longer working, so i have been following this guide.

    the only problem is that i would like to access my nextcloud directly without a subdomain or a subfolder, as in directly go to https://example.duckdns.org instead of something like https://nextcloud.example.duckdns.org.

    that's how it was working before but it was using letsencrypt instead of swag i don't know if that makes a difference.

    this is my what i tried but unfortunately i still have the welcome to your swag site page instead of nextcloud



    does someone know how to modify config files to make it work ?

    Code
    thanks a bunch !
  • If you followed the guide from macom , the port that you use on the #13 is 450 (https://LANomvIP:450)

    Beeing blocked by external access means your SWAG/duckDNS config is not OK.


    Post your YML here, hiding sensible data, so to have a better idea of where it's failing.

    Also the output of the logs can help:

    docker logs -f swag

    docker logs -f nextcloud



    The same as above, your YML will help.

  • Soma:


    I started over using the two part method in this post by KM0201. I am using Duckdns. I can log into Nextcloud after deploying the Nextcloud portion of KM0201's guide.


    However, when I proceed to the second portion to set up swag, I cannot reach the swag park page when I navigate to https://www,mysubdomain.duckdns.org. When I navigate to that page I receive the following message:

    Forbidden


    Your client does not have permission to get this page from this server.


    I can reach the swag park page when I navigate to https://myomvip:444.


    For this go round, I have stopped at this point and not moved on to the other steps to configure the reverse proxy given that I should be able to reach swag from https://www,mysubdomain.duckdns.org first.


    My ymls and log files are below. What does the following language mean in the swag log?:

    Code
    the resulting certificate will only cover the subdomains due to a limitation of duckdns, so it is advised to set the root location to use www.subdomain.duckdns.org



    Thanks for responding.


    Nextcloud yml:


    Swag yml:

    Nextcloud log:


    swag log:

  • Edit: Nevermind... I misread the prolem.


    I'm getting ready for work.. I"ll try to take a look at this in a bit.

    Air Conditioners are a lot like PC's... They work great until you open Windows.


  • sonnyhill


    It'll be a bit before I can look at it, but can you post your nextcloud config.php file.


    I suspect it is not set up properly. I haven't tested those instructions in a while but they should still 100% work, as it's a pretty basic setup. It also sounds likely that swag is not getting a key, so check your port forwarding is right as well

    Air Conditioners are a lot like PC's... They work great until you open Windows.


  • sonnyhill


    Wait, I think I see the problem. You're not routing nextcloud through swag's network. Line 6 of your nextcloud compose file... you need to remove those ## signs, and then redploy. Step 16 in the instructions.


    If it still doesn't work, post your config.php

    Air Conditioners are a lot like PC's... They work great until you open Windows.


  • Thanks KM0201. I have been able to access Nextcloud outside of my lan, using a subfolder configuration so I believe my port forwarding is correct: 443 to 444 and 80 to 81.


    config .php:


  • Thanks KM0201. I have been able to access Nextcloud outside of my lan, using a subfolder configuration so I believe my port forwarding is correct: 443 to 444 and 80 to 81.


    config .php:


    If that is your nextcloud config.php.... No it's not even close to right. I went over this in pretty detailed fashion in that write up and even posted an example of one that is right.. You need to read it again


    And as said above, your network isn't right if that is your nextcloud stack.

    Air Conditioners are a lot like PC's... They work great until you open Windows.


  • KM0201, I stopped at step 11 in the instructions where it says:


    11. When your key is successfully received, you can navigate to https://www.YOUR-SUBDOMAIN.duckdns.org and you should see the swag park page secured with SSL (padlock by the URL). This tells you the reverse proxy is set up properly. Now, we simply need to route nextcloud through the swag container. Note: If you have made several failed attempts to get a key, and the log throws an error that it could not retrieve a key due to to many attempts, see this post for a simple fix, then redeploy the stack.


    I get a "Forbidden" message when I navigate to https://www.mysubdomain.duckdns.org, I do not see the swag park page. I did not go further than step 11. In other words, I did not remove the ".sample" from the .conf file in the swag nginx folder or edit the nextcloud .php file.


    From the logs, it appears that a certificate was issued. How can you tell whether swag is getting a key?

Participate now!

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