fix: sets trusted_domains correctly #118
Open
stevensting
wants to merge 5 commits from
trusted-domains into main
pull from: trusted-domains
merge into: :main
:main
:renovate/docker.elastic.co-elasticsearch-elasticsearch-9.x
:semver_details
:nextcloud-metrics
:trusted-domains
:update_33.0.8
:renovate/pgautoupgrade-pgautoupgrade-18.x
:pr-15.2.0+34.0.2-fpm
:pr-14.1.0+33.0.7-fpm
:pr-14.2.0+33-fpm
:pr-15.1.0+34.0.2-fpm
:pr-15.0.0+34.0.2-fpm
:pr-14.0.1+33.0.7-fpm
:feat/check-major-upgrade
:pr-14.0.0+33-fpm
:temp
:fix/nginx-conf-config-name
:pr-13.2.0+32-fpm
:upload-limit
:feature/imaginary
:kc_stable
:nextcloud-v28
:add-theming-v28.0.5
:add-theming
:update-nginx-conf
:split-bbb-onlyoffice-compos
:split-onlyoffice-bbb-config
:authentik_sso
:healthchecks
:occ_cmds
:auto_app_install
:embed_nextcloud_in_iframe
:auto_configure_sso
:add-postgres-db
Dismiss Review
Are you sure you want to dismiss this review?
No labels
Milestone
No items
No Milestone
Assignees
3wordchant
aadil (Aadil Ayub)
abra-bot (Abra Bot)
ammaratef45
amras (Sarma)
BornDeleuze
Brooke
carla
cas (Cassowary)
coopcloud
dannygroenewegen (Danny Groenewegen)
decentral1se (d1)
fauno (fauno)
ineiti (Linus Gasser)
javielico (Javielico)
jjsfunhouse
kawaiipunk (KawaiiPunk)
knoflook
moosemower
moritz
notplants
oxaliq (sorrel)
p4u1
renovate-bot (Comrade Renovate Bot)
simon
stevensting
trav (Trav Fryer)
yksflip
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: coop-cloud/nextcloud#118
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
fixes the issue, that EXTRA_DOMAINS is not taken into consideration by nextcloud as trusted domain, and therefore does not work.
@@ -6,6 +6,8 @@ ENABLE_BACKUPS=trueDOMAIN=nextcloud.example.com## Domain aliases#EXTRA_DOMAINS=', `www.nextcloud.example.com`'# same list as above but space separatedMaybe make the comments a bit more elaborate on what they both do?
Update the EXTRA_DOMAINS comment to
#Additional domains for Traefik to listen on. Comma-separated, backtick-quoted, e.g. ', `www.nextcloud.example.com`'And the comment for EXTRA_DOMAINS_TRUSTED:
@@ -7,2 +7,4 @@## Domain aliases#EXTRA_DOMAINS=', `www.nextcloud.example.com`'# same list as above but space separated#EXTRA_DOMAINS_TRUSTED=cloud.coquest.coopUser the same alt example domain instead of coquest:
www.nextcloud.example.com@@ -71,3 +71,3 @@- NEXTCLOUD_ADMIN_USER=${ADMIN_USER}- NEXTCLOUD_ADMIN_PASSWORD_FILE=/run/secrets/admin_password- NEXTCLOUD_TRUSTED_DOMAINS=${DOMAIN}- EXTRA_DOMAINS_TRUSTEDI don't think this line is needed.
EXTRA_DOMAINS_TRUSTEDis already interpolated intoNEXTCLOUD_TRUSTED_DOMAINSfrom .env at deploy time.@@ -72,2 +72,3 @@- NEXTCLOUD_ADMIN_PASSWORD_FILE=/run/secrets/admin_password- NEXTCLOUD_TRUSTED_DOMAINS=${DOMAIN}- EXTRA_DOMAINS_TRUSTED- NEXTCLOUD_TRUSTED_DOMAINS=${DOMAIN} ${EXTRA_DOMAINS_TRUSTED}From the docker-entrypoint.sh of Nextcloud, it looks like
NEXTCLOUD_TRUSTED_DOMAINSis only applied on the first install (installed_version = 0.0.0.0) and not during restarts or upgrades.So on an existing instance, this env var alone won't update the list. Needs a manual
occ config:system:set trusted_domainsMaybe add that as a comment to the .env.sample?Please add a short description to the PR comment.
@ineiti should be good to go now
Aww - nextcloud really behaves badly here. I hate the "Only works on install", because it makes it so hard to debug if it fails later. I didn't find any way to update the configuration later. So let's hope people read the comments to the environment variables.
Also, if you have time to comment on #127 I would be really happy. Not sure if I just misunderstand, or if it's an actual issue.
Sorry - I didn't understand that
EXTRA_DOMAINSandEXTRA_DOMAINS_TRUSTEDis in fact the same information, just once for traefik and once for nextcloud. I thought thatEXTRA_DOAMINS_TRUSTEDwas related to link nextcloud instances between themselves.Also, I liked the suggestions from @dannygroenewegen and don't see them in the latest PR - did you discuss these with him?
Add most of it to the readme to not flood the env file
Please change the relevant part of the .env.sample file to - this reduces some of the confusion I had when reading it the first time. Users don't read the README.md :(
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.