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

  • Thanks, thanks really thanks Soma!

    I solved it oh my god, it works! I'm almost crying :)

    I have to execute the shell inside the container and there start the occ files:scan...

    Maybe doing these things at 2 a.m. is not good... but this is the moment my family give me :D

    I think I have to understand better and better how containers work (but that's why I've built this homelab).

  • First, the mariadb "latest", which is implied in your yml runs on mariabionic, which is incompatible (will give you errors on NC) with the "latest" version of NC (v21).


    You'll need to recreate the stack with a tag added to mariadb:

    image: ghcr.io/linuxserver/mariadb:alpine

    maybe this part could be placed into the how-to, because actually the docker config there posted, does not work... what do you think?

    • Offizieller Beitrag

    First, the mariadb "latest", which is implied in your yml runs on mariabionic, which is incompatible (will give you errors on NC) with the "latest" version of NC (v21).

    Is this something unique to SBC's?


    I've always used mariadb:latest and have never had a problem and just tested it in a virtual machine and had it going in 5min. :latest definitely pulled the ubuntu version





    I do agree though, it sounds like he's running those commands on the host rather than bashing into the container (OP, see example above on how to bash into the container)

  • Is this something unique to SBC's?

    That's a good question:/


    When I was on NC v20, there was a warning on the "Settings-> General View" about the upcoming v21 beeing incompatible with mariaDB 10.1 (which is used in the bionic version of linuxserver).


    Maybe it's changed now but I really didn't saw it.


    Hence the post on page27 to change the DB to webhippie (mariaDB 10.4)


    For new ymls, it's better to apply the tag mariadb:alpine (mDB 10.5) since it will be used as "latest" soon

    • Offizieller Beitrag

    Oddly enough, I just noticed my own nextcloud (my actual nextcloud install on my server) wasn't running. I'll check this real quick. Maybe it's incompatible with old databases, but with new ones it's fine?


    Regardless, at least on x64 it does appear to work with latest.

  • As I understand it the mariadb:latest image will move from Ubuntu to Alpine. So I will stay on latest and see what happens when the base changes "soon".

    It has been advertise as "soon" but it's been quite some time and still no change.


    Nonetheless, when that happens, it will require you to make a backup of the previous version DB (as shown on page 27) and then restore it to the new DB.


    It's not just a matter of docker-compose down and then docker-compose up -d

    • Offizieller Beitrag

    I think there's been a change w/ the swag container because I can't get nextcloud back up (Looks like it was updated 4 days ago... I've been working a lot so I've not checked my nextcloud). I'm getting my certificate OK, and I've edited all my configs just as before.. but I just get a message this page cannot be managed via https when I go to my subdomain


    I'll look at it later.

  • If you haven't updated the image in a long time, you might have missed this warning on the nextcloud image:


    Zitat

    If you are not customizing our default nginx configuration you will need to remove the file:

    Code
    /config/nginx/site-confs/default

    Then restart the container to replace it with the latest one.

    Don't know if is what's giving you problems but, ;)

    • Offizieller Beitrag

    If you haven't updated the image in a long time, you might have missed this warning on the nextcloud image:


    Don't know if is what's giving you problems but, ;)

    First I heard of that... what needs to be changed there (I'm guessing that is the issue)..


    Nevermind, I see what you're saying, remove it.

  • The problem with the incompatibility arises on 32-bit platforms as my Helios 4. I moved to webhippie and I'm waiting for the alpine based mariadb will be out of its pre-release state.

    OMV 7.0.5 Sandworm | omvextrasorg 7.0 | compose 7.1 | Linux 6.6.16-current-mvebu | Armbian 24.2.1 Bookworm | Hardware Helios4 | RAID5 with 4 * 8TB WD Red

  • The problem with the incompatibility arises on 32-bit platforms as my Helios 4. I moved to webhippie and I'm waiting for the alpine based mariadb will be out of its pre-release state.

    Yeah, we were on the same boat with the moving of the DB. (Didn't know it only affected 32Bit)


    I already made the reverse (using the tag ":alpine).

    It was smoother then the last time, mainly because when I did the webhippie, I used a different folder (mariadb_10.5) and left the old one untouched (mariadb).


    Now, it just a matter of making the DB backup as we did before and then restore it to the new container.

  • First I heard of that... what needs to be changed there (I'm guessing that is the issue)..


    Nevermind, I see what you're saying, remove it.

    Is it working now?!?

  • The problem with the incompatibility arises on 32-bit platforms as my Helios 4. I moved to webhippie and I'm waiting for the alpine based mariadb will be out of its pre-release state.

    It's the ARM 32-bit Platforms to be precise. The underlying problem is that the mariaDB project does not offer a pre-compiled binary for this architecture. This is why mostly old versions are in the repos of some major Linux distributions.

  • It's the ARM 32-bit Platforms to be precise.

    I'm setting a new Pi with the same stack in aarch64. Does it mean that there's no need to add the ":alpine" tag to the "mariadb" image?

  • No,

    Well, if I recall correct, you use a different approach to the "sub-subdomain" that is created from "swag (letsencrypt)".


    Haven't you edited the files in order to have access to nextcloud via "yoursubdomain.duckdns.org" instead of "nextcloud.yoursubdomain.duckdns.org" ???

    If this is the case, you have to check all files you've changed (me thinks).


    but arm64 is officially supported and the official Mariadb docker image is version 10.5.9

    Yes true, but the image that "linuxserver/..." uses has, as base, the same version of mariadb (10.1)(maybe I'm wrong, have to check the "dockerfile").


    armhf: docker-mariadb/Dockerfile.armhf at master · linuxserver/docker-mariadb (github.com)


    Yeah, it seems that it only get's v10.4 for platforms other than armhf

    • Offizieller Beitrag

    I've not really had time to look at it to be honest as work has been a little on the nutty side (moreso than usual).. I think I'm off Monday.. I'll look further at it then.. but you may be on to something there.

    • Offizieller Beitrag

    First sorry for the long post, just wanted to be thorough... this isnt' really my forte, so hopefully I don't look to stupid


    So I got back to this today.. I think this goes along with this thread, if anyone feels differently I'll move it. I got duckdns working, but truth be told, I've been wanting to try a few things with my own domain in the future. So I figured now is as good a time as any... and purchased a cheap domain name from domain.com (just the domain, nothing extra.. like $4 for the year). In doing some reading, I decided to use cloudflare and subfolders. If someone has a better suggestion that may make this go easier, I'm all ears.


    So first, I set up my domain to point at the cloudflare nameservers (not sure if it's important but also note I'm using the free cloudflare option, not paying) I'm also pretty sure I needed to setup CNAME and A records on cloudflare


    I have 2 records on cloudflare I'm pretty sure are the relevant ones:


    A mydomain.xyz my.public.ip on cloudflare (its proxied)

    CNAME www mydomain.xyz (also proxied)


    Since I'm not getting an answer on my CNAME, I suspect that is part of the problem.. but I'll come back to that.


    My docker-compse:


    Deployed... everything worked fine except swag couldn't get a cert, which was expected. Made an edit to /AppData/swag/dns-conf/cloudflare.ini and added in my email and Global API from cloudflare... Also at this point, I copied nextcloud.subfolder.conf.sample to nextcloud.subfolder.conf as mentioned in the first post of the how-to Restarted swag... congratulations... got a cert. Then I remembered my CNAME isn't getting an answer, yet I got a cert? I thought maybe I was expecting to much to get an answer on the CNAME output.


    Next, I move to editing nextclouds config.conf



    and restarted the nextcloud container. Container logs show everything starting normally... go to

    https://mydomain.xyz/nextcloud and I get an error that it's being redirected to many times and to clear my cache. So I fire up a browser in privacy mode, same problem.


    I remember I had this problem once before with Nextcloud and duckdns, when I hadn't setup my server locally first, so on a whim, I enable the ports under the nextcloud section of the docker-compose file. Redploy, Go to my.ip.address:450. It seems to work, but the sign in screen is unlike any I've encountered with Nextcloud before (has all the same info just doesn't look right .. see pic)


    I've not tried setting it up yet, as I figured something has went wrong since I can't get to it from mydomain.xyz/nextcloud although everything seems to be setup properly... I still believe there's an issue with my CNAME since I'm not getting an answer on it, but in looking at some various sites, it looks right.


    Hope you didn't fall asleep reading my novel. :)

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!