Docker: Running alternative DB to SQLite?


I recently built the Docker image from the github repository and was able to get everything up and running just fine. However, I do notice there are quite a few errors that take place when I attempt to batch upload files to my instance. That said, I recall seeing that SQLite is being used and an alternative database is recommended. I searched through the docker container and couldn’t find anything there that gave me an option to change the database. Was curious if anyone had experience with changing their database?


do you mean this:

or in case you want to start new. :wink:

Thank you @Reiner_Nippes, I think I’ve gone a little crazy reading everything about deploying my own server. :stuck_out_tongue:

I will say though, I’m not sure I understand how to access the DB from the docker container. Can’t find SQlite anywhere, but it’s telling me that’s the db being used. The reason I’m asking is that I don’t know the password to authenticate the db-conversion.

password of the sqlite or the mysql/mariadb/postgesql?
the later is defined via the env variables of the container.
the sqlite should have no password. or it’s in the config.php of nextcloud.

@Reiner_Nippes I’m not actually sure which password I need. It’s the password that occ is prompting me for after I execute the conversion command.

I tried to check my container env. variables by running “sudo docker exec nextcloudpi env” but there were no passwords for any DB there.

Edit: Fuck it, I’m just going to start over with that second link you gave me. Thanks for the help :slight_smile:

it would be more like:

sudo docker inspect mariadb 

because you want to know a docker container environment like MYSQL_PASSWORD. Not a linux shell env variable. of course you need a ruuning mariadb container to do this.

to get the config.php of your container you would run something like this

sudo docker exec -u www-data nextcloudpi cat /var/www/html/config/config.php

but i’m not sure if www-data is the correct user and /var/www/html/config/config.php is the correct path. i don’t have a raspi so i can’t check it.

that also means you can’t use my ansible playbook because it won’t run on a raspi.