400 Bad Request "The plain HTTP request was sent to HTTPS port"

Nextcloud version: 29.0.2
Operating system and version : Unraid 6.12.10
Using linuxversion docker image
Using cloudflare tunnel to connect to my domain

Screenshot 2024-06-14 001343

Can someone help me to know the reason for this and how do I rectify. Do I need to use any other docker apps for this ? I’m new to selfhosting and unraid and am looking forward to learn how to do stuff. I have limited technical knowledge on how to, any help is greatly appreciated. Thanks.

  • Post your config (occ config:list system).
  • Check your overwrite* variables.
  • Check all your references to http and https throughout your infrastructure (CF, Nginx, Nc, etc.)

are you using a reverse proxy ?

Do you still get the error 400 when you connect via localhost?

No, I am able to connect through local host and use nextcloud.

what do you mean by config. Is it the settings that I make while installing nextcloud app on docker ? I use community apps from the unraid, I am using the linuxserver app of nextcloud. I dont have a ngnix or other apps on unraid.

I am not exactly sure what a reverse proxy is, but through web I came to know that cloudflare tunnel is a reverse proxy.

1 Like

The LinuxServer.io image embeds Nginx and serves HTTPS by default.

If you have a reverse proxy in front (including CF), you’re issue is likely that you configured your reverse proxy to connect to your app server (Nextcloud) via http://xxx rather than https://xxx.

As for your config (since it may come up in the future), you access it using occ config:list system[1][2][3].

[1] nextcloud - LinuxServer.io
[2] nextcloud - LinuxServer.io
[3] https://docs.nextcloud.com


This information helped me out. I removed the linux server image and installed the official docker image on unraid. I was able to access nextcloud through my domain. Thanks alot.

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.