https for all my subdomains wont work

    • OMV 4.x
    • Resolved

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • https for all my subdomains wont work

      Hi Forum,

      i had this setup 2 weeks ago up and running. Since i had a HW failure, i needed a new MainBoard, CPU and RAM.
      Now to my problem... i cant reach to my Nextcloud, Bitwarden and GiTea over the internet via https.
      All the Containers come up without problem. Logs shows no error...
      I deleted all the Containers and the volumes to see if i can solve the error but nothing.

      i'm desperate searching the error since 1 week allredy... ;( X(

      DuckDNS

      Source Code: docker-compose.yml

      1. version: "2"
      2. services:
      3. duckdns:
      4. image: linuxserver/duckdns
      5. container_name: duckdns
      6. env_file:
      7. - ./duckdns.env
      8. volumes:
      9. - /var/docker/appdata/duckdns/:/config
      10. restart: unless-stopped

      Source Code: duckdns.env

      1. PUID=1001
      2. PGID=100
      3. TZ=Europe/Zurich
      4. SUBDOMAINS=mysubdomain
      5. TOKEN=TOKEN_FROM_DNS_SERVICE_PROVIDER

      Letsencrypt

      Source Code: docker-compose.yml

      1. version: "2"
      2. services:
      3. letsencrypt:
      4. image: linuxserver/letsencrypt
      5. container_name: letsencrypt
      6. cap_add:
      7. - NET_ADMIN
      8. env_file:
      9. - ./letsencrypt.env
      10. volumes:
      11. - /var/docker/appdata/letsencrypt/:/config
      12. depends_on:
      13. - duckdns
      14. networks:
      15. - proxy
      16. ports:
      17. - 444:443
      18. restart: unless-stopped
      19. networks:
      20. proxy:
      Display All

      Source Code: letsencrypt.env

      1. PUID=1001
      2. PGID=100
      3. TZ=Europe/Zurich
      4. URL=mysubdomain.duckdns.org
      5. SUBDOMAINS=wildcard
      6. VALIDATION=duckdns
      7. DUCKDNSTOKEN=TOKEN_FROM_DNS_SERVICE_PROVIDER
      8. EMAIL=EMAIL@EMAIL.COM


      NextCloud

      Source Code: docker-compose.yml

      1. version: "2"
      2. services:
      3. nextcloud:
      4. image: linuxserver/nextcloud
      5. container_name: nextcloud
      6. environment:
      7. - PUID=1001
      8. - PGID=100
      9. - TZ=Europe/Zurich
      10. volumes:
      11. - /var/docker/appdata/nextcloud/config:/config
      12. - /sharedfolders/nextcloud/:/data
      13. ports:
      14. - 445:443
      15. - 82:80
      16. restart: unless-stopped
      17. networks:
      18. default:
      19. external:
      20. name: letsencrypt_proxy
      Display All


      I did also the Modification on the Letsencrypt-ReverseProxy-Conf and on the Nextcloud Conig.php
      looks like this:

      PHP Source Code

      1. <?php
      2. $CONFIG = array (
      3. 'trusted_domains' =>
      4. array (
      5. 0 => '192.168.1.130:445',
      6. 1 => 'nextcloud.mysubdomain.duckdns.org',
      7. ),
      8. 'trusted_proxies' => ['letsencrypt'],
      9. 'overwrite.cli.url' => 'https://nextcloud.mysubdomain.duckdns.org/',
      10. 'overwritehost' => 'nextcloud.mysubdomain.duckdns.org',
      11. 'overwriteprotocol' => 'https',
      12. ...
      13. );
      Display All


      Source Code: nextcloud.subdomain.conf

      1. server {
      2. listen 443 ssl;
      3. listen [::]:443 ssl;
      4. server_name nextcloud.*;
      5. include /config/nginx/ssl.conf;
      6. client_max_body_size 0;
      7. location / {
      8. include /config/nginx/proxy.conf;
      9. resolver 127.0.0.11 valid=30s;
      10. set $upstream_nextcloud nextcloud;
      11. proxy_max_temp_file_size 2048m;
      12. proxy_pass https://$upstream_nextcloud:443;
      13. }
      14. }
      Display All

      many Thanks for the help!

      Regards
      etfraxor
    • I'm not familiar with the network config in your letsencrypt setup:

      Source Code

      1. networks:
      2. proxy:
      Maybe try also using the external network arg as in your nextcloud config. You need to manually create the network before (what you probably already know).

      Source Code

      1. networks:
      2. default:
      3. external:
      4. name: letsencrypt_proxy
    • Hi Morlan,

      thx for your hint.
      normally on my way when I execute the docker-compose up -d then this will create the network lets encrypt_proxy

      When I inspect the docker network, then letsencrypt and nextcloud container are on the same network.

      I think that the problem is on the letsencrypt container. Because by don't activate the reverse proxy-conf on the nginx, and don't make the modification on the config.php of nextcloud, Nextcloud is working with the URL: https://192.168.1.x:445
    • What error message to you get? The nginx "welcome to our server" or something else?

      The network part is important that letsencrypt and nextcloud can commicate over the docker dns-service. But when inspect shows them in the same network this seems fine.

      In the past this argument in the nextcloud.subdomain.conf caused a problem on my machine. Maybe try to comment it out.

      fraxor wrote:

      proxy_max_temp_file_size 2048m;



      Also as a sidenote its recommended practice to use the definitive paths like /srv/dev-disk-by-label-... as a path to your bind mount instead of the /sharedfolder/path

      fraxor wrote:

      volumes:
      - /var/docker/appdata/nextcloud/config:/config
      - /sharedfolders/nextcloud/:/data