Nextcloud, Cloudflare, Unraid, Docker -- Access through untrusted domain. Cloudflare tunnel. Config.php updated. Help? reddit / selfhosted ---------------------------------------------------------------------- nagol0123 · 2023-12-02 18:16 Hi selfhosted peeps, I'm having some issues getting Nextcloud up and running outside my home network. I have configured Nextcloud in Docker on my Unraid server. I’m able to access it from my LAN on the port I configured, 444. (Note: I’m accessing my home network through an OpenVPN connection) I’ve set up a Cloudflare tunnel, added the domain, and Cloudflare shows the connection has healthy. However, when I try to access my Nextcloud from my custom sub-domain [Nextcloud.example.com](http://nextcloud.example.com/), I get an " Access through untrusted domain" message suggesting: “Please contact your administrator. If you are an administrator, edit the “trusted\_domains” setting in config/config.php like the example in config.sample.php.” So, I go to the terminal in Unraid, open Config.php, scroll down to trusted domains and add 1 => ‘[Nextcloud.example.com](http://nextcloud.example.com/)’ However, this has not solved the problem and I still get the error message. I’m sure I’m just missing something obvious. Please let me know if there’s any additional info that’s needed to answer this and thanks for taking the time to help! ---------------------------------------------------------------------- sesscon · 2023-12-03 00:55 Hi there, I understand you're facing issues accessing your Nextcloud instance externally through a Cloudflare tunnel, despite updating the `config.php` file. Let's go through some troubleshooting steps to resolve this: 1. **Verify `config.php` Changes**: Ensure that the domain is correctly entered in the `config.php`. The format should be: ```php 'trusted_domains' => array ( 0 => 'your-local-ip', 1 => 'Nextcloud.example.com', ), ``` Make sure there are no typos or syntax errors. 2. **Clear Cache**: After updating `config.php`, clear the cache on your browser or try accessing the page from an incognito window to avoid cache-related issues. 3. **Restart Docker Container**: Sometimes changes don’t take effect until the Docker container is restarted. You can do this from the Unraid Docker interface. 4. **Check DNS Propagation**: Ensure that your subdomain `Nextcloud.example.com` is properly propagated and pointing to the correct IP. You can use online tools like `https://www.whatsmydns.net/` to check DNS propagation. 5. **Cloudflare SSL/TLS Settings**: If you're using Cloudflare's proxy, check the SSL/TLS encryption mode. It’s recommended to use “Full” or “Full (Strict)” mode for secure communication. 6. **Firewall and Ports**: Verify that the ports required by Nextcloud are open and not blocked by any firewall. Since you are using a custom port (444), ensure it's correctly configured in your router and Cloudflare. 7. **Check Cloudflare Tunnel Configuration**: Ensure that the Cloudflare tunnel is correctly set up and pointing to your Unraid server where Nextcloud is hosted. 8. **Logs Analysis**: Check the Nextcloud and Unraid logs for any specific error messages that could provide more insight into the issue. 9. **Alternative Trusted Domains Method**: As a last resort, try adding your domain directly in `config.sample.php` and then rename it to `config.php`. If these steps don’t resolve the issue, please share any error logs or additional details you think might be relevant. This will help in diagnosing the problem more accurately. Hope this helps!