Accessing via https through load balancer and cloudflare


I’m new to Nextcloud and networking in general. I have my domain, for example nextcloud.mydomain.extension which is proxied through Cloudflare to mask my public IP.

A DNS A record which points the Nextcloud domain to my public IP. I then have port 443 port forward to my Load Balancer which then gets the local IP and port for my Nextcloud VM.

Now, this works as I have Plex, HA and other services through this, however whenever I try to login on the Web or App on that domain, it tells me Strict Mode: no HTTP connection allowed.

I have HTTPs strict mode on Cloudflare with valid certificates both ends, 100% secured. So why would I get this error? I’m guessing it something with Nextcloud settings. Can I allow http connections as its all secure through the Web which is all I care about really?

Hope this all makes sense :slight_smile:

I think there is a communication without HTTPS and you get the error.

On normal nextcloud installations you can force HSTS. Perhaps with this information you get a hint to solve your problem.

Perhaps it is a rewrite problem (http vs. https)
Get you the error with direct access (https and /login)

Set up a permanent redirect at the proxy from http://yourdomain to https://yourdomain