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

  • Sounds like there is already another docker container with the exposed port 445. This has nothing to do with your forwards.

    I think so, I try a numerous times in the past with technodad videos, but always receive errors.

    = Fujitsu PRIMERGY TX1310 M3 • 2 x HDD 3.5" 4TB Western Digital Red • Windows Server 2019 • Hyper-V • OMV 5.x =

    • Official Post

    In the yml file there is no docker section for duckdns. That throws my mind into a tailspin. Last year I put Nextcloud together (with many tears) according to the @TechnoDadLife video duo of Nextcloud/Mariadb and Nextcloud/Letsencrypt/Duckdns. So how does this work without the Duckdns token in the yml? Or maybe the How-to uses a generic version of the yml file and TOKEN needs to be added. Also I set my domain up to use my Duckdns subdomain (lets call it "abc") set up so my Nextcloud address would be abc.duckdns.org. For that I set ONLY-SUBDOMAINS=true. All of that worked great for about six months until I let my cert expire in order to create a fresh install of omv4 on a Odroid hc2, and got my cert but no site. I am still struggling with my config files, but that is for another post.


    I tried to get started on the Docker-compose with a new machine running omv5. Yes, I know it is still beta, and no, I am not committing my family treasures to it yet. I just thought I would start working with it to be ready when omv5 becomes stable. After creating my yml file according to the How-to I went to start it all with docker-compose up -d I got root@m4omv5:/home/docker1/nextcloud# docker-compose up -d/usr/local/bin/docker-compose: line 1: Not: command not found
    I installed docker-compose at the first and did all the steps according to the How-to up to that point.


    What did I do wrong? Is this not intended for omv5?

    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

  • I also had the problem. I solved it by creating a symlink ln -s /usr/bin/docker-compose /usr/local/bin/docker-compose.

    EDIT: This did not survive a reboot.


    So how does this work without the Duckdns token in the yml?

    You only need the token if you choose VALIDATION=duckdns


    In the yml file there is no docker section for duckdns.

    You can add it yourself. Just add this in the docker-compose.yml

    Code
    duckdns:
        image: linuxserver/duckdns
        container_name: duckdns
        environment:
          - PUID=1000 #change according to your user
          - PGID=100  #change according to your user
          - TZ=yourTZ
          - SUBDOMAINS=subdomain1,subdomain2
          - TOKEN=token
        restart: unless-stopped

    Or maybe the How-to uses a generic version of the yml file and TOKEN needs to be added.

    Nope, I guess @macom left it out so you can also use other dyndns-providers.

    • Official Post

    Thank you @Morlan. I will give the symlink a try. Thank you for the other info as well. I guessed that was the case. So why is the symlink necessary in the first place?

    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

    • Official Post

    So why is the symlink necessary in the first place?

    Good question. Never had to use it. Neither in OMV4 nor in OMV5. But it might be that on OMV5 it was not working after enabling portainer and docker in the GUI and that I just installed it again from the CLI with apt-get install docker-compose

    • Official Post

    I ran root@m4omv5:~# ln -s /usr/bin/docker-compose /usr/local/bin/docker-composeln: failed to create symbolic link '/usr/local/bin/docker-compose': File exists
    And I'm still getting root@m4omv5:/home/docker1/nextcloud# docker-compose up -d/usr/local/bin/docker-compose: line 1: Not: command not found

    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

    • Official Post

    I don't know what I'm doing wrong because when I enter docker-compose up -d the response is always /usr/local/bin/docker-compose: line 1: Not: command not found
    I am also unable to create a symlink. The response i receive is ln: failed to create symbolic link '/usr/local/bin/docker-compose': File exists


    I'm running omv 5.0.10-1 with omv-extras 5.1.1 on a NanoPi M4 and everything is running great. If it makes any difference Cockpit still will not install, but I would only use it for the command line so I don't need it.

    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

    • Official Post

    Install it from CLI

    I've done that already...
    root@m4omv5:~# apt-get install docker-composeReading package lists... DoneBuilding dependency tree Reading state information... Donedocker-compose is already the newest version (1.21.0-3).0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

    • Official Post

    Try
    apt-get reinstall docker-compose

    Still no...

    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

    • Official Post

    Oh my! I’m sorry. That’s a new one for me. Can you give me the command for that? Thanks in advance.

    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

    • Official Post

    I googled and I think I figured it out.
    rm or unlink followed by the second part of the previous symlink command.


    Like,
    unlink /usr/local/bin/docker-compose


    I’ll try that later when I get home. (If that’s right?)

    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

  • Hi. Thx for the thread!


    I do have one question:
    How does it work with SSL (https) when I „not“ want to publish the Nextcloud to the internet and don’t want to forward the ports.


    I want to use it solely within my network. Access from outside only via VPN.
    but I want the Nextcloud to be https only.

    • Official Post

    At least I get a different response to docker-compose up -d this time around:


    Code
    root@m4omv5:/home/docker1/nextcloud# docker-compose up -d
    Creating network "nextcloud_default" with the default driver
    ERROR: Failed to program FILTER chain: iptables failed: iptables --wait -I FORWARD -o br-0b1adf19895e -j DOCKER: iptables v1.8.2 (nf_tables):  RULE_INSERT failed (Invalid argument): rule in chain FORWARD
     (exit status 4)

    all I did was run apt-get reinstall docker-compose and then the up -d command above. What have I done now?

    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

  • Hi. Thx for the thread!


    I do have one question:
    How does it work with SSL (https) when I „not“ want to publish the Nextcloud to the internet and don’t want to forward the ports.


    I want to use it solely within my network. Access from outside only via VPN.
    but I want the Nextcloud to be https only.

    Create an exception in your browser to accept the untrusted cert of your local nextcloud. In the docker-compose file delete/comment out the letsencrypt part. Uncomment the 450:443 port expose of nextcloud and access it via https://ip_to_your_server:450

Participate now!

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