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

  • I followed the tutortial and after a few tweeks from the Q&A and other threads of this forum, everything was working like a charm for more than a month - until two days ago.
    I was wondering, why my smartphone-app wasn't syncing and so I tried to visit the web-interface, but I couldn't get any connections.


    My configuration:
    Raspi 3+
    OMV 4
    Letsencrypt, Nextcloud and MariaDB in docker (from the tutorial)



    What did I do so far:


    Restarted the docker - no solution


    docker logs -f nextcloud


    Ha! This is new.


    docker exec -it nextcloud bash


    cat etc/php7/php-fpm.d/www.conf

    ... and more commented out but to long for this message.


    cat etc/php7/php-fpm.d/www2.conf

    Code: www2.conf
    ; Edit this file to override www.conf and php-fpm.conf directives and restart the container
    ; Pool name
    [www]

    cat etc/php7/php-fpm.conf

    Code: php-fpm.conf
    @^Yu� /d@^Yu���q
    @^Yu��|@^Yu�E
    o

    Is this the problem? What should be in php-fpm.conf? And if this is the problem, why did it changed by itself? Background-Update?
    To be honest, i'm quite new to OMV/docker/nextcloud.


    Thanks!

  • Hallo,


    after Nextcloud is running well in subfolder mode i tryed to switch to the subdomian "mode".


    After I changed my nextcloud config, changed the proxy-confs, add subdomian in letsencrypt and setup a cname record for my subdomian.


    I got on my Subdomain only to the "Welcome to my Server" page.
    tempsnip.png


    My Network Setup


    cloud.mydomain.de with cname record to mydomain.de
    mydomain.de with dyndns to my fritz.box
    fritzbox with port forwarding

    • port extern 443 to port 444 intern
    • port extern 80 to port 81 intern

    Here is my Docker compose


    My config.php

    Subdomain conf

  • Hey i dont now what happend but now it is working.


    My Letsencrypt Log


    Everything is working fine now.


    Only i cant acess via lokal ip to nextcloud.


    I add already to the config.php


    1 => 'nas.lokal:444',


    I got only to the "Welcome to me Server Site".

  • Hi,


    I am trying to use Redis to speed-up my Nextcloud on OMV5 using docker.


    I have followed the nextcloud documentation to update my config.php file, I have also edited my redis.conf file. My Redis Server is up but synchronisation failed and I have an error : RedisException: No such file or Directory


    Config.php

      'memcache.local' => '\OC\Memcache\APCu',

      'memcache.locking' => '\OC\Memcache\Redis',

      'filelocking.enabled' => true,

      'redis' =>

      array (

        'host' => '/var/run/redis/redis.sock',

    'port' => 0,

    'timeout' => 0.0,

    ),


    I have checked my nextcloud log file and I can not identified where the problem is.


    Does anyone have successfully switched to Redis for memory caching ?


    Thanks for you help

  • Hello,


    i'm trying to use Nextcloud on my fresh OMV 5 installation on RPI 2.


    I'm using the following tutorial: [How-To] Nextcloud with Letsencrypt using OMV and docker-compose


    I follow the instructions but something is wrong during letsencrypt step (I suppose):


    - The following errors were reported by the server:



    my set-up for config.php:


    I know I forgot something but where ;) it's my first experience/install with docker


    Thanks


    cseb

  • Hello,


    I forgot to enter my Dyndns domain address. It's done but doesn't work :(



    Someone has an idea? ;)

    Thanks


    cseb

  • hi,


    the error happens right after run the compos file?

    have you port forward 443 and 80 to your RPI2?

    Hi,


    Just after the command "docker logs -f letsencrypt".


    Into "docker-compose.yml" file I have:

    Code
    ports:
    - 444:443
    - 81:80

    config.php:

    Code
    'overwritewebroot' => '/nextcloud',
    'overwrite.cli.url' => 'https://cseb.is-gone.com/nextcloud',
    'trusted_domains' =>
    array (
    0 => 'cseb.is-gone.com:443',
    ),


    On my router:



    Thanks


    cseb

  • hm hm

    if i try to connect

    Code
    cseb.is-gone.com

    i can get your OMV so i just wondering, cause, your omv will listen to port 80 for http if you haven't change it, and your config say you forward port 80 extern to port 81 in your network - and on 81 in your network is the letsencrypt listen container listen to - so: if i try to connect i have to reach your letsencrypt proxy OR have to get an error like page not available.


    don't know your router, but dobblecheck the settings, maybe reboot it and recheck the settings - for me it looks like that letsencrypt can't do the needed checks on http and https to verify your domain and sign your certificate.

  • Hi everyone,


    in case you want to connect for syncing your Nextcloud with a local LAN connection as well as out of your local LAN ( via duckDNS,spDYN,etc.), the following config adjusting works for me.

    To enable a local connection, you have to forward the exposed Docker port 443 (80 if needed) to your wished port - here 444. The Nextcloud config needs little adjustment as well. Add your OMV IP with respective Nextcloud Docker port to the trusted_domain array.

    Code
    trusted_domains' =>
    array (
    0 => 'your.domain-Nextcloud.com', //here should be your DuckDNS/DNSprovier Domain
    1 => '192.168.2.3:444', //here should be the IP of your OMV with respective Nextcloud docker port forwarding
    ),

    Furthermore, when you follow the provided instructions on how to setup the linuxserver/letsencrypt, you have to add following lines to your Nextcloud config:

    Code
    # make sure that your dns has a cname set for nextcloud
    # assuming this container is called "letsencrypt", edit your nextcloud container's config
    # located at /config/www/nextcloud/config/config.php and add the following lines before the ");":
    # 'trusted_proxies' => ['letsencrypt'],
    # 'overwrite.cli.url' => 'https://nextcloud.your-domain.com/',
    # 'overwritehost' => 'nextcloud.your-domain.com',
    # 'overwriteprotocol' => 'https',

    Here you have to change the 'overwrite.cli.url entry and delet or mark as comment overwritehost in the Nextcloud config:

    Code
    'overwrite.cli.url' => 'https', //instead of 'https://nextcloud.your-domain.com/'
    'overwritehost' => 'nextcloud.your-domain.com', <- delete this line or marks as a comment

    Restart your Nextcloud Docker.


    Now you should be able to open Nextcloud with your local IP as well with your own domain. But be aware, if you log in locally and share a folder/file, the created link will be with your local IP and therefore not accessible from outside of your network. You can either replace the IP from the created link with your domain

    Code
    locally created shared link:
    https://192.168.2.3:444/s/jkyY6jP2dnzDdEF
    replace the IP with your domain to make link accessible for public:
    https://your.domain-Nextcloud.com/s/jkyY6jP2dnzDdEF

    or you have to login with your domain on Nextcloud and create the share link from there.

  • Hi

    I'm trying to follow this guide (many thanks for putting it together!) on a RPI4 with OMV5. I've installed the docker images, and got to the point where I check the Letsencrypt logs with docker logs -f letsencrypt. I see invalid response error messages for all domains that were checked; at the end it says 'ERROR: Cert does not exist! Please see the validation error above. The issue may be due to incorrect dns or port forwarding settings. Please fix your settings and recreate the container'.


    I'm installing with duckdns (I've followed these instructions) and a subdomain (followed these instructions). I'm very new to all of this, and I don't know where to start looking for an answer. I've checked the docker-compose yml, and can find no error. I've followed the instructions for my router to configure port forwarding, but I don't know how to test if the configuration is correct. Could you please help?

  • There are already some errors. 80-81 means that you opened a range of ports.

    Also I need some more detailed infos. Can you show a screenshot of the options window when press edit of the http-server and https-server?

    Did you follow the guide regards the port assignments of the docker containers?


    Mine looks likes this:

Participate now!

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