Nextcloud, Mariadb in docker, Nextcloud loads SQLITE on second logon.

  • Hi


    This is the second time this has happened to me, I used TechnoDadLife's method to install Mariadb and Nextcloud docker.


    When it was running, I installed a couple of apps, added new folders and all looked good, so I shut the server down to come back to the build the next day.


    24 hours later I switched on my server and logged back onto Nextcloud not noticing the 'setup database' text underneath the logon fields.


    Nextcloud defaulted to SQLite.


    Why would Nextcloud default to SQLite and not keep already configured Mariadb?


    How do I tell Nextcloud to use Mariadb instead of SQLite?


    Thank you for looking.

  • yes, 1000 and 100 obtained by
    root@openmediavault:/# id user1
    uid=1000(user1) gid=100(users) groups=100(users)


    How to obtain the puid and pgid was provided in another video.


    I feel like I missed an important step or misunderstood the instructions. If this is the case I'll wash, rinse, repeat until I get it.


    How would I check to see if the docker saved its config data?


    Building OMV as a homeserver is a bit of a journey for me, I have little in the way of a feel for this stuff and progress has been achieved so far by repetitive instals, the server has CIFS, snapraid and unionFS. I've got shared folders with data and have managed to get docker running which allowed me to try Mariadb and nextcloud. When these work together, the next step will be letsencrypt and then nextcloud talk. I eventually want to upgrade my old odd sized disks without loosing data. After that try and move everything to another server. At least thats the roadmap. The motivation for setting up OMV was the small footprint and seeming flexibility. AMD Phenom II x4 965 cpu, 8gb ddr3 and gigabyte mb. Seems quite stable.

    • Offizieller Beitrag

    I had a much longer response typed out.. but then I read the rest of your post and saw you're using Snapraid and unionFS. Docker and unionFS do not get along.


    Reboot your server
    See if when you reboot, it's showing your Nextcloud is a brand new installation again (ie, you need to configure the database, etc.).


    I suspect you might be experiencing the "racing" issue many have discussed here when using the unionfs.

  • Thx for the reply.


    Nextcloud is firmly stuck on SQLite.


    Is this what you mean? (Issues with UnionFS - See links in post 4 (here here here)), that the docker container is starting before unionfs? Some of the posts contain script workarounds and gdef's method.



    How can I test for this and see whether its happening?


    Is it possible to check logs with terminal or install the docker containers (and or the sharedfolders) on an external usb drive for example?


    If I could remove remove unionfs, would it then work?


    All these questions :0)

  • OK, I've got a load to chew on.


    Things are never as straight forward as they seem, are they? :o)


    Last question, I'd like to understand the technical reasons for docker not playing nicely with unionfs, I looked earlier, but failed, do you have a link or something?


    I'll try the various workaround scripts, starting with the timer script and then look at gderf's method.


    As I understand it, at the moment, I'll need to put dockers on a separate disk outside of unionfs where I can still use snapraid. I can try to remove unionfs then reinstall the dockers without it, and perhaps see if I can use an external drive.


    Sadly I don't have the spare capacity at the moment and the two services together would have made full use of my rag tag bundle of disks.The possible combination of docker, unionfs and snapraid is what attracted me to OMV.


    All the best

    • Offizieller Beitrag

    I don't use unionfs, so I've not really tracked the issue, I've just read about it several times. Your Googling's will basically be the same as mine.


    If My understanding is correct.. Basically Docker servuce starts, before the unionfs system is mounted, so basically none of the mount points can be loaded and you basically end up with a container that you have not configured. From what I've read, there are two solutions to this... 1. The script you mention which will prevent docker service from starting prior to the unionfs starting, or 2. Putting your containers folder and "configuration folder" (appdata on a lot of people's setups, if you follow Technodad's videos).. on an individual drive vs on the unionfs.


    What I've wondered, is if you let the machine start as normal... Set up some docker you want on unionfs, then reboot (presumably, all settings will be lost, etc.). Then after you reboot, restart your docker containers, or just restart the docker service. Since the unionfs is now mounted, it should read the configuration files, etc.. and load everything up (i think).


    As Root:


    docker restart $(docker ps -a -q) --- This will restart all docker containers.


    Or you can just restart the docker daemon (either from the webUI, or commandline... which I believe is service docker restart, but I'm not at home at the moment to check )


    I'm *assuming* since the unionfs is now mounted, either of these commands should load your docker containers as you configured them.

Jetzt mitmachen!

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