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

  • Do you recommend a video or guide to install nextcloud using portainer?

    My vote is ...

    Simple and sure backup and restore: In a Scheduled Job: rsync -av --delete /srv/dev-disk-by-label-SOURCE/ /srv/dev-disk-by-label-DESTINATION/ (HT: Getting Started with OMV5)
    OMV 5 (current) - Hardware: Thinkserver TS140, Nextcloud, Plex, Airsonic, Navidrome, Ubooquity, Digikam, & Heimdall - NanoPi M4 (v.1), backup - Odroid XU4, Pi-Hole (DietPi) - Testing/Playing: hc2, xu4, Pi 3B+, Odroid H2. Mac user trying to convert to Linux on a HP dx2400, Debian 10 XFCE.

  • I think I was able to install it :) but I think I have a problem with my isp router :( I can access nextcloud only outside of my local network.


    I needed to change the proxy_max_temp_file_size from 2048 to 1024.

    Code
    nginx: [emerg] "proxy_max_temp_file_size" directive invalid value in /config/nginx/proxy-confs/nextcloud.subdomain.conf:34
  • I'm trying to access nextcloud from local network. I tried to configure dnsmasq and it replied the ip address of nextcloud host however I still can't access it from local network:

    Code
    ze-mac-2:~ ze$ curl https://nextcloud.mydomain.duckdns.org
    curl: (7) Failed to connect to nextcloud.mydomain.duckdns.org port 443: Connection refused


    There is any setting that I look into?


    My config.php settings:

    Code
    'overwrite.cli.url' => 'https://nextcloud.mydomain.duckdns.org',
    'overwritehost' => 'nextcloud.mydomain.duckdns.org',
    'overwriteprotocol' => 'https',
    'trusted_domains' =>
    array (
    0 => '192.168.1.108:444',
    1 => 'nextcloud.mydomain.duckdns.org',
    ),
  • Did you see this in the docker-compose file:


    Code
    # ports: # uncomment this and the next line if you want to bypass the proxy
    # - 450:443

    so if you un-comment these lines you should have access to your nextcloud from within the network with

    https://ip.of.you.server:450

    in your case you have to replace 450 by 444

  • Did you see this in the docker-compose file:


    Code
    # ports: # uncomment this and the next line if you want to bypass the proxy
    # - 450:443

    so if you un-comment these lines you should have access to your nextcloud from within the network with

    https://ip.of.you.server:450

    in your case you have to replace 450 by 444

    There is any disadvantage enabling it?


    I still want to use the domain but inside my local network.

  • When I uncomment the line I got this error:



    EDIT1:

    Change to port 443 and now it is working but browser tell me it is insecure and that the certificate is invalid.


    Also both mydomain.duckdns.org and nextcloud.mydomain.duckdns.org point to nextcloud.


    EDIT2:

    It looks like I messed up with dnsmasq. I disable dnsmasq and using my router dns I can access my nextcloud :)


    EDIT3: now if I want to have another subdomain for another server it won't work if I use port 443

  • When I send a request to my router on port 443/80 it forward the request to my host, 192.168.1.108:444/81. Then swag got the request and forward it to nextcloud because I have set it on my nextcloud server:

    Code
    'trusted_domains' =>
    array (
    0 => '192.168.1.108:443',
    1 => 'nextcloud.mydomain.duckdns.org',
    ),

    Is that how it work?

  • For some reason, I am unable to get to the Nextcloud interface after installing it. Here is the code that I use in portainer (stacks)



    Also, do I need `swag` if I am using nginx-proxy manager?


    Without swag, is the following code correct for portainer stacks:


    ```

    ```


    I have duckdns installed as a separate container. nginx-proxy will also be used.

    For some reason, the codes don't work. Even though everything installs normally, the WebUI is always unreachable (192.168.1.118:8085 or port 450)


    Have been trying for a few days. Also tried the nextcloudpi method. There too the installation wouldn't get activated. I will greatly appreciate some help in this.

  • Did you forward the ports in the your router?

    Did you also change the config files as described?

    You have to be consistent which method you use: subfolder or subdomain

    Did you check the logs of the containers?

    Did you read and follow the linked trouble shooting guide for letsencrypt (applies also to swag)?

    Is everything is working (no error messages in the container logs) try to reach nextcloud with your domain (without port).

  • Yes to everything, except letsencrypt. I will follow that too. One more thing; instructions say

    • do not place the config folders on a mergerfs mount point

    I have placed config on a unionFS mount point. Is that a problem?


    Another change: I had made a user, user1 when I first installed OMV. I used that user instead of docker1.

  • I have placed config on a unionFS mount point. Is that a problem?

    Yes, there have been several issues.

    Another change: I had made a user, user1 when I first installed OMV. I used that user instead of docker1.

    That is ok. It is just to have a user that is created in the GUI of OMV and you can get a GID and UID of that user.

  • When I send a request to my router on port 443/80 it forward the request to my host, 192.168.1.108:444/81. Then swag got the request and forward it to nextcloud because I have set it on my nextcloud server:

    Code
    'trusted_domains' =>
    array (
    0 => '192.168.1.108:443',
    1 => 'nextcloud.mydomain.duckdns.org',
    ),

    Is that how it work?


    Change my ip and port to this and it seems to be working as supposed.

    Code
    'trusted_domains' =>
    array (
    0 => '192.168.1.108:444',
    1 => 'nextcloud.mydomain.duckdns.org',
    ),

Participate now!

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