How to configure Docker image with configuration not supported by overwrite.config.php?

Hey all,

I’ve been configuring a personal instance of OwnCloud based on the owncloud/server:10.7 image.

Today I went to configure OpenID Connect, but found that the overwrite.config.php file does not have any environment variables related to that app.

My initial thought was to bind a config file for the OpenID stuff into the config directory, but as far as I can tell, OwnCloud only reads the config/config.php file. Right?

Which, I think, leaves me no other option than overwriting the config/config.php file and ditching use of overwrite.config.php.

Is that accurate? Is there a better way?

Another question: Where is the Dockerfile and docker image developed?

I could not find it anywhere under I had thought to fork, add some options to overwrite.config.php, and then submit a pull request, but I can’t when I can’t find it… :\

No, you can just create a configuration file like, e.g. oidc.config.php, put that in the ownCloud config folder and ownCloud will read it.

The main part is that the filename needs to end with config.php.

EDIT: By the way this is also described in the introduction of the config.php documentation page:


Finally had time to try it…

I added the config file as a bind mount in my docker-compose. This is what I get when I try to start it.

containername      | Creating volume folders...
containername      | Creating hook folders...
containername      | Waiting for MySQL...
containername      | services are ready!
containername      | Waiting for Redis...
containername      | services are ready!
containername      | Removing custom folder...
containername      | Linking custom folder...
containername      | Removing config folder...
containername      | rm: cannot remove '/var/www/owncloud/config/openid.config.php': Device or resource busy

Any ideas?

(I’m not feeling well, hence having time, and troubleshooting is not happening. :\ Any help would be appreciated.)

Sorry I didn’t reply to this question:


Not sure how exactly you mounted the config folder.
But by default the official ownCloud docker image puts this into /mnt/data/config

Check here:

Just below you will also be able to see the available environment variable to configure your ownCloud.


Thanks. I was mounting it in /var/www/owncloud/config. Now I just need to figure out my settings. I’m using the Drupal 8 OAuth Server module as my provider and it’s only sorta documented. :\

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.