instance($run); $pve = $this->pve->forHost($instance->host); $fqdn = $instance->subdomain.'.'.ProvisioningSettings::dnsZone(); $occ = 'cd /opt/nextcloud && docker compose exec -T app php occ '; // Idempotent occ calls (setting the same values is a no-op). $this->guest($pve, $run, $occ.'config:system:set trusted_domains 1 --value='.escapeshellarg($fqdn)); // Only a VERIFIED domain goes into trusted_domains. Nextcloud will // answer for anything listed here, so an unproven hostname added at // provisioning time would serve this customer's files to whoever // pointed that name at the proxy. if ($instance->domainIsVerified()) { $this->guest($pve, $run, $occ.'config:system:set trusted_domains 2 --value='.escapeshellarg($instance->custom_domain)); } $this->guest($pve, $run, $occ.'background:cron'); $this->guest($pve, $run, $occ.'config:system:set default_phone_region --value=DE'); return StepResult::advance(); } }