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

  • Art: mysql

    Version: 10.4.18

    It is more likely to be: Updating to 110.4.18mariabionic

    This is the same as 10.1.4.18


    Open a terminal and sudo docker exec -it mariadb bash

    Then mysql -u root -p and enter your Database root password.


    You'll see this welcoming message:

    Code
    Welcome to the MariaDB monitor.  Commands end with ; or \g.
    Your MariaDB connection id is 8275
    Server version: 10.5.9-MariaDB-log MariaDB Server
    
    Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
    
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    MariaDB [(none)]> 

    See the MariaDB Server version?!?

  • Code
    Welcome to the MariaDB monitor.  Commands end with ; or \g.
    Your MariaDB connection id is 6274
    Server version: 10.4.18-MariaDB-1:10.4.18+maria~bionic-log mariadb.org binary distribution
    
    Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
    
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
    
    MariaDB [(none)]>
  • First, I have no idea of how Watchtower updates the images/containers so, all this is done by either "docker-compose" or "Portainer".

    Server version: 10.4.18-MariaDB-1:10.4.18+maria~bionic-log mariadb.org binary distribution

    AFAIK this is == to MariaDB v10.1 (since it uses the maria bionic)

    I was trying to find exactly why/where I saw that beeing mentioned but don't find it anymore on the linuxserver/mariadb github (I believe that's where I saw it)


    For you to update your Nextcloud (to run v21), you'll have to run MariaDB >v10.2.

    The linuxserver/mariadb:latest has been scheduled to change the version to alpine (runs MariaDB v10.5) for quite some time but still hasn't.

    So, the solution is either changing the image from linuxserver's to webhippie (as explained by Morlan in this post: RE: Nextcloud with Letsencrypt using OMV and docker-compose - Q&A

    Read the next posts after this, to see the errors you might encounter and how to solve them, before attempting it.


    Or, you can follow the above just to do the backup but, instead of changing to webhippie's image, just add the ":alpine" tag to the linuxserver image (linuxserver/mariadb:alpine) and then restore the backup as instructed in that above procedure.


    If you need assistance, please post here your specs (OS version, Hardware, etc) and how you launch your stack (Portainer web editor, docker-compose CLI, etc) and we can go from there.

  • What puzzles me is the fact that the How-To of Morlan still suggests using the linuxserver-Container

    If you read it correctly, it states to remove (comment out with #) all the remarks to linuxserver/mariadb service and add/create the webhippie service on the "docker-compose.yml", :P


    Of course, this won't make sense to you, if you never used docker-compose CLI, ;)

    • Offizieller Beitrag

    First, I have no idea of how Watchtower updates the images/containers

    Watchtower will search and deploy new container images, it works well but there is one caveat, you should set it up so that it updates only certain containers, or set it up so it excludes certain containers, both ways work.


    I have Watchtower deployed and the few containers I use it will only update 2, because those 2 will work OK after and update and with Watchtower.

  • Don't want to keep "beating around the bush", but:

    I have Watchtower running every night. The Images should be up to date

    You should really consider to change that procedure:

    Zitat

    Note: We do not endorse the use of Watchtower as a solution to automated updates of existing Docker containers. In fact we generally discourage automated updates. However, this is a useful tool for one-time manual updates of containers where you have forgotten the original parameters. In the long term, we highly recommend using Docker Compose.

    SOURCE: linuxserver/docker-nextcloud (github.com)


    Watchtower will search and deploy new container images, it works well but there is one caveat, you should set it up so that it updates only certain containers, or set it up so it excludes certain containers, both ways work.


    I have Watchtower deployed and the few containers I use it will only update 2, because those 2 will work OK after and update and with Watchtower.

    Thank you for this, it made me search for info about it, and now, I have no regrets for never really trying to use this method of update.

    I think it's way more safe/reliable to update via the CLI than with "Watchtower".


    With a yml, it's only a matter of reading on github, if it's OK to update, then go to the folder where the yml lives and:

    docker-compose pull <image to update>

    docker-compose up -d <image to update>

    • Offizieller Beitrag

    Honestly, I use watchtower with all my containers, and never have an issue with it. I check the logs frequently, and I've never had an issue with it updating nextcloud, mariadb or any other container.


  • I check the logs frequently, and I've never had an issue with it updating nextcloud, mariadb or any other container.

    But didn't you had a hiccup a while back with Nextcloud not working???

    Maybe not related but, just wondering....


    Nonetheless, the quote I posted above is from the makers of the images so, they might have some reasons to say it.

    • Offizieller Beitrag

    But didn't you had a hiccup a while back with Nextcloud not working???

    Maybe not related but, just wondering....


    Nonetheless, the quote I posted above is from the makers of the images so, they might have some reasons to say it.

    That was a DNS issue on my part. I had forgotten I had changed my DNS server, and didn't bother checking Nextcloud to see if it was working... everything else was fine so I just assumed Nextcloud was.


    About 2 weeks later I realized it wasn't working, rebuilt the container, etc.. and couldn't get it going. Eventually sat down and went through all my settings, and knew it was right... then I remembered the change I'd made to my DNS servers a few weeks prior (by now it had been almost a month), and wondered if that was the issue. Changed it back to what I had before.... fired up no problem.

    • Offizieller Beitrag

    I think it's way more safe/reliable to update via the CLI than with "Watchtower"

    Watchtower does work, but, there are some containers it can seriously mess with when Watchtower updates them, that's why a user should ask or search for possible conflicts. One such container was Pi-Hole, that became a PIA if it was update by Watchtower.


    If you deploy Watchtower using stacks you can set the containers to update, if you don't do that it will attempt to update all running containers and as KM0201 has stated he's not had an issue with Nextcloud or MariaDB being updated this way.

  • If you read it correctly, it states to remove (comment out with #) all the remarks to linuxserver/mariadb service and add/create the webhippie service on the "docker-compose.yml", :P


    Of course, this won't make sense to you, if you never used docker-compose CLI, ;)

    Sorry, I confused macom and Morlan :rolleyes:

    What I meant was that in how-to-nextcloud-with-letsencrypt-using-omv-and-docker-compose of macom there is still the Linux server/mariadb-Container. According to you and morlan this should not work anymore with NC 21 :huh:

  • With a yml, it's only a matter of reading on github, if it's OK to update, then go to the folder where the yml lives and:

    docker-compose pull <image to update>

    docker-compose up -d <image to update>

    You're right but I don't have the time nor the motivation to do this every day.

    I don't live for my server. It's the other way round.

  • You're right but I don't have the time nor the motivation to do this every day.

    I don't live for my server. It's the other way round.

    Maybe I sounded a bit harsh, sorry.

    I'm also a "set and forget it" and "if it's not broken, don't fix it" kind of person but it's only when things go wrong, that you learn something.


    Main reason I see it "not so right" the use of "automatic updates" on (in this case we're discussing) Watchtower is: it won't care if there's some issue/s with the update.

    Recalling your situation between v20.0.8 and v20.0.9 with no NET access, there's this change(if you haven't seen it):

    Zitat

    21.0.0-ls124

    @LinuxServer-CI LinuxServer-CI released this on 25 Feb

    Nginx default site config updated for v21 (existing users should delete /config/nginx/site-confs/default and restart the container).

    If you don't use a "customized "default" file", delete it and restart the Nextcloud container. It will recreate the file with the new version.


    Once in a while, there's some remarks on the updates that is informed on the linuxserver page. (The latest update of SWAG requires deletion of "authelia confs"(for those who use it, it's mandatory) and restart so it downloads the latest version, for eg.)

    That's why I said, "1st read the github and then update it".


    With this in consideration, you don't need to check for updates every day.

    You can make yourself a plan of: once a week or once a month or every two month... or whatever suits you better and do/check/revise for updates, make a backup, etc.

    That will be your "Server maintenance day".


    Just some thoughts, ;)

  • Hello.

    For those like me who can't download from their external smb storage.

    There is an Icewind bug that cause this problems.


    Take a look at this link. I solved the problem, thanks to this guy ;)


    For those who don't have the time, extract of blog:


    Nextcloud uses icewind SMB library for SMB access. As this error occurs on SMB sources, i've reviewed the library and found the ultimate issue of this error. The error itself is located in a class called StringBuffer at the read method.

    Code
    	public function read(int $count): string {
    		$chunk = substr($this->buffer, $this->pos, $this->pos + $count);
    		$this->pos += strlen($chunk);
    		return $chunk;
    	}

    stringbuffer-read (original)

    The actual error is that the length of the returned substring is combined with the current position - which would be valid if it's an end-index for the read.

    Fix for the issue

    As it's just the length to be read, the fix is quite easy:

    Code
    	public function read(int $count): string {
    		$chunk = substr($this->buffer, $this->pos, $count);
    		$this->pos += strlen($chunk);
    		return $chunk;
    	}

    stringbuffer-read (fixed)

    Just replace the length calculation with $count and everything is fine. I've created a pull request on github for the SMB library to get this fix hopefully applied soon.

    Fix for nextcloud

    If you're running into this issue on nextcloud, you'll want to fix StringBuffer also - the file is located here: /var/www/html/apps/files_external/3rdparty/icewind/smb/src/StringBuffer.php (assuming that the root of your installation is /var/www/html).

    French nooby User. Sorry for my English language mistakes, I'm not used to post on english forum

    • MB: Asrock QC5000m microATX with AMD 5050 APU / RAM : 16 gb HyperX, Case: Fractal Design Node 804
    • Storage : Kingston SSD 128go (for OMV) / 1x4Tb Seagate IronWolf, 1x4Tb WD Red, 1x200 Go Maxtor and 1x230Go Maxtor (old devices)
    • Docker CE (not the OMV plugin) : managed by Portainer , run JDownloader2, TeamSpeak3, NextCloud 20 etc
    • Locate / MySQL (db kodi, nextcloud) / SMB_CIFS
  • Hi, Recently i have been getting this error message

    someone on here dd show me the fix for this but for the life of me i cant find it. please could someone help?

    Normally if its in red it's bad!!!


    Machine 1 - Dell OptiPlex 790 - Core i5-2400 3.10GHz - 16GB RAM - OMV5

    Machine 2 - Raspberry PI4 - ARMv7 - 2GB - OMV5

Jetzt mitmachen!

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