Upload behind NGINX as Reverse proxy not possible

Hi everyone!

I’ve installed Teddycloud on a public VPS using docker-compose and nginx. Everything seems to be working fine so far.

The web panel is secured with basic auth. I’ve managed to connect my ESP32-Box and the web GUI is functioning as expected.

However, I’m facing an issue with uploading files to the Teddycloud. The library or audio encoder seems to be causing trouble.

Here’s what I’ve found:

NGINX:

upstream prematurely closed connection while reading response header from upstream

Teddycloud:

WARN |platform_linux.c:0293:socketReceive| buffer does not contain null terminator

You can find my setup details and more logs here:

Any ideas on how to resolve this issue? I’ve tried increasing the nginx buffer, but it didn’t help. Any input would be greatly appreciated.

regards,
Quentendo64

1 Like

What version of teddyCloud are you using?

At the moment: TeddyCloud v0.6.4 (f13703a)

It works fine for me on v0.6.4 with nginx-proxymanager in the default configuration.
Are there any more errors around it?

1 Like

Then I just switch to the nginx-proxymanager as well and give it a try.

Could you share your Config with me for some guidance?

1 Like

I am using the default configuration.

1 Like

So, you don’t perform any authentication for the web UI? You just proxy everything to the teddycloud container?

No, I don’t host it publicly, so no need for that.

To how much? Where did you configure this? How big is the file you are trying to upload?

edit:
Besides increasing upload size, did you also increase any timeouts? Is the upload failing everytime after the same amount of time?
Are you using temp files? →Module ngx_http_proxy_module

Ahh… Then thats a different situation.

Hi @Magician,

I set:
client_max_body_size 128M;

No adjustments for timeouts etc.
Do you have a external teddycloud instance up and running? Any examples?

Unfortunately not, but i would be interested in setting this up if there would be some guidance.

I had some busy last weeks. But this weekend I will invest some time and try out a new configuration. If I found a working solution I keep you updated.

1 Like

@Magician
I did some rework on my compose file and the config. Try this as a starting point: