Jump to content

Emby on Docker + Nginx reverse proxy


lgromb
Go to solution Solved by pir8radio,

Recommended Posts

Hello guys,

 

I'm pretty new to Emby, and one feature I want to work as much as possible is mobile Sync. As I do a lot of commute in network blank areas, I like to sync my medias prior to leaving home/work and watch them on the Emby Android App.

 

I installed Emby via Docker using the official image, in bridged network. Using nginx, I reverse proxified emby using what I could find here, to that configuration :

  server {
    listen 2443 ssl;
    server_name emby.example.com; 
    ssl_session_timeout 30m;
    ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
    ssl_certificate      /etc/certificates/wildcard/example.cer;
    ssl_certificate_key  /etc/certificates/wildcard/domain.key;
    ssl_session_cache shared:SSL:10m;	
    access_log /var/log/nginx/example/443-emby_access.log;
    error_log /var/log/nginx/example/443-emby_error.log;
    #add_header X-Xss-Protection "1; mode=block" always;
    #add_header X-Content-Type-Options "nosniff" always;
    #add_header Strict-Transport-Security "max-age=2592000; includeSubdomains" always;
    #add_header X-Frame-Options "SAMEORIGIN" always;
    proxy_hide_header X-Powered-By;
    #add_header 'Referrer-Policy' 'no-referrer';
    #add_header Content-Security-Policy "frame-ancestors home.example.com example.com emby.example.com;";
    location / {
      proxy_pass http://192.168.1.97:8096;
      proxy_redirect off;
      proxy_set_header Range $http_range;
      proxy_set_header If-Range $http_if_range;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header Host $host;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Forwarded-Protocol $scheme;
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";
    }
}

(Don't mind the listen 2443, it's actually to use with sshuttle)

So this is wonderfully working for streaming (both Web/Android/Android TV, any network, any connection)

 

The only thing that doesn't work is Sync on Android, everytime I try to download something, it immediatly stops and Emby shows it at 0% indefinitly.

 

Here's a log extract from the moment I pressed "Download" on the app until it stopped doing anything.

019-02-19 09:54:09.965 Info HttpServer: HTTP GET http://emby.example.fr:8096/Sync/Options?UserId=db5896b76a0e466b9b4b8f0c88d26bce&ItemIds=10014&ExcludeProviders=ConvertSyncProvider. UserAgent: Mozilla/5.0 (Linux; Android 8.1.0 + xXx_NoLimits_3.3; ONEPLUS A5000 Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/72.0.3626.105 Mobile Safari/537.36
2019-02-19 09:54:09.968 Info HttpServer: HTTP Response 200 to 172.18.0.1. Time: 3ms. http://emby.example.fr:8096/Sync/Options?UserId=db5896b76a0e466b9b4b8f0c88d26bce&ItemIds=10014&ExcludeProviders=ConvertSyncProvider
2019-02-19 09:54:10.001 Info HttpServer: HTTP GET http://emby.example.fr:8096/Sync/Options?UserId=db5896b76a0e466b9b4b8f0c88d26bce&ItemIds=10014&ExcludeProviders=ConvertSyncProvider&TargetId=fc078659fcc88bf3. UserAgent: Mozilla/5.0 (Linux; Android 8.1.0 + xXx_NoLimits_3.3; ONEPLUS A5000 Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/72.0.3626.105 Mobile Safari/537.36
2019-02-19 09:54:10.007 Info HttpServer: HTTP Response 200 to 172.18.0.1. Time: 6ms. http://emby.example.fr:8096/Sync/Options?UserId=db5896b76a0e466b9b4b8f0c88d26bce&ItemIds=10014&ExcludeProviders=ConvertSyncProvider&TargetId=fc078659fcc88bf3
2019-02-19 09:54:13.436 Info HttpServer: HTTP POST http://emby.example.fr:8096/Sync/Jobs. UserAgent: Mozilla/5.0 (Linux; Android 8.1.0 + xXx_NoLimits_3.3; ONEPLUS A5000 Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/72.0.3626.105 Mobile Safari/537.36
2019-02-19 09:54:13.446 Info App: Bitrate exceeds DirectPlay limit: media bitrate: 3604552, max bitrate: 320000
2019-02-19 09:54:13.446 Info App: Profile: Unknown Profile, Path: /data/movies/A.I. Artificial Intelligence (2001)/A.I. Intelligence Artificielle (2001) VFF-ENG AC3 BluRay 1080p x264.GHT.mkv, isEligibleForDirectPlay: False, isEligibleForDirectStream: True
2019-02-19 09:54:13.448 Info HttpServer: HTTP Response 200 to 172.18.0.1. Time: 12ms. http://emby.example.fr:8096/Sync/Jobs
2019-02-19 09:54:13.653 Info HttpServer: HTTP GET http://emby.example.fr:8096/Users/db5896b76a0e466b9b4b8f0c88d26bce. UserAgent: Mozilla/5.0 (Linux; Android 8.1.0 + xXx_NoLimits_3.3; ONEPLUS A5000 Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/72.0.3626.105 Mobile Safari/537.36
2019-02-19 09:54:13.653 Info HttpServer: HTTP GET http://emby.example.fr:8096/Users/db5896b76a0e466b9b4b8f0c88d26bce/Items/10014. UserAgent: Mozilla/5.0 (Linux; Android 8.1.0 + xXx_NoLimits_3.3; ONEPLUS A5000 Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/72.0.3626.105 Mobile Safari/537.36
2019-02-19 09:54:13.654 Info HttpServer: HTTP Response 200 to 172.18.0.1. Time: 1ms. http://emby.example.fr:8096/Users/db5896b76a0e466b9b4b8f0c88d26bce
2019-02-19 09:54:13.656 Info HttpServer: HTTP Response 200 to 172.18.0.1. Time: 3ms. http://emby.example.fr:8096/Users/db5896b76a0e466b9b4b8f0c88d26bce/Items/10014
2019-02-19 09:54:13.690 Info HttpServer: HTTP GET http://emby.example.fr:8096/Users/db5896b76a0e466b9b4b8f0c88d26bce/Items/10014/SpecialFeatures. UserAgent: Mozilla/5.0 (Linux; Android 8.1.0 + xXx_NoLimits_3.3; ONEPLUS A5000 Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/72.0.3626.105 Mobile Safari/537.36
2019-02-19 09:54:13.691 Info HttpServer: HTTP Response 200 to 172.18.0.1. Time: 1ms. http://emby.example.fr:8096/Users/db5896b76a0e466b9b4b8f0c88d26bce/Items/10014/SpecialFeatures
2019-02-19 09:54:13.691 Info HttpServer: HTTP GET http://emby.example.fr:8096/Items/10014/Similar?userId=db5896b76a0e466b9b4b8f0c88d26bce&limit=12&fields=PrimaryImageAspectRatio%2CUserData%2CCanDelete&IncludeItemTypes=Program. UserAgent: Mozilla/5.0 (Linux; Android 8.1.0 + xXx_NoLimits_3.3; ONEPLUS A5000 Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/72.0.3626.105 Mobile Safari/537.36
2019-02-19 09:54:13.691 Info HttpServer: HTTP GET http://emby.example.fr:8096/Items/10014/Similar?userId=db5896b76a0e466b9b4b8f0c88d26bce&limit=12&fields=PrimaryImageAspectRatio%2CUserData%2CCanDelete. UserAgent: Mozilla/5.0 (Linux; Android 8.1.0 + xXx_NoLimits_3.3; ONEPLUS A5000 Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/72.0.3626.105 Mobile Safari/537.36
2019-02-19 09:54:13.695 Info HttpServer: HTTP Response 200 to 172.18.0.1. Time: 4ms. http://emby.example.fr:8096/Items/10014/Similar?userId=db5896b76a0e466b9b4b8f0c88d26bce&limit=12&fields=PrimaryImageAspectRatio%2CUserData%2CCanDelete&IncludeItemTypes=Program
2019-02-19 09:54:13.696 Info HttpServer: HTTP Response 200 to 172.18.0.1. Time: 5ms. http://emby.example.fr:8096/Items/10014/Similar?userId=db5896b76a0e466b9b4b8f0c88d26bce&limit=12&fields=PrimaryImageAspectRatio%2CUserData%2CCanDelete
2019-02-19 09:54:13.704 Info HttpServer: HTTP POST http://emby.example.fr:8096/Sync/10014/Status. UserAgent: Mozilla/5.0 (Linux; Android 8.1.0 + xXx_NoLimits_3.3; ONEPLUS A5000 Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/72.0.3626.105 Mobile Safari/537.36
2019-02-19 09:54:13.704 Info HttpServer: HTTP POST http://emby.example.fr:8096/Sync/10014/Status. UserAgent: Mozilla/5.0 (Linux; Android 8.1.0 + xXx_NoLimits_3.3; ONEPLUS A5000 Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/72.0.3626.105 Mobile Safari/537.36
2019-02-19 09:54:13.705 Info HttpServer: HTTP Response 200 to 172.18.0.1. Time: 1ms. http://emby.example.fr:8096/Sync/10014/Status
2019-02-19 09:54:13.705 Info HttpServer: HTTP Response 200 to 172.18.0.1. Time: 1ms. http://emby.example.fr:8096/Sync/10014/Status
2019-02-19 09:54:13.754 Info HttpServer: HTTP POST http://emby.example.fr:8096/Items/10014/PlaybackInfo?UserId=db5896b76a0e466b9b4b8f0c88d26bce&StartTimeTicks=0&IsPlayback=false&AutoOpenLiveStream=false&MaxStreamingBitrate=140000000. UserAgent: Mozilla/5.0 (Linux; Android 8.1.0 + xXx_NoLimits_3.3; ONEPLUS A5000 Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/72.0.3626.105 Mobile Safari/537.36
2019-02-19 09:54:13.756 Info App: User policy for krptg. EnablePlaybackRemuxing: True EnableVideoPlaybackTranscoding: True EnableAudioPlaybackTranscoding: True
2019-02-19 09:54:13.756 Info App: Profile: Unknown Profile, Path: /data/movies/A.I. Artificial Intelligence (2001)/A.I. Intelligence Artificielle (2001) VFF-ENG AC3 BluRay 1080p x264.GHT.mkv, isEligibleForDirectPlay: True, isEligibleForDirectStream: True
2019-02-19 09:54:13.756 Info App: Profile: Unknown Profile, Path: /data/movies/A.I. Artificial Intelligence (2001)/A.I. Intelligence Artificielle (2001) VFF-ENG AC3 BluRay 1080p x264.GHT.mkv, isEligibleForDirectPlay: True, isEligibleForDirectStream: True
2019-02-19 09:54:13.756 Info App: Profile: Unknown Profile, Path: /data/movies/A.I. Artificial Intelligence (2001)/A.I. Intelligence Artificielle (2001) VFF-ENG AC3 BluRay 1080p x264.GHT.mkv, isEligibleForDirectPlay: True, isEligibleForDirectStream: True
2019-02-19 09:54:13.756 Info HttpServer: HTTP Response 200 to 172.18.0.1. Time: 2ms. http://emby.example.fr:8096/Items/10014/PlaybackInfo?UserId=db5896b76a0e466b9b4b8f0c88d26bce&StartTimeTicks=0&IsPlayback=false&AutoOpenLiveStream=false&MaxStreamingBitrate=140000000
2019-02-19 09:54:13.763 Info HttpServer: HTTP GET http://emby.example.fr:8096/emby/system/info/public. UserAgent: Mozilla/5.0 (Linux; Android 8.1.0 + xXx_NoLimits_3.3; ONEPLUS A5000 Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/72.0.3626.105 Mobile Safari/537.36
2019-02-19 09:54:13.763 Info HttpServer: HTTP Response 200 to 172.18.0.1. Time: 0ms. http://emby.example.fr:8096/emby/system/info/public
2019-02-19 09:54:13.776 Info HttpServer: HTTP GET http://emby.example.fr:8096/emby/web/manifest.json. UserAgent: Mozilla/5.0 (Linux; Android 8.1.0 + xXx_NoLimits_3.3; ONEPLUS A5000 Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/72.0.3626.105 Mobile Safari/537.36
2019-02-19 09:54:13.776 Info HttpServer: HTTP Response 200 to 172.18.0.1. Time: 1ms. http://emby.example.fr:8096/emby/web/manifest.json
2019-02-19 09:54:13.778 Info HttpServer: HTTP GET http://emby.example.fr:8096/emby/web/strings/en-US.json. UserAgent: Mozilla/5.0 (Linux; Android 8.1.0 + xXx_NoLimits_3.3; ONEPLUS A5000 Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/72.0.3626.105 Mobile Safari/537.36
2019-02-19 09:54:13.778 Info HttpServer: HTTP Response 200 to 172.18.0.1. Time: 1ms. http://emby.example.fr:8096/emby/web/strings/en-US.json
2019-02-19 09:54:13.980 Info HttpServer: HTTP GET http://emby.example.fr:8096/emby/System/Info. UserAgent: Mozilla/5.0 (Linux; Android 8.1.0 + xXx_NoLimits_3.3; ONEPLUS A5000 Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/72.0.3626.105 Mobile Safari/537.36
2019-02-19 09:54:13.981 Info HttpServer: HTTP Response 200 to 172.18.0.1. Time: 1ms. http://emby.example.fr:8096/emby/System/Info
2019-02-19 09:54:14.014 Info HttpServer: HTTP GET http://emby.example.fr:8096/DisplayPreferences/usersettings?userId=db5896b76a0e466b9b4b8f0c88d26bce&client=emby. UserAgent: Mozilla/5.0 (Linux; Android 8.1.0 + xXx_NoLimits_3.3; ONEPLUS A5000 Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/72.0.3626.105 Mobile Safari/537.36
2019-02-19 09:54:14.014 Info HttpServer: HTTP Response 200 to 172.18.0.1. Time: 1ms. http://emby.example.fr:8096/DisplayPreferences/usersettings?userId=db5896b76a0e466b9b4b8f0c88d26bce&client=emby
2019-02-19 09:54:14.175 Info HttpServer: HTTP GET http://emby.example.fr:8096/Sync/Items/Ready?TargetId=fc078659fcc88bf3. UserAgent: Mozilla/5.0 (Linux; Android 8.1.0 + xXx_NoLimits_3.3; ONEPLUS A5000 Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/72.0.3626.105 Mobile Safari/537.36
2019-02-19 09:54:14.178 Info HttpServer: HTTP Response 200 to 172.18.0.1. Time: 3ms. http://emby.example.fr:8096/Sync/Items/Ready?TargetId=fc078659fcc88bf3
2019-02-19 09:54:14.358 Info HttpServer: HTTP POST http://emby.example.fr:8096/Sync/Data. UserAgent: Mozilla/5.0 (Linux; Android 8.1.0 + xXx_NoLimits_3.3; ONEPLUS A5000 Build/OPM1.171019.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/72.0.3626.105 Mobile Safari/537.36
2019-02-19 09:54:14.358 Info HttpServer: HTTP Response 200 to 172.18.0.1. Time: 1ms. http://emby.example.fr:8096/Sync/Data
2019-02-19 09:54:14.435 Info HttpServer: HTTP GET http://emby.example.fr:8096/Sync/JobItems/14/File. UserAgent: AndroidDownloadManager/8.1.0 + xXx_NoLimits_3.3 (Linux; U; Android 8.1.0 + xXx_NoLimits_3.3; ONEPLUS A5000 Build/OPM1.171019.011)

I'm maybe missing something, but why the webserver try to serve http://emby.exemple.com:8096 knowing that the only open port on my setup is 443 over https ?

This is the Emby advanced config :

 

5c6bd505db7e4_imageedit_2_9537563972.png

5c6bd5154fd08_Slection_375.png

 

If any info is missing please ask me, I'll provide them. Thanks for your help !

Link to comment
Share on other sites

Hi, currently the progress will always stay at zero but in the download notification you can see the progress bar that shows download progress. Is that moving?

Link to comment
Share on other sites

Hi, currently the progress will always stay at zero but in the download notification you can see the progress bar that shows download progress. Is that moving?

Hi Luke, the download bar disappears almost instantly when clicking the Download button on the Android app. Already checked the Storage permission for Emby, any other clue or something else I can test? Do you see something wierd in my setup ?

Link to comment
Share on other sites

Hi both of you,

 

I tested by opening the 8096 port, directly. That also means without SSL.

No luck, same issue, the download progress bar on phone appears for a microsecond and then goes away.

Logs show the same "SocketException" error.

 

I'll check the link you sent !

Link to comment
Share on other sites

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...