Jump to content

Emby behind a reverse proxy


Go to solution Solved by jonathan.gorbutt,

Recommended Posts

jonathan.gorbutt
Posted

Hi,

 

So I have my reverse proxy working I can access Emby just fine. but when it comes to configure Trakt for example I don't see anything in the drop down menu for my users? unless I go in via the local IP?

 

Do I need to change something to make this working behind the reverse proxy?

 

Many Thanks

-Jonathan

Posted

Hi there, are you using nginx?

jonathan.gorbutt
Posted

Hey,

 

I am using NginxProxyManager

Posted

I would suggest comparing your configuration to @@pir8radio's

 

If i had to guess what the problem is, I bet the Trakt config page has some embedded javascript that is being blocked by the CSP being set by the proxy. The core web app cleaned up all of this a long time ago, but there might still be some plugins doing that.

jonathan.gorbutt
Posted

My configuration is nothing like that... NGINXProxyManager takes all that jazz out you literally just choose your sub domain and point it to your local IP and boom... done.. its a easy creates the SSL cert for you...

 

there is no config like that...

Posted

Well if I had to guess, it's the csp.

  • Solution
jonathan.gorbutt
Posted

Thanks for the responses managed to figure it out my CNAMES in Cloudflare, were set to Proxy setting it to DNS only seemed to fix the issue

  • Like 1
Posted

Thanks for the feedback !

pir8radio
Posted

Thanks for the responses managed to figure it out my CNAMES in Cloudflare, were set to Proxy setting it to DNS only seemed to fix the issue

 

You might as well skip using cloudflare then, you are bypassing everything it does. 

KMBanana
Posted

Cloudflare is still nice to use since it supports both dynamic dns and dns based cert verification for letsencrypt.  

jonathan.gorbutt
Posted

So managed to figure out the issue, I must of enabled something in Cloudflares Dash before to try something because turning off Rocket Loader in there dash seemed to allow me to edit the trakt Plugin while still proxying through cloudflare.

Posted

Thanks for the feedback !

pir8radio
Posted

So managed to figure out the issue, I must of enabled something in Cloudflares Dash before to try something because turning off Rocket Loader in there dash seemed to allow me to edit the trakt Plugin while still proxying through cloudflare.

 

Yes, I have a cloudflare post on here somewhere...  Shut off the minification and rocket loader stuff...    There are also some tips to properly cache images, by default cloudflare doesn't cache like 90% of emby images. 

jonathan.gorbutt
Posted

@pir9radio any chance you can link me to that thread? I've tried looking for it but cant find it... I've tried setting this up myself but want to compare to your guide on the images.

 

Sorry for been a pain.

BAlGaInTl
Posted (edited)

Yes, I have a cloudflare post on here somewhere...  Shut off the minification and rocket loader stuff...    There are also some tips to properly cache images, by default cloudflare doesn't cache like 90% of emby images. 

 

 

@pir9radio any chance you can link me to that thread? I've tried looking for it but cant find it... I've tried setting this up myself but want to compare to your guide on the images.

 

Sorry for been a pain.

 

I'm in the same boat.

 

Cloudflare is caching almost nothing for me.  So far I've not been successful in finding the solution.  I would love some help.

 

ETA:  Here are my current Page Rules that I found from a tutorial somewhere

*domain.net/*
Edge Cache TTL: Custom 2419200 seconds

and

*domain.net/emby/item/*/images/*
Cache Level: Cache Everything, Edge Cache TTL: Custom 2419200 seconds
Edited by BAlGaInTl
BAlGaInTl
Posted

Something just occurred to me.

 

I wonder if it's because I'm saving my images with the media rather than the default? Maybe the paths are different for the files I need to cache. I'll have to investigate this later.

jonathan.gorbutt
Posted

To be honest, I have mine as default and it doesn't seem to be caching either... but Its only me that looks at Emby at the moment, I haven't made the switch yet... just getting everything working the way I like first and tinkering.

BAlGaInTl
Posted

To be honest, I have mine as default and it doesn't seem to be caching either... but Its only me that looks at Emby at the moment, I haven't made the switch yet... just getting everything working the way I like first and tinkering.

 

Have you set the page rules I have listed above?

BAlGaInTl
Posted (edited)

To be honest, I have mine as default and it doesn't seem to be caching either... but Its only me that looks at Emby at the moment, I haven't made the switch yet... just getting everything working the way I like first and tinkering.

 

I don't remember where I found that original guide for caching images at Cloudflare... but I just dug a little deeper, and it looks like there may be a typo in the Page Rules that I have.

 

It looks like

*domain.net/emby/item/*/images/*

should be 

*domain.net/emby/items/*/images/*

I figured this out by working with the developer tools in my browser.

 

I've changed mine and we will see what happens.

Edited by BAlGaInTl
Spaceboy
Posted

Personally I wouldn't bother with any image caching at cloudflare. that only brought problems. the benefit is not significant anyway

pir8radio
Posted

I don't remember where I found that original guide for caching images at Cloudflare... but I just dug a little deeper, and it looks like there may be a typo in the Page Rules that I have.

 

It looks like

*domain.net/emby/item/*/images/*

should be 

*domain.net/emby/items/*/images/*

I figured this out by working with the developer tools in my browser.

 

I've changed mine and we will see what happens.

 

You are correct it should be "ITEMS" 

5e10c1947a292_Screenshotfrom202001041045

 

Personally I wouldn't bother with any image caching at cloudflare. that only brought problems. the benefit is not significant anyway

 

It speeds up my server, due to needing to "hit" my emby/nginx server less.   Every background image, actor image, movie poster, icon, channel logo, is cached on the edge servers closest to the end user,  gui response time is noticeably faster, less hits on my server, less calls to make that have longer delays (more hops to my server vs the CDN Edge servers).  I have not had any stale image issues CF seems to update the cache if the image changes.  I've been pretty happy with it. 

Spaceboy
Posted

You are correct it should be "ITEMS"

5e10c1947a292_Screenshotfrom202001041045

 

 

It speeds up my server, due to needing to "hit" my emby/nginx server less. Every background image, actor image, movie poster, icon, channel logo, is cached on the edge servers closest to the end user, gui response time is noticeably faster, less hits on my server, less calls to make that have longer delays (more hops to my server vs the CDN Edge servers). I have not had any stale image issues CF seems to update the cache if the image changes. I've been pretty happy with it.

ive had issues with it in the past and the files it is caching are tiny. Not with emby so I may look at switching back on just for emby but the gains are still marginal imo
BAlGaInTl
Posted

ive had issues with it in the past and the files it is caching are tiny. Not with emby so I may look at switching back on just for emby but the gains are still marginal imo

 

The caching is just a bonus to the other features I get

 

-DDoS Protection

-Long Certificate

-IP Masking

-Firewall to block non-US traffic

Spaceboy
Posted

The caching is just a bonus to the other features I get

 

-DDoS Protection

-Long Certificate

-IP Masking

-Firewall to block non-US traffic

yeah I’ve been using cloudflare for years. No need to sell me the benefits[emoji3]

 

Ok I’ll be specific. The caching in cloudflare caused me issues with updates to sonarr, which also runs behind my reverse proxy. It was caching and only ever displaying a page saying I needed to update sonarr making it inoperable, since then I’ve had caching off

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...