Docker: set nextcloud trusted domain via environment variable

Created on 26 Sep 2018  路  7Comments  路  Source: nextcloud/docker

Hello

I'm struggling to setup nextcloud to be accessible from the outside world because I can not setup trusted_domains within config.php file in my docker instance.

I've tried several combinations mounting remote routes (nfs) but no luck I end up having exceptions related to logging system which seems to be happening on several versions with no clear explanation about what's wrong.

said that, do you guys thing would it be possible to create (if it does not exist already) the configuration required using an environment variable?

something like: NEXTCLOUD_HOSTNAME=xxx.yyy.zzz:port

thanks!

Most helpful comment

Use this command to query trusted_domains

docker exec --user www-data nextcloud php occ config:system:get trusted_domains

And set a new one:

docker exec --user www-data nextcloud php occ config:system:set trusted_domains 7 --value your.awesome.com

All the command can be found on the official doc page.

All 7 comments

Hello,

does anyone know if this queue of issues is being looked at? is the issue raised in the right queue?

thanks

@mvillarejo could you open an issue against Nextcloud itself to just accept env variable?
https://medium.com/@kelseyhightower/12-fractured-apps-1080c73d481c
https://12factor.net/

Thanks!

This repo is a community effort, so if you have feature request, the best way to have it, is to open a PR :)

@mvillarejo did you end up submitting an issue against nextcloud? Can you link it? I'm running into the same problem.

it can be set per occ after maintenance:install

and setting trusted proxies _might_ be interesting as well. provided the IP can be determined.

Use this command to query trusted_domains

docker exec --user www-data nextcloud php occ config:system:get trusted_domains

And set a new one:

docker exec --user www-data nextcloud php occ config:system:set trusted_domains 7 --value your.awesome.com

All the command can be found on the official doc page.

kubectl exec --user www-data nextcloud-6786db4769-klm49 php occ config:system:get trusted_domains
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
error: auth info "www-data" does not exist

yet www-data owns the config when i look in the container.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Xanarkan picture Xanarkan  路  3Comments

SQGE picture SQGE  路  3Comments

waldner picture waldner  路  3Comments

tanja84dk picture tanja84dk  路  3Comments

pierreozoux picture pierreozoux  路  3Comments