Hello, i've got THEIA environment problem (behind nginx proxy)

I need someone to help me to understand why my theia does not work behind a nginx proxy.

[original thread by krd78]

I know nothing about this, but there was an issue opened recently about a similar-sounding issue: https://github.com/theia-ide/theia-apps/issues/129 .


thanks Marc, this is exactly my problem

There is no solution yet, however.


yes maybe a debug mode exists on theia ? i can help debugging

yes; you can debug the front-end from the browser’s dev tools and the backend is a node.js app that can be debugged like any other one. However if the issue is the reverse-proxy, debugging at the Theia code-level might not yield much good. But I am not sure.

I know some have mentioned using Traefik as a reverse-proxy with Theia with success. Maybe something to try if you are stuck


i see, thanks. I guess the problem is the proxy method or the javascript THEIA scripts… I’m going to continue investigation. Traefik does not seem to be free so i prefer using nginx


Then i need HTTPS and HTTP authentication so nginx is perfect


I solved it !

cool, @krd78 . If would be nice if you could share your solution on the issue referred above

[Mobula Mobular]

you can do it with a subdomain and proxy_pass directive directly or this for subfolder binding; I use both under https.

location /theia/ {
rewrite /theia/(.*) /$1 break;
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “Upgrade”;