You are accessing the server from an untrusted domain

I’m coming from NextCloud → OwnCloud. Installed it in a Docker container. I get this error. Similar to NextCloud. Edited the config.php with:

  'trusted_domains' =>  
  array (
    0 => 'localhost',
    1 => '192.168.86.31',
    2 => '192.168.86.31:8686',
    3 => '192.168.86.31:8080',
  ),  

I am currently also running on NextCloud in a container and it’s using port 8080 so I used 8686:8080. Added both ports and even an IP address with no port. Doesn’t work. Still get this error message. What am I doing wrong?

You should never edit the config.php file manually while using a container setup. Please use the environment vars instead. In your case, you need to set OWNCLOUD_TRUSTED_DOMAINS=localhost,192.168.86.31,192.168.86.31:8686,192.168.86.31:8080

Really? Why does <youknow>://doc.owncloud.com/server/10.11/admin_manual/maintenance/migrating.html#managing-trusted-domains (why can’t I put links in posts? It seems to recognize them…) say to modify the config.php file? Typically, with NextCloud and all the other containers I run, one maps a volume with the config info to the local file system to allow such modifications. There are tons of configuration settings that can be modified in config.php. Are you saying in a Docker configuration the config.php file is useless and should not be used to set any configuration and that all such changes need to be done via env vars?!?

You have a new account. Those are typically limited to impede spambots. If you ask @discobot to take you through the training it should help you get promoted to a higher trust level that will allow you to include links.

Hi! To find out what I can do, say @discobot display help.

Really? I tried “saying” asked discobot to display help but apparently it didn’t hear me! (<- that’s a joke, and a statement that I cannot follows those directions as written. Perhaps it should say "Hi! To find out what I can do, reply to this and type “@discobot display help”)

@discobot display help

I currently know how to do the following things:

@discobot start {name-of-tutorial}

Starts an interactive tutorial just for you, in a personal message. {name-of-tutorial} can be one of: tutorial, advanced tutorial.

@discobot roll 2d6

:game_die: 3, 6

@discobot quote

:left_speech_bubble: Each player must accept the cards life deals him or her: but once they are in hand, he or she alone must decide how to play the cards in order to win the game. — Voltaire

@discobot fortune

:crystal_ball: You may rely on it

@discobot start tutorial

Well, that didn’t work. This is stupid.

Yes, by default, configuration options with an existing environment variable must be changed via environment variables. During container startup, all supported environment variables are used to create a config/overwrite.config.php inside the container, which is always used instead of the default config/config.php. Therefore, changing config/config.php will never work, same applies to config/overwrite.config.php.

If you really want to include a custom configuration file and not use the environment variables, you must ensure that this file is loaded last (configuration files are loaded in alphabetical order, last option wins), e.g. by mounting your custom configuration file to config/zz-user.config.php.

@discobot start tutorial

The bot seems to be working as intended. After sending the start tutorial message, you will receive a personal notification to your tutorial:

image

Processing the tutorial steps is working as well:

That’s strange. All of the other Docker containers that I run have a config directory or config file that the user can modify to change the behavior of the container. Is there any particular reason that OwnCloud disallows you from modifying config.php and forces you to use some other method like envvars or a special file? Owncloud does seem particularly protective of these files changing the ownership and permissions when it starts. Is that by design?

And is there some sort of convention on the file name? I see several files in the config directory that end in config.php. Is that all that is required? Would user.config.php work as well (considering “u” is pretty close to the end of the alphabet)?

Also, where are user data files stored? If I upload a large file I’d like to know where it’s gonna take up space. And can I, outside of OwnCloud, use my OS (Ubuntu) to copy/move file to that area and will OwnCloud notice the change?

Not on its own. It is intended that files are added and removed using the supported interfaces. The server can be instructed to scan for changes via the occ command. You may consult its built-in documentation for more detail.

1 Like

Using env vars is a generic way as there are settings e.g. for the web server or PHP that would need to be set in multiple other config files. To not end up with 5 different config files of different content types mounted to multiple different locations, a generic approach was chosen. There is a way to use a config file as well as described, and there are also a lot of other containers out there that are using env vars for configuration.

As those files need to be readable by the web server user, the container will ensure the ownership and permissions to be set correctly. If you don’t like this behavior, it can be disabled by an env var as well.

The only requirement is to name the file *.config.php and to place it in the ./config directory. As long as there is no other file at some time that will be loaded after user.config.php that will work.

The default data directory is /mnt/data inside the container. For persistence, a container volume needs to be used and pointed to that directory. If you followed the instructions from Installing with Docker :: ownCloud Documentation a native volume is used. Docker native volumes are stored at /var/lib/docker/volumes/<volume_name> by default. If you decide to use a bind mount instead of a volume this can be placed everywhere you want, but that’s a bit out of scope, please consolidate Volumes | Docker Documentation and Bind mounts | Docker Documentation for more details.

If my NextCloud experience dictates anything this seems similar to NextCloud. The problem I’ve had with NextCloud is that it is extremely slow to use the interface to do anything. I blame WebDAV. Plus it was extremely buggy for me. I’d move a several gig video file to NextCloud in order to share it with others and using the web interface (WebDAV) it would not only be slow but often error out with a crappy error message (“something went wrong - try again” or “Unknown error occurred” or some such). Using the OS and NFS would be more reliable and quicker. Yes, I’m aware of the occ command as NextCloud uses the same mechanism, however, I am only able to scan for all files and that process would take about 1 whole hour. I could not understand why the Files section didn’t have a simple refresh command for the current directory which would be a much better way to go IMHO.

BTW, and I know I’m going off-topic again, is there any “migrate my NextCloud → OwnCloud” scripts?

I am not aware of any, but I cannot say that I have really looked either. I don’t know the current state of commonality and divergence between the projects. Depending on the number of your users, it may be more efficient to export and import the relevant data. Hopefully anyone who knows of a better migration process will reply with details.

I do use env vars with other containers to do some settings. I guess what I’m saying is if by default you cannot set settings into config.php then the file should be annotated as such. Perhaps:

// Please do not set settings in this file. By default, they will be ignored. Instead, use env vars.
// See <URL> for env var settings. 
//
// Alternatively you can do X, Y, and Z to override this behavior which will allow you to put your
// settings in this file

Then newbie users like me would not go astray.

Meantime I put the following into user.config.php and it didn’t work. From a docker exec -it owncloud bash:

root@owncloud:/var/www/owncloud# cat config/user.config.php 
<?php
$CONFIG['trusted_domains'] = 
  array (
    0 => 'localhost',
    1 => 'cloud.defariahome.com',
    1 => '192.168.86.31:8686',
);
?>
root@owncloud:/var/www/owncloud# 

And the container fails to start. Here’s the Docker log (ugh, new users can’t upload attachments…)

Creating volume folders...
Creating hook folders...
Writing config file...
Fixing base perms...
Fixing data perms...
Fixing hook perms...
Upgrading server database...
An unhandled exception has been thrown:
PDOException: SQLSTATE[HY000]: General error: 1 no such table: oc_appconfig in /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:141
Stack trace:
#0 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(141): PDO->query()
#1 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOQueryImplementation.php(38): Doctrine\DBAL\Driver\PDOConnection->doQuery()
#2 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1309): Doctrine\DBAL\Driver\PDOConnection->query()
#3 /var/www/owncloud/lib/private/DB/Connection.php(191): Doctrine\DBAL\Connection->executeQuery()
#4 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(212): OC\DB\Connection->executeQuery()
#5 /var/www/owncloud/lib/private/DB/QueryBuilder/QueryBuilder.php(142): Doctrine\DBAL\Query\QueryBuilder->execute()
#6 /var/www/owncloud/lib/private/AppConfig.php(312): OC\DB\QueryBuilder\QueryBuilder->execute()
#7 /var/www/owncloud/lib/private/AppConfig.php(80): OC\AppConfig->loadConfigValues()
#8 /var/www/owncloud/lib/private/AppConfig.php(289): OC\AppConfig->getApps()
#9 /var/www/owncloud/lib/private/App/AppManager.php(134): OC\AppConfig->getValues()
#10 /var/www/owncloud/lib/private/App/AppManager.php(155): OC\App\AppManager->getInstalledAppsValues()
#11 /var/www/owncloud/lib/private/legacy/app.php(352): OC\App\AppManager->getInstalledApps()
#12 /var/www/owncloud/lib/private/legacy/app.php(108): OC_App::getEnabledApps()
#13 /var/www/owncloud/lib/base.php(591): OC_App::loadApps()
#14 /var/www/owncloud/lib/base.php(1060): OC::init()
#15 /var/www/owncloud/console.php(74): require_once('/var/www/ownclo...')
#16 /var/www/owncloud/occ(11): require_once('/var/www/ownclo...')
#17 {main}

Next Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[HY000]: General error: 1 no such table: oc_appconfig in /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18
Stack trace:
#0 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(143): Doctrine\DBAL\Driver\PDO\Exception::new()
#1 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOQueryImplementation.php(38): Doctrine\DBAL\Driver\PDOConnection->doQuery()
#2 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1309): Doctrine\DBAL\Driver\PDOConnection->query()
#3 /var/www/owncloud/lib/private/DB/Connection.php(191): Doctrine\DBAL\Connection->executeQuery()
#4 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(212): OC\DB\Connection->executeQuery()
#5 /var/www/owncloud/lib/private/DB/QueryBuilder/QueryBuilder.php(142): Doctrine\DBAL\Query\QueryBuilder->execute()
#6 /var/www/owncloud/lib/private/AppConfig.php(312): OC\DB\QueryBuilder\QueryBuilder->execute()
#7 /var/www/owncloud/lib/private/AppConfig.php(80): OC\AppConfig->loadConfigValues()
#8 /var/www/owncloud/lib/private/AppConfig.php(289): OC\AppConfig->getApps()
#9 /var/www/owncloud/lib/private/App/AppManager.php(134): OC\AppConfig->getValues()
#10 /var/www/owncloud/lib/private/App/AppManager.php(155): OC\App\AppManager->getInstalledAppsValues()
#11 /var/www/owncloud/lib/private/legacy/app.php(352): OC\App\AppManager->getInstalledApps()
#12 /var/www/owncloud/lib/private/legacy/app.php(108): OC_App::getEnabledApps()
#13 /var/www/owncloud/lib/base.php(591): OC_App::loadApps()
#14 /var/www/owncloud/lib/base.php(1060): OC::init()
#15 /var/www/owncloud/console.php(74): require_once('/var/www/ownclo...')
#16 /var/www/owncloud/occ(11): require_once('/var/www/ownclo...')
#17 {main}

Next Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT * FROM "oc_appconfig"':

SQLSTATE[HY000]: General error: 1 no such table: oc_appconfig in /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractSQLiteDriver.php:59
Stack trace:
#0 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(182): Doctrine\DBAL\Driver\AbstractSQLiteDriver->convertException()
#1 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(159): Doctrine\DBAL\DBALException::wrapException()
#2 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(2226): Doctrine\DBAL\DBALException::driverExceptionDuringQuery()
#3 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1313): Doctrine\DBAL\Connection->handleExceptionDuringQuery()
#4 /var/www/owncloud/lib/private/DB/Connection.php(191): Doctrine\DBAL\Connection->executeQuery()
#5 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(212): OC\DB\Connection->executeQuery()
#6 /var/www/owncloud/lib/private/DB/QueryBuilder/QueryBuilder.php(142): Doctrine\DBAL\Query\QueryBuilder->execute()
#7 /var/www/owncloud/lib/private/AppConfig.php(312): OC\DB\QueryBuilder\QueryBuilder->execute()
#8 /var/www/owncloud/lib/private/AppConfig.php(80): OC\AppConfig->loadConfigValues()
#9 /var/www/owncloud/lib/private/AppConfig.php(289): OC\AppConfig->getApps()
#10 /var/www/owncloud/lib/private/App/AppManager.php(134): OC\AppConfig->getValues()
#11 /var/www/owncloud/lib/private/App/AppManager.php(155): OC\App\AppManager->getInstalledAppsValues()
#12 /var/www/owncloud/lib/private/legacy/app.php(352): OC\App\AppManager->getInstalledApps()
#13 /var/www/owncloud/lib/private/legacy/app.php(108): OC_App::getEnabledApps()
#14 /var/www/owncloud/lib/base.php(591): OC_App::loadApps()
#15 /var/www/owncloud/lib/base.php(1060): OC::init()
#16 /var/www/owncloud/console.php(74): require_once('/var/www/ownclo...')
#17 /var/www/owncloud/occ(11): require_once('/var/www/ownclo...')
#18 {main}An unhandled exception has been thrown:
PDOException: SQLSTATE[HY000]: General error: 1 no such table: oc_appconfig in /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:141
Stack trace:
#0 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(141): PDO->query()
#1 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOQueryImplementation.php(38): Doctrine\DBAL\Driver\PDOConnection->doQuery()
#2 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1309): Doctrine\DBAL\Driver\PDOConnection->query()
#3 /var/www/owncloud/lib/private/DB/Connection.php(191): Doctrine\DBAL\Connection->executeQuery()
#4 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(212): OC\DB\Connection->executeQuery()
#5 /var/www/owncloud/lib/private/DB/QueryBuilder/QueryBuilder.php(142): Doctrine\DBAL\Query\QueryBuilder->execute()
#6 /var/www/owncloud/lib/private/AppConfig.php(312): OC\DB\QueryBuilder\QueryBuilder->execute()
#7 /var/www/owncloud/lib/private/AppConfig.php(80): OC\AppConfig->loadConfigValues()
#8 /var/www/owncloud/lib/private/AppConfig.php(289): OC\AppConfig->getApps()
#9 /var/www/owncloud/lib/private/App/AppManager.php(134): OC\AppConfig->getValues()
#10 /var/www/owncloud/lib/private/App/AppManager.php(155): OC\App\AppManager->getInstalledAppsValues()
#11 /var/www/owncloud/lib/private/legacy/app.php(352): OC\App\AppManager->getInstalledApps()
#12 /var/www/owncloud/lib/private/legacy/app.php(108): OC_App::getEnabledApps()
#13 /var/www/owncloud/lib/base.php(591): OC_App::loadApps()
#14 /var/www/owncloud/lib/base.php(1060): OC::init()
#15 /var/www/owncloud/console.php(74): require_once('/var/www/ownclo...')
#16 /var/www/owncloud/occ(11): require_once('/var/www/ownclo...')
#17 {main}

Next Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[HY000]: General error: 1 no such table: oc_appconfig in /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18
Stack trace:
#0 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(143): Doctrine\DBAL\Driver\PDO\Exception::new()
#1 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOQueryImplementation.php(38): Doctrine\DBAL\Driver\PDOConnection->doQuery()
#2 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1309): Doctrine\DBAL\Driver\PDOConnection->query()
#3 /var/www/owncloud/lib/private/DB/Connection.php(191): Doctrine\DBAL\Connection->executeQuery()
#4 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(212): OC\DB\Connection->executeQuery()
#5 /var/www/owncloud/lib/private/DB/QueryBuilder/QueryBuilder.php(142): Doctrine\DBAL\Query\QueryBuilder->execute()
#6 /var/www/owncloud/lib/private/AppConfig.php(312): OC\DB\QueryBuilder\QueryBuilder->execute()
#7 /var/www/owncloud/lib/private/AppConfig.php(80): OC\AppConfig->loadConfigValues()
#8 /var/www/owncloud/lib/private/AppConfig.php(289): OC\AppConfig->getApps()
#9 /var/www/owncloud/lib/private/App/AppManager.php(134): OC\AppConfig->getValues()
#10 /var/www/owncloud/lib/private/App/AppManager.php(155): OC\App\AppManager->getInstalledAppsValues()
#11 /var/www/owncloud/lib/private/legacy/app.php(352): OC\App\AppManager->getInstalledApps()
#12 /var/www/owncloud/lib/private/legacy/app.php(108): OC_App::getEnabledApps()
#13 /var/www/owncloud/lib/base.php(591): OC_App::loadApps()
#14 /var/www/owncloud/lib/base.php(1060): OC::init()
#15 /var/www/owncloud/console.php(74): require_once('/var/www/ownclo...')
#16 /var/www/owncloud/occ(11): require_once('/var/www/ownclo...')
#17 {main}

Next Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT * FROM "oc_appconfig"':

SQLSTATE[HY000]: General error: 1 no such table: oc_appconfig in /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractSQLiteDriver.php:59
Stack trace:
#0 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(182): Doctrine\DBAL\Driver\AbstractSQLiteDriver->convertException()
#1 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(159): Doctrine\DBAL\DBALException::wrapException()
#2 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(2226): Doctrine\DBAL\DBALException::driverExceptionDuringQuery()
#3 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1313): Doctrine\DBAL\Connection->handleExceptionDuringQuery()
#4 /var/www/owncloud/lib/private/DB/Connection.php(191): Doctrine\DBAL\Connection->executeQuery()
#5 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(212): OC\DB\Connection->executeQuery()
#6 /var/www/owncloud/lib/private/DB/QueryBuilder/QueryBuilder.php(142): Doctrine\DBAL\Query\QueryBuilder->execute()
#7 /var/www/owncloud/lib/private/AppConfig.php(312): OC\DB\QueryBuilder\QueryBuilder->execute()
#8 /var/www/owncloud/lib/private/AppConfig.php(80): OC\AppConfig->loadConfigValues()
#9 /var/www/owncloud/lib/private/AppConfig.php(289): OC\AppConfig->getApps()
#10 /var/www/owncloud/lib/private/App/AppManager.php(134): OC\AppConfig->getValues()
#11 /var/www/owncloud/lib/private/App/AppManager.php(155): OC\App\AppManager->getInstalledAppsValues()
#12 /var/www/owncloud/lib/private/legacy/app.php(352): OC\App\AppManager->getInstalledApps()
#13 /var/www/owncloud/lib/private/legacy/app.php(108): OC_App::getEnabledApps()
#14 /var/www/owncloud/lib/base.php(591): OC_App::loadApps()
#15 /var/www/owncloud/lib/base.php(1060): OC::init()
#16 /var/www/owncloud/console.php(74): require_once('/var/www/ownclo...')
#17 /var/www/owncloud/occ(11): require_once('/var/www/ownclo...')
#18 {main}Writing objectstore config...
Writing php config...
Updating htaccess config...
An unhandled exception has been thrown:
PDOException: SQLSTATE[HY000]: General error: 1 no such table: oc_appconfig in /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:141
Stack trace:
#0 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(141): PDO->query()
#1 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOQueryImplementation.php(38): Doctrine\DBAL\Driver\PDOConnection->doQuery()
#2 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1309): Doctrine\DBAL\Driver\PDOConnection->query()
#3 /var/www/owncloud/lib/private/DB/Connection.php(191): Doctrine\DBAL\Connection->executeQuery()
#4 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(212): OC\DB\Connection->executeQuery()
#5 /var/www/owncloud/lib/private/DB/QueryBuilder/QueryBuilder.php(142): Doctrine\DBAL\Query\QueryBuilder->execute()
#6 /var/www/owncloud/lib/private/AppConfig.php(312): OC\DB\QueryBuilder\QueryBuilder->execute()
#7 /var/www/owncloud/lib/private/AppConfig.php(80): OC\AppConfig->loadConfigValues()
#8 /var/www/owncloud/lib/private/AppConfig.php(289): OC\AppConfig->getApps()
#9 /var/www/owncloud/lib/private/App/AppManager.php(134): OC\AppConfig->getValues()
#10 /var/www/owncloud/lib/private/App/AppManager.php(155): OC\App\AppManager->getInstalledAppsValues()
#11 /var/www/owncloud/lib/private/legacy/app.php(352): OC\App\AppManager->getInstalledApps()
#12 /var/www/owncloud/lib/private/legacy/app.php(108): OC_App::getEnabledApps()
#13 /var/www/owncloud/lib/base.php(591): OC_App::loadApps()
#14 /var/www/owncloud/lib/base.php(1060): OC::init()
#15 /var/www/owncloud/console.php(74): require_once('/var/www/ownclo...')
#16 /var/www/owncloud/occ(11): require_once('/var/www/ownclo...')
#17 {main}

Next Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[HY000]: General error: 1 no such table: oc_appconfig in /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18
Stack trace:
#0 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(143): Doctrine\DBAL\Driver\PDO\Exception::new()
#1 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOQueryImplementation.php(38): Doctrine\DBAL\Driver\PDOConnection->doQuery()
#2 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1309): Doctrine\DBAL\Driver\PDOConnection->query()
#3 /var/www/owncloud/lib/private/DB/Connection.php(191): Doctrine\DBAL\Connection->executeQuery()
#4 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(212): OC\DB\Connection->executeQuery()
#5 /var/www/owncloud/lib/private/DB/QueryBuilder/QueryBuilder.php(142): Doctrine\DBAL\Query\QueryBuilder->execute()
#6 /var/www/owncloud/lib/private/AppConfig.php(312): OC\DB\QueryBuilder\QueryBuilder->execute()
#7 /var/www/owncloud/lib/private/AppConfig.php(80): OC\AppConfig->loadConfigValues()
#8 /var/www/owncloud/lib/private/AppConfig.php(289): OC\AppConfig->getApps()
#9 /var/www/owncloud/lib/private/App/AppManager.php(134): OC\AppConfig->getValues()
#10 /var/www/owncloud/lib/private/App/AppManager.php(155): OC\App\AppManager->getInstalledAppsValues()
#11 /var/www/owncloud/lib/private/legacy/app.php(352): OC\App\AppManager->getInstalledApps()
#12 /var/www/owncloud/lib/private/legacy/app.php(108): OC_App::getEnabledApps()
#13 /var/www/owncloud/lib/base.php(591): OC_App::loadApps()
#14 /var/www/owncloud/lib/base.php(1060): OC::init()
#15 /var/www/owncloud/console.php(74): require_once('/var/www/ownclo...')
#16 /var/www/owncloud/occ(11): require_once('/var/www/ownclo...')
#17 {main}

Next Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT * FROM "oc_appconfig"':

SQLSTATE[HY000]: General error: 1 no such table: oc_appconfig in /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractSQLiteDriver.php:59
Stack trace:
#0 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(182): Doctrine\DBAL\Driver\AbstractSQLiteDriver->convertException()
#1 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(159): Doctrine\DBAL\DBALException::wrapException()
#2 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(2226): Doctrine\DBAL\DBALException::driverExceptionDuringQuery()
#3 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1313): Doctrine\DBAL\Connection->handleExceptionDuringQuery()
#4 /var/www/owncloud/lib/private/DB/Connection.php(191): Doctrine\DBAL\Connection->executeQuery()
#5 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(212): OC\DB\Connection->executeQuery()
#6 /var/www/owncloud/lib/private/DB/QueryBuilder/QueryBuilder.php(142): Doctrine\DBAL\Query\QueryBuilder->execute()
#7 /var/www/owncloud/lib/private/AppConfig.php(312): OC\DB\QueryBuilder\QueryBuilder->execute()
#8 /var/www/owncloud/lib/private/AppConfig.php(80): OC\AppConfig->loadConfigValues()
#9 /var/www/owncloud/lib/private/AppConfig.php(289): OC\AppConfig->getApps()
#10 /var/www/owncloud/lib/private/App/AppManager.php(134): OC\AppConfig->getValues()
#11 /var/www/owncloud/lib/private/App/AppManager.php(155): OC\App\AppManager->getInstalledAppsValues()
#12 /var/www/owncloud/lib/private/legacy/app.php(352): OC\App\AppManager->getInstalledApps()
#13 /var/www/owncloud/lib/private/legacy/app.php(108): OC_App::getEnabledApps()
#14 /var/www/owncloud/lib/base.php(591): OC_App::loadApps()
#15 /var/www/owncloud/lib/base.php(1060): OC::init()
#16 /var/www/owncloud/console.php(74): require_once('/var/www/ownclo...')
#17 /var/www/owncloud/occ(11): require_once('/var/www/ownclo...')
#18 {main}
Creating volume folders...
Creating hook folders...
Writing config file...
Fixing base perms...
Fixing data perms...
Fixing hook perms...
Upgrading server database...
An unhandled exception has been thrown:
PDOException: SQLSTATE[HY000]: General error: 1 no such table: oc_appconfig in /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:141
Stack trace:
#0 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(141): PDO->query()
#1 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOQueryImplementation.php(38): Doctrine\DBAL\Driver\PDOConnection->doQuery()
#2 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1309): Doctrine\DBAL\Driver\PDOConnection->query()
#3 /var/www/owncloud/lib/private/DB/Connection.php(191): Doctrine\DBAL\Connection->executeQuery()
#4 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(212): OC\DB\Connection->executeQuery()
#5 /var/www/owncloud/lib/private/DB/QueryBuilder/QueryBuilder.php(142): Doctrine\DBAL\Query\QueryBuilder->execute()
#6 /var/www/owncloud/lib/private/AppConfig.php(312): OC\DB\QueryBuilder\QueryBuilder->execute()
#7 /var/www/owncloud/lib/private/AppConfig.php(80): OC\AppConfig->loadConfigValues()
#8 /var/www/owncloud/lib/private/AppConfig.php(289): OC\AppConfig->getApps()
#9 /var/www/owncloud/lib/private/App/AppManager.php(134): OC\AppConfig->getValues()
#10 /var/www/owncloud/lib/private/App/AppManager.php(155): OC\App\AppManager->getInstalledAppsValues()
#11 /var/www/owncloud/lib/private/legacy/app.php(352): OC\App\AppManager->getInstalledApps()
#12 /var/www/owncloud/lib/private/legacy/app.php(108): OC_App::getEnabledApps()
#13 /var/www/owncloud/lib/base.php(591): OC_App::loadApps()
#14 /var/www/owncloud/lib/base.php(1060): OC::init()
#15 /var/www/owncloud/console.php(74): require_once('/var/www/ownclo...')
#16 /var/www/owncloud/occ(11): require_once('/var/www/ownclo...')
#17 {main}

Next Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[HY000]: General error: 1 no such table: oc_appconfig in /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18
Stack trace:
#0 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(143): Doctrine\DBAL\Driver\PDO\Exception::new()
#1 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOQueryImplementation.php(38): Doctrine\DBAL\Driver\PDOConnection->doQuery()
#2 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1309): Doctrine\DBAL\Driver\PDOConnection->query()
#3 /var/www/owncloud/lib/private/DB/Connection.php(191): Doctrine\DBAL\Connection->executeQuery()
#4 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(212): OC\DB\Connection->executeQuery()
#5 /var/www/owncloud/lib/private/DB/QueryBuilder/QueryBuilder.php(142): Doctrine\DBAL\Query\QueryBuilder->execute()
#6 /var/www/owncloud/lib/private/AppConfig.php(312): OC\DB\QueryBuilder\QueryBuilder->execute()
#7 /var/www/owncloud/lib/private/AppConfig.php(80): OC\AppConfig->loadConfigValues()
#8 /var/www/owncloud/lib/private/AppConfig.php(289): OC\AppConfig->getApps()
#9 /var/www/owncloud/lib/private/App/AppManager.php(134): OC\AppConfig->getValues()
#10 /var/www/owncloud/lib/private/App/AppManager.php(155): OC\App\AppManager->getInstalledAppsValues()
#11 /var/www/owncloud/lib/private/legacy/app.php(352): OC\App\AppManager->getInstalledApps()
#12 /var/www/owncloud/lib/private/legacy/app.php(108): OC_App::getEnabledApps()
#13 /var/www/owncloud/lib/base.php(591): OC_App::loadApps()
#14 /var/www/owncloud/lib/base.php(1060): OC::init()
#15 /var/www/owncloud/console.php(74): require_once('/var/www/ownclo...')
#16 /var/www/owncloud/occ(11): require_once('/var/www/ownclo...')
#17 {main}

Next Doctrine\DBAL\Exception\TableNotFoundException: An exception occurred while executing 'SELECT * FROM "oc_appconfig"':

SQLSTATE[HY000]: General error: 1 no such table: oc_appconfig in /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractSQLiteDriver.php:59
Stack trace:
#0 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(182): Doctrine\DBAL\Driver\AbstractSQLiteDriver->convertException()
#1 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(159): Doctrine\DBAL\DBALException::wrapException()
#2 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(2226): Doctrine\DBAL\DBALException::driverExceptionDuringQuery()
#3 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1313): Doctrine\DBAL\Connection->handleExceptionDuringQuery()
#4 /var/www/owncloud/lib/private/DB/Connection.php(191): Doctrine\DBAL\Connection->executeQuery()
#5 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(212): OC\DB\Connection->executeQuery()
#6 /var/www/owncloud/lib/private/DB/QueryBuilder/QueryBuilder.php(142): Doctrine\DBAL\Query\QueryBuilder->execute()
#7 /var/www/owncloud/lib/private/AppConfig.php(312): OC\DB\QueryBuilder\QueryBuilder->execute()
#8 /var/www/owncloud/lib/private/AppConfig.php(80): OC\AppConfig->loadConfigValues()
#9 /var/www/owncloud/lib/private/AppConfig.php(289): OC\AppConfig->getApps()
#10 /var/www/owncloud/lib/private/App/AppManager.php(134): OC\AppConfig->getValues()
#11 /var/www/owncloud/lib/private/App/AppManager.php(155): OC\App\AppManager->getInstalledAppsValues()
#12 /var/www/owncloud/lib/private/legacy/app.php(352): OC\App\AppManager->getInstalledApps()
#13 /var/www/owncloud/lib/private/legacy/app.php(108): OC_App::getEnabledApps()
#14 /var/www/owncloud/lib/base.php(591): OC_App::loadApps()
#15 /var/www/owncloud/lib/base.php(1060): OC::init()
#16 /var/www/owncloud/console.php(74): require_once('/var/www/ownclo...')
#17 /var/www/owncloud/occ(11): require_once('/var/www/ownclo...')
#18 {main}An unhandled exception has been thrown:
PDOException: SQLSTATE[HY000]: General error: 1 no such table: oc_appconfig in /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:141
Stack trace:
#0 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(141): PDO->query()
#1 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOQueryImplementation.php(38): Doctrine\DBAL\Driver\PDOConnection->doQuery()
#2 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1309): Doctrine\DBAL\Driver\PDOConnection->query()
#3 /var/www/owncloud/lib/private/DB/Connection.php(191): Doctrine\DBAL\Connection->executeQuery()
#4 /var/www/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(212): OC\DB\Connection->executeQuery()
#5 /var/www/owncloud/lib/private/DB/QueryBuilder/QueryBuilder.php(142): Doctrine\DBAL\Query\QueryBuilder->execute()
#6 /var/www/owncloud/lib/private/AppConfig.php(312): OC\DB\QueryBuilder\QueryBuilder->execute()
#7 /var/www/owncloud/lib/private/AppConfig.php(80): OC\AppConfig->loadConfigValues()
#8 /var/www/owncloud/lib/private/AppConfig.php(289): OC\AppConfig->getApps()
#9 /var/www/owncloud/lib/private/App/AppManager.php(134): OC\AppConfig->getValues()
#10 /var/www/owncloud/lib/private/App/AppManager.php(155): OC\App\AppManager->getInstalledAppsValues()
#11 /var/www/owncloud/lib/private/legacy/app.php(352): OC\App\AppManager->getInstalledApps()
#12 /var/www/owncloud/lib/private/legacy/app.php(108): OC_App::getEnabledApps()
#13 /var/www/owncloud/lib/base.php(591): OC_App::loadApps()
#14 /var/www/owncloud/lib/base.php(1060): OC::init()
#15 /var/www/owncloud/console.php(74): require_once('/var/www/ownclo...')
#16 /var/www/owncloud/occ(11): require_once('/var/www/ownclo...')
#17 {main}

... truncated due to silly limitations...

You have a duplicate index 1 used in the trusted domains array. However, this is not causing the DB issue and I don’t believe the custom config file at all is causing it, at least I’m not able to reproduce your issue while using your config file. I guess the DB is in a half-broken state, maybe because a previous container start has not finished the initialization.

Fixed the duplicate index - thanks.

How to fix it? Note I have “linked” MariaDB (also running in a Docker container) but had not done anything to create a database. I have a NextCloud database but I don’t remember if I had to set that up first or if the initial setup page did that for me. I do know that when I was able to get the OwnCloud Docker container to start and logged in as admin I did not get any kind of initialization or setup page.