I’m an Owncloud newbie and would like to deploy a containerized version of Owncloud on my NAS (QNAP) as a private alternative to Dropbox.
I can run a docker container of Owncloud without any problem using the default sqlite database: I access the GUI, create the admin user, browse the file structure, etc.
But I’d like to switch to Mysql and I was so far unable to do as Owncloud “seems” to ignore the settings in config.php.
I created a MySQL instance (MariaDB) in a separate container and added an empty owncloud-reserved database to it: I checked that from the Owncloud container I can successfully login into the MySQL’s via the command line, so the database is reachable.
Following some instructions I found online I edited file config.php and changed field “installed” in variable $CONFIG from “true” to “false”: this triggers the db configuration wizard upon login.
In the wizard I select “MySQL” and await the completion of the setup procedure.
When it’s done I checked that:
- Owncloud tables have been created in the MariaDB database (the db was empty before runnig the wizard)
- The config.php file has been modified and now I see all mysql db settings, particulary:
'dbtype' => 'mysql',(the file showed before the sqlite settings)
Despite the above, if I go to the Settings page of my admin user, under General I still see the red warning: “SQLite is used as database…etc”.
For testing, I added a new user and indeed the data are still stored in the sqlite file rather than MySQL
So my conclusion is that Owncloud is ignoring config.php in my setup.
Things I tried to no avail:
- Recreating the Owncloud container multiple times
- Restart the container after the database change
What am I missing?
Thanks in advance
Steps to reproduce
- Trigger the database setup wizard by changing “installed” from “true” to “false” in config.php
- Run the db setup wizard
- Check that OC tables have been created in the new MYSQL database
- Go into Settings/General as Admin user
- The “SQLite is used as database” message is still displayed
Owncloud should use the new MySQL database and not display the warning message
Owncloud is still using the default sqlite database, apparently ignoring config.php
ownCloud version: (see ownCloud admin page)
10.6.0 (owncloud/server image on Docker Hub)
Updated from an older ownCloud or fresh install:
Where did you install ownCloud from:
Signing status (ownCloud 9.0 and above):
Login as admin user into your ownCloud and access http://example.com/index.php/settings/integrity/failed paste the results into https://gist.github.com/ and puth the link here.
The content of config/config.php:
(sensitive information has been redacted)
$CONFIG = array (
‘path’ => ‘/var/www/owncloud/apps’,
‘url’ => ‘/apps’,
‘writable’ => false,
‘path’ => ‘/var/www/owncloud/custom’,
‘url’ => ‘/custom’,
‘writable’ => true,
0 => ‘192...:’,
‘datadirectory’ => ‘/mnt/data/files’,
‘dbtype’ => ‘mysql’,
‘dbhost’ => '...*’,
‘dbname’ => ‘REDACTED’,
‘dbuser’ => ‘REDACTED’
‘dbpassword’ => ‘REDACTED’
‘dbtableprefix’ => ‘oc_’,
‘log_type’ => ‘owncloud’,
0 => ‘sqlite’,
1 => ‘mysql’,
2 => ‘pgsql’,
‘upgrade.disable-web’ => true,
‘default_language’ => ‘en’,
‘overwrite.cli.url’ => ‘REDACTED’,
‘htaccess.RewriteBase’ => ‘/’,
‘logfile’ => ‘/mnt/data/files/owncloud.log’,
‘loglevel’ => 2,
‘memcache.local’ => ‘\OC\Memcache\APCu’,
‘filesystem_cache_readonly’ => false,
‘filelocking.enabled’ => true,
‘passwordsalt’ => ‘REDACTED’,
‘secret’ => ‘REDACTED’,
‘version’ => ‘10.6.0.5’,
‘logtimezone’ => ‘UTC’,
‘installed’ => true,
‘instanceid’ => ‘REDACTED’,
‘mysql.utf8mb4’ => true,
Log in to the web-UI with an administrator account and click on 'admin' -> 'Generate Config Report' -> 'Download ownCloud config report' This report includes the config.php settings, the list of activated apps and other details in a well sanitized form. or If you have access to your command line run e.g.: sudo -u www-data php occ config:list system from within your ownCloud installation folder I get an error message; An unhandled exception has been thrown: OC\DatabaseException: Invalid database type in /var/www/owncloud/lib/private/Server.php:533 **Are you using external storage, if yes which one:** local/smb/sftp/... **Are you using encryption:** yes/no No **Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/...
With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your ownCloud installation folder
Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM
appid = ‘user_ldap’;
Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.
### Client configuration **Browser:** Firefox 84 **Operating system:** Linux ..