Fix Next-Cloud
The logs show that Nextcloud is blocking its own images because of a Content Security Policy (CSP) rule mismatch. Your browser is trying to load images from http://doc.gretchbaby.com, but the server safety rules only allow images from http://cloud.gretchbaby.com.This usually happens when your primary Nextcloud domain is cloud.gretchbaby.com, but your office editor app (like Collabora or ONLYOFFICE) is running on doc.gretchbaby.com and trying to cross-load assets over unencrypted HTTP.
The Underlying Issue
- Mixed Content & CSP: Your main Nextcloud site expects everything to match its primary web address. When the document viewer tries to pull icons from the
doc.subdomain, Nextcloud blocks them for safety. - HTTP vs HTTPS: The logs show links starting with
http://. Modern browsers and Nextcloud integrations will fail or hang completely if they are not using securehttps://links.
How to Fix It
To fix the slow loading and clear these errors, you need to update your server configuration files.
1. Add the Domain to config.php
You must tell Nextcloud to trust and allow images from your document server subdomain.
- Open your Nextcloud
config/config.phpfile on your server. - Look for the
'content_security_policy'section. If it does not exist, you can add an allowed domains list. - Add your document domain to the image sources rule:
'content_security_policy' => [
'img-src' => "'self' data: blob: https://*.tile.openstreetmap.org http://cloud.gretchbaby.com http://doc.gretchbaby.com",
],
2. Fix the Overwrite Settings (Highly Recommended)
Because your site is using http://, the office app integration will often time out or refuse to connect securely. You should force Nextcloud to recognize its web address properly.
- In the same
config.phpfile, verify or add these lines to fix the protocol:
'overwritehost' => 'cloud.gretchbaby.com',
'overwriteprotocol' => 'https',
'overwrite.cli.url' => 'https://gretchbaby.com',
(Note: Change https to http only if you do not use SSL certificates, though SSL is highly recommended to fix office loading issues).
3. Update the Office App Settings
- Log into Nextcloud as an administrator.
- Go to Administration settings -> Nextcloud Office (or ONLYOFFICE).
- Make sure the server URL listed there matches exactly how you access it (e.g.,
http://doc.gretchbaby.comorhttps://gretchbaby.com).
To help give you the exact steps to apply these edits, please tell me:
- Are you running Nextcloud via Docker / Portainer, Nextcloud AIO, or a standard Linux install (Ubuntu/Apache/Nginx)?
- Do you have SSL certificates (HTTPS) set up for both
cloud.gretchbaby.comanddoc.gretchbaby.com? - Do you use a reverse proxy like Nginx Proxy Manager, Traefik, or Cloudflare?