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

  • old one is

    ## Version 2021/10/26 - Changelog: https://github.com/linuxserver…/root/defaults/proxy.conf


    # Timeout if the real server is dead

    proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;


    # Proxy Connection Settings

    proxy_buffers 32 4k;

    proxy_connect_timeout 240;

    proxy_headers_hash_bucket_size 128;

    proxy_headers_hash_max_size 1024;

    proxy_http_version 1.1;

    proxy_read_timeout 240;

    proxy_redirect http:// $scheme://;

    proxy_send_timeout 240;


    # Proxy Cache and Cookie Settings

    proxy_cache_bypass $cookie_session;

    #proxy_cookie_path / "/; Secure"; # enable at your own risk, may break certain apps

    proxy_no_cache $cookie_session;


    # Proxy Header Settings

    proxy_set_header Connection $connection_upgrade;

    proxy_set_header Early-Data $ssl_early_data;

    proxy_set_header Host $host;

    proxy_set_header Proxy "";

    proxy_set_header Upgrade $http_upgrade;

    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    proxy_set_header X-Forwarded-Host $host;

    proxy_set_header X-Forwarded-Proto https;

    proxy_set_header X-Forwarded-Ssl on;

    proxy_set_header X-Real-IP $remote_addr;



    _______________


    new one is

    ## Version 2021/10/26 - Changelog: https://github.com/linuxserver…/root/defaults/proxy.conf


    # Timeout if the real server is dead

    proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;


    # Proxy Connection Settings

    proxy_buffers 32 4k;

    proxy_connect_timeout 240;

    proxy_headers_hash_bucket_size 128;

    proxy_headers_hash_max_size 1024;

    proxy_http_version 1.1;

    proxy_read_timeout 240;

    proxy_redirect http:// $scheme://;

    proxy_send_timeout 240;


    # Proxy Cache and Cookie Settings

    proxy_cache_bypass $cookie_session;

    #proxy_cookie_path / "/; Secure"; # enable at your own risk, may break certain apps

    proxy_no_cache $cookie_session;


    # Proxy Header Settings

    proxy_set_header Connection $connection_upgrade;

    proxy_set_header Early-Data $ssl_early_data;

    proxy_set_header Host $host;

    proxy_set_header Proxy "";

    proxy_set_header Upgrade $http_upgrade;

    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    proxy_set_header X-Forwarded-Host $host;

    proxy_set_header X-Forwarded-Proto https;

    proxy_set_header X-Forwarded-Ssl on;

    proxy_set_header X-Real-IP $remote_addr;

    Code
    root@fc9b4c690308:/#/config/nginx/proxy.conf
    
    [/EDIT]
    bash: /config/nginx/proxy.conf: Permission denied
    bash: [/EDIT]: No such file or directory
    root@fc9b4c690308:/#^C
    root@fc9b4c690308:/#

    so far working only with the old one

  • so far working only with

    The 2 files you posted are the same, 😉


    The zip file you posted before had the old version.


    If it's OK now, great.

  • Well my mistake yes it is working but only with the old file The second one (2019)

  • Well my mistake yes it is working but only with the old file The second one (2019)

    That makes no sense, the file is for the deceased letsencrypt, not swag.


    What swag version are you running?

  • Nevermind I just recreated the whole thing in a new directory by making a new volume name


    /srv/dev-disk-by-uuid-2e5438fd-633f-4658-82b0-dce4dccd3b97/AppData/Config/letsencrypt

    I changed it to

    /srv/dev-disk-by-uuid-2e5438fd-633f-4658-82b0-dce4dccd3b97/AppData/Config/swag

    And I copy paste my old proxy-confs directory

    everything is ok

    Sorry for the trouble

    • Offizieller Beitrag

    Good lord..lol.


    What instructions are you following to install Nextcloud? Obviously you're trying to set up a reverse proxy.. are you doing this with a domain you've purchased or duckdns or what?


    There's so much crazy in all that I'd suggest starting over... Really Nextcloud should be up and running, w/ a reverse proxy, in less than 30min, easy.

  • Actually I use to have nectcloud at that time no issue but for now I do not have any use of it so I even do not have the container on my new server but of course I am using swag for my other container and I ran into this

    Code
    Just a remark (and reminder, especially for those that run WatchTower or any other updater):
    
    
    SWAG latest (Release 1.20.0-ls94) comes with an important safety update.
    
    If you only update the image, the file in question (proxy.conf) won't be updated.
    
    
    In order to update the file, you'll have to delete the old one and redeploy SWAG to download the latest version of it.

    from Soma since I was following the thread so the Issue was I went a long time ago from letsencrypt to swag and keeping the old directories because I did not want to loose my old custom proxy-confs, everything did work until I try to update today

    everything is fixed since it was not properly installed in first place:)

    • Offizieller Beitrag

    Actually I use to have nectcloud at that time no issue but for now I do not have any use of it so I even do not have the container on my new server but of course I am using swag for my other container and I ran into this

    Code
    Just a remark (and reminder, especially for those that run WatchTower or any other updater):
    
    
    SWAG latest (Release 1.20.0-ls94) comes with an important safety update.
    
    If you only update the image, the file in question (proxy.conf) won't be updated.
    
    
    In order to update the file, you'll have to delete the old one and redeploy SWAG to download the latest version of it.

    from Soma since I was following the thread so the Issue was I went a long time ago from letsencrypt to swag and keeping the old directories because I did not want to loose my old custom proxy-confs, everything did work until I try to update today

    everything is fixed since it was not properly installed in first place:)

    Gotcha. LE has been deprecated for quite some time, so I guess that didn't really dawn on me.


    Glad you got it worked out.

    • Offizieller Beitrag

    NEW NEXTCLOUD UPDATE.

    Version 22.2.1. https://nextcloud.com/blog/kee…-23rc1-is-here-help-test/

    Remember to update from the application itself. Open the notifications and follow the instructions.

    • Offizieller Beitrag

    NEW NEXTCLOUD UPDATE.

    Version 22.2.1. https://nextcloud.com/blog/kee…-23rc1-is-here-help-test/

    Remember to update from the application itself. Open the notifications and follow the instructions.

    If you don't want to use the GUI updater... run the following as root or as a user w/ docker privileges... (I'd already ran it this morning but it goes through the same steps, making a backup, etc.)


    Code
    ken@openmediavault:~$ docker exec -it nextcloud updater.phar
    Nextcloud Updater - version: v20.0.0beta4-11-g68fa0d4
    
    Current version is 22.2.1.
    
    No update available.
    
    Nothing to do.
    ken@openmediavault:~$ 
    • Offizieller Beitrag

    NEXTCLOUD FIXES UPDATE FROM YESTERDAY, NEW VERSION TODAY 22.2.2

    If you installed version 22.2.1 yesterday, you must upgrade to version 22.2.2 released today. Fixed a bug that degraded performance.

    https://nextcloud.com/changelog/

    https://github.com/nextcloud/server/pull/29682

    Remember to update from within the app, don't update the docker.

    • Offizieller Beitrag

    This is why I like to wait a week or two to update container services: let somebody else discover the bugs.

    • Offizieller Beitrag

    NEXTCLOUD FIXES UPDATE FROM YESTERDAY, NEW VERSION TODAY 22.2.2

    If you installed version 22.2.1 yesterday, you must upgrade to version 22.2.2 released today. Fixed a bug that degraded performance.

    https://nextcloud.com/changelog/

    https://github.com/nextcloud/server/pull/29682

    Remember to update from within the app, don't update the docker.

    So why do you say update in the app, and not within docker? It pulls the exact same update and follows the exact same procedure. I've had problems with the GUI updater crashing in the past (granted it has been a while), thus why I usually run it at the command line..


    • Offizieller Beitrag

    This is why I like to wait a week or two to update container services: let somebody else discover the bugs.

    That's certainly good practice. I've generally found with a lot of heavily used, OS software.. legitimate bugs that slip through beta testing, affect a small number of users with some unique situations... same with OMV. I really can't recall votdev pushing a OMV release from beta to to stable, and there was a serious bug that affected a majority of users. Now with my OS (whether it's Debian, Ubuntu, Mint.. )... I usually wait till the first point release... but even when I've been an early adopter.. I've generally found serious bugs that weren't fixed quickly were pretty rare.


    I'd only accessed NC once after updating (and that was right after the update).. so I hadn't noticed any problem with it.

    • Offizieller Beitrag

    So why do you say update in the app, and not within docker?

    I'm not saying "don't update from docker". I say "don't update the Docker".

    I understand that the application update can be done in the GUI within the application or in the CLI within the application. The result will be the same, as you said.

    What I'm saying is don't update the full package in portainer or docker.

    Sorry if my English is not perfect. You know I translate with google. I correct some things but ...

    • Offizieller Beitrag

    Sorry if my English is not perfect. You know I translate with google. I correct some things but ...

    I have an advocate with this issue Re: openmediavault-flushmailq :D

  • Well, some months later. I tried again, now following:

    RE: Nextcloud Bad Gateway

    Ports forwarded (internal 443/80, ext 444/80). I checked are open


    I connected to the duckdns url outside of my network to avoid any loopback issue.

    On step 11, I got the screen "Welcome to your SWAG instance". Is it correct?


    I continued the tutorial, I didn't find major issues till the step 22. When I connect I got "502 Bad Gateway nginx"


    I tried also to change the file nextcloud.subdomain.conf following the instructions of

    Let's Encrypt > NextCloud reverse proxy issues (Bad Gateway / host not found)

    I replaced this


    Code
    #        set $upstream_app nextcloud;
    #        set $upstream_port 443;

    with

    Code
    set $upstream_app 192.168.35.24;
    set $upstream_port 444;
    set $upstream_proto https;


    proxy_pass $upstream_proto://$upstream_app:$upstream_port;


    Then swag was restarted, but problem persists


    How can I solve it?


    Thanks in advance!

    • Offizieller Beitrag

    Is the swag screen secured w/ SSL? That post walks you through everything. You shouldn't need to change anything else to have it working with Duckdns.


    I said very clearly in that post, not to combine it with other tutorials. It walks you through completely what you need to do.


    Also..


    Zitat

    Ports forwarded (internal 443/80, ext 444/80). I checked are open

    That should be 443/80 to 444/81... 443/80 should be external, 444/81 internal

Jetzt mitmachen!

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