Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tribler Web interface behind NGINX reverse proxy #8414

Closed
im-vmn opened this issue Jan 25, 2025 · 4 comments
Closed

Tribler Web interface behind NGINX reverse proxy #8414

im-vmn opened this issue Jan 25, 2025 · 4 comments

Comments

@im-vmn
Copy link

im-vmn commented Jan 25, 2025

Hi! I was using Tribler and THIS happened!

y.filter is not a function
TypeError: y.filter is not a function
    at f (https://my.domain/ui/assets/index.1aaaeaf1.js:337:29872)

Before the error above comes this one:

Image

Since Tribler has Web interface I've decided to try to put it behind NGINX reverse proxy. Is it ok to run Tribler behind a reverse proxy or it is not supposed to work like this?

My NGINX config for the Tribler server:

server {                                                                                                                            
    listen 443 ssl;
    server_name         tribler.my.domain;
    ssl_certificate     /etc/letsencrypt/live/tribler.my.domain/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/tribler.my.domain/privkey.pem;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
    ssl_prefer_server_ciphers on;
    gzip off;
   
   include /etc/nginx/mime.types;
  
   auth_basic           "Stay away from my trash!";
   auth_basic_user_file /etc/nginx/.htpasswd;
  
   location / {
     # Pass to Tribler Web interface
     proxy_pass http://127.0.0.1:8089/;
   }
}

Thank you for this awesome project!

@egbertbouman
Copy link
Member

I couldn't reproduce this exact error, but it wasn't working for me either. Turns out there was an issue accessing the /events streaming endpoint, but adding proxy_buffering off; to the location fixed this for me.

@im-vmn
Copy link
Author

im-vmn commented Jan 26, 2025

This doesn't seem to be the issue, I tried to add this line, but no luck, still the same error. But if you managed to get work I suppose it's possible, so could you explain how did you do that? Any special Tribler settings or something I forgot in the NGINX config?

@egbertbouman
Copy link
Member

I didn't do anything special, I used your config and changed the keys + commented out the lines about basic auth / mimetypes. Just to be sure, I enabled basic auth, and it's still working fine.

Have you set the api_key cookie? You can set it by passing ?key=<yourkey> to the URL (e.g. https://localhost/?key=<yourkey>). You can find the key in your Tribler config (in configuration.json).

@im-vmn
Copy link
Author

im-vmn commented Jan 26, 2025

I haven't and, yes, it was the issue. Thank you

@im-vmn im-vmn closed this as completed Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants