Docker nextcloud and letsencrypt

    • OMV 4.x
    • Resolved
    • Docker nextcloud and letsencrypt

      Hello everyone,

      I have a problem with the installation of the letsecnrypt docker, nextcloud and duckdns.

      Nextcloud works perfectly alone, but what I put the docker letsencrypte according to TechnoDad's tutorial, it does not work.

      Here is my installation:




      Shell-Script

      1. root@OMV4-serveur:~# docker logs -f letsencrypt
      2. [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
      3. [s6-init] ensuring user provided files have correct perms...exited 0.
      4. [fix-attrs.d] applying ownership & permissions fixes...
      5. [fix-attrs.d] done.
      6. [cont-init.d] executing container initialization scripts...
      7. [cont-init.d] 10-adduser: executing...
      8. -------------------------------------
      9. _ ()
      10. | | ___ _ __
      11. | | / __| | | / \
      12. | | \__ \ | | | () |
      13. |_| |___/ |_| \__/
      14. Brought to you by linuxserver.io
      15. We gratefully accept donations at:
      16. https://www.linuxserver.io/donate/
      17. -------------------------------------
      18. GID/UID
      19. -------------------------------------
      20. User uid: 1000
      21. User gid: 100
      22. -------------------------------------
      23. [cont-init.d] 10-adduser: exited 0.
      24. [cont-init.d] 20-config: executing...
      25. [cont-init.d] 20-config: exited 0.
      26. [cont-init.d] 30-keygen: executing...
      27. using keys found in /config/keys
      28. [cont-init.d] 30-keygen: exited 0.
      29. [cont-init.d] 50-config: executing...
      30. Variables set:
      31. PUID=1000
      32. PGID=100
      33. TZ=Europe/Zurich
      34. URL=duckdns.org
      35. SUBDOMAINS=darknesse
      36. EXTRA_DOMAINS=
      37. ONLY_SUBDOMAINS=true
      38. DHLEVEL=1024
      39. VALIDATION=http
      40. DNSPLUGIN=
      41. EMAIL=XXXXXXXXXXXXXXXXXXX
      42. STAGING=
      43. 1024 bit DH parameters present
      44. SUBDOMAINS entered, processing
      45. SUBDOMAINS entered, processing
      46. Only subdomains, no URL in cert
      47. Sub-domains processed are: -d darknesse.duckdns.org
      48. E-mail address entered: darknessedesign@gmail.com
      49. http validation is selected
      50. Different validation parameters entered than what was used before. Revoking and deleting existing certificate, and an updated one will be created
      51. Saving debug log to /var/log/letsencrypt/letsencrypt.log
      52. No match found for cert-path /config/etc/letsencrypt/live/nextcloud.darknesse.duckdns.org/fullchain.pem!
      53. Generating new certificate
      54. Saving debug log to /var/log/letsencrypt/letsencrypt.log
      55. Plugins selected: Authenticator standalone, Installer None
      56. Obtaining a new certificate
      57. Performing the following challenges:
      58. http-01 challenge for darknesse.duckdns.org
      59. Waiting for verification...
      60. Cleaning up challenges
      61. IMPORTANT NOTES:
      62. - Congratulations! Your certificate and chain have been saved at:
      63. /etc/letsencrypt/live/darknesse.duckdns.org/fullchain.pem
      64. Your key file has been saved at:
      65. /etc/letsencrypt/live/darknesse.duckdns.org/privkey.pem
      66. Your cert will expire on 2019-05-08. To obtain a new or tweaked
      67. version of this certificate in the future, simply run certbot
      68. again. To non-interactively renew *all* of your certificates, run
      69. "certbot renew"
      70. - Your account credentials have been saved in your Certbot
      71. configuration directory at /etc/letsencrypt. You should make a
      72. secure backup of this folder now. This configuration directory will
      73. also contain certificates and private keys obtained by Certbot so
      74. making regular backups of this folder is ideal.
      75. - If you like Certbot, please consider supporting our work by:
      76. Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
      77. Donating to EFF: https://eff.org/donate-le
      78. New certificate generated; starting nginx
      79. [cont-init.d] 50-config: exited 0.
      80. [cont-init.d] done.
      81. [services.d] starting services
      82. [services.d] done.
      83. Server ready
      84. [cont-finish.d] executing container finish scripts...
      85. [cont-finish.d] done.
      86. [s6-finish] syncing disks.
      87. [s6-finish] sending all processes the TERM signal.
      88. [s6-finish] sending all processes the KILL signal and exiting.
      Display All




      My php file always goes back to the original as soon as I restart the docker letsencrypt, I change the nextcloud. * In darkness * it always comes back in nextcloud. *

      PHP Source Code

      1. # make sure that your dns has a cname set for nextcloud
      2. # assuming this container is called "letsencrypt", edit your nextcloud container's config
      3. # located at /config/www/nextcloud/config/config.php and add the following lines before the ");":
      4. # 'trusted_proxies' => ['letsencrypt'],
      5. # 'overwrite.cli.url' => 'https://nextcloud.your-domain.com/',
      6. # 'overwritehost' => 'nextcloud.your-domain.com',
      7. # 'overwriteprotocol' => 'https',
      8. #
      9. # Also don't forget to add your domain name to the trusted domains array. It should look somewhat like this:
      10. # array (
      11. # 0 => '192.168.0.1:444', # This line may look different on your setup, don't modify it.
      12. # 1 => 'nextcloud.your-domain.com',
      13. # ),
      14. server {
      15. listen 443 ssl;
      16. listen [::]:443 ssl;
      17. server_name nextcloud.*;
      18. include /config/nginx/ssl.conf;
      19. client_max_body_size 0;
      20. location / {
      21. include /config/nginx/proxy.conf;
      22. resolver 127.0.0.11 valid=30s;
      23. set $upstream_nextcloud nextcloud;
      24. proxy_max_temp_file_size 2048m;
      25. proxy_pass https://$upstream_nextcloud:443;
      26. }
      27. }
      Display All


      config-php


      PHP Source Code

      1. <?php
      2. $CONFIG = array (
      3. 'memcache.local' => '\\OC\\Memcache\\APCu',
      4. 'datadirectory' => '/data',
      5. 'instanceid' => 'ocsb6o1wf3zf',
      6. 'passwordsalt' => '+TWoiuK+9filSte1SDRchaP+Adbfco',
      7. 'secret' => 'cvZoGUUgshXRRpNN0YyvmlvdCjcqIx+hy6g+CfpdGX30fPR2',
      8. 'trusted_domains' =>
      9. array (
      10. 0 => '192.168.0.20:444',
      11. 1 => 'darknesse.duckdns.org',
      12. ),
      13. 'overwrite.cli.url' => 'https://darknesse.duckdns.org',
      14. 'overwritehost' => 'darknesse.duckdns.org',
      15. 'overwriteprotocol' => 'https',
      16. 'dbtype' => 'mysql',
      17. 'version' => '15.0.2.0',
      18. 'dbname' => 'nextcloud',
      19. 'dbhost' => '192.168.0.20:33306',
      20. 'dbport' => '',
      21. 'dbtableprefix' => 'oc_',
      22. 'mysql.utf8mb4' => true,
      23. 'dbuser' => 'damien',
      24. 'dbpassword' => 'XXXXXXXXXX',
      25. 'installed' => true,
      26. 'mail_smtpmode' => 'smtp',
      27. 'mail_sendmailmode' => 'smtp',
      28. );
      Display All


      when i go on the address "https://darknesse.duckdns.org" i still have the page.


      Source Code

      1. Welcome to our server
      2. The website is currently being setup under this address.
      3. For help and support, please contact: me@example.com


      Do you see any errors in my installation?

      Because I peeled all the pages of the forum talking about these problems and I did not find anything.
      I also tried the techniques of putting nextcloud.darknesse.duckdns.org in the php file but it did not change anything.Car I saw on the forum that it had worked for some people.


      thank you to those who can help me, because it's been several days since I put my head with it.

      S

      Sorry for my English
      Images
      • Screenshot_2019-02-08 openmediavault control panel - OMV4-serveur local.png

        52.73 kB, 1,276×930, viewed 115 times

      The post was edited 1 time, last by Darknesse ().

    • After several hours of research and hacking in OMV I finally found the solution by peeling the various existing forums on dockers. And the miracle solution is falling on my nose ^^. It was really stupid, but you only had to rename the "nextcloud.subdomain.conf.sample" form to nextcloud.subdomain.conf. All those hours of research for that ..... 8| :D