Jump to content
linuxserver.io

[Support] Linuxserver.io - Emby

13 posts in this topic Last Reply

Recommended Posts

linuxserver_medium.thumb.png.b407cab2e164ef4adc7e4edd3c045566.png

 

Application Name: Emby

Application Site: https://emby.media/

Docker Hub: https://hub.docker.com/r/linuxserver/emby/

Github: https://github.com/linuxserver/docker-emby

 

Please post any questions/issues relating to this docker you have in this thread.

 

If you are not using Unraid (and you should be!) then please do not post here, instead head to linuxserver.io to see how to get support.

Share this post


Link to post
Posted (edited)

We've made it easier to get Nvidia & iGPU hardware trancoding working with this container.  This post will detail what you need to do to use either of these in your container. (Emby Premiere Required)

 

Nvidia

1.  Install the Unraid Nvidia Plugin, download the version of Unraid required containing the Nvidia drivers and reboot

2.  Add the Emby container and add --runtime=nvidia to extra parameters (switch on advanced template view) and copy your GPU UUID to the pre-existing NVIDIA_VISIBLE_DEVICES parameter.  There is no need to utilise the NVIDIA_DRIVER_CAPABILITIES parameter any more.  This is handled by our container.

 

Intel GPU

1.  Edit your go file and add modprobe i915 to it, save and reboot.

2.  Add the Emby container and add --device=/dev/dri to extra parameters (switch on advanced template view)  There is no need to chmod/chown the /dev/dri, this is handled by the container.

Edited by linuxserver.io

Share this post


Link to post

can anyone help with this error please?

Version: 4.2.1.0

Command line: /app/emby/EmbyServer.dll -programdata /config -ffdetect /app/emby/ffdetect -ffmpeg /app/emby/ffmpeg -ffprobe /app/emby/ffprobe
Operating system: Unix 4.19.56.0
64-Bit OS: True
64-Bit Process: True
User Interactive: True
Runtime: file:///app/emby/System.Private.CoreLib.dll
Processor count: 2
Program data path: /config
Application directory: /app/emby
System.Net.HttpListenerException: System.Net.HttpListenerException (13): Permission denied
at SocketHttpListener.Net.HttpEndPointManager.GetEPListener(ILogger logger, String host, Int32 port, HttpListener listener, Boolean secure)
at SocketHttpListener.Net.HttpEndPointManager.AddPrefixInternal(ILogger logger, String p, HttpListener listener)
at SocketHttpListener.Net.HttpEndPointManager.AddListener(ILogger logger, HttpListener listener)
at SocketHttpListener.Net.HttpListener.Start()
at Emby.Server.Implementations.ApplicationHost.StartServer()
Source: SocketHttpListener
TargetSite: SocketHttpListener.Net.HttpEndPointListener GetEPListener(MediaBrowser.Model.Logging.ILogger, System.String, Int32, SocketHttpListener.Net.HttpListener, Boolean)

Info HttpServer: Adding HttpListener prefix http://+:8096/
Info HttpServer: Adding HttpListener prefix https://+:8920/
Info SqliteItemRepository: Default journal_mode for /config/data/library.db is wal
Error Main: Error in appHost.Init

*** Error Report ***

Version: 4.2.1.0

Command line: /app/emby/EmbyServer.dll -programdata /config -ffdetect /app/emby/ffdetect -ffmpeg /app/emby/ffmpeg -ffprobe /app/emby/ffprobe
Operating system: Unix 4.19.56.0
64-Bit OS: True
64-Bit Process: True
User Interactive: True
Runtime: file:///app/emby/System.Private.CoreLib.dll
Processor count: 2
Program data path: /config
Application directory: /app/emby
SQLitePCL.pretty.SQLiteException: Corrupt: database disk image is malformed
SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown.
at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc)
at SQLitePCL.pretty.StatementImpl.MoveNext()
at SQLitePCL.pretty.DatabaseConnection.ExecuteAll(IDatabaseConnection This, String sql)
at Emby.Server.Implementations.Data.SqliteItemRepository.Initialize(SqliteUserDataRepository userDataRepo, IUserManager userManager)
at Emby.Server.Implementations.ApplicationHost.InitDatabases()
at Emby.Server.Implementations.ApplicationHost.Init()
at EmbyServer.HostedService.StartAsync(CancellationToken cancellationToken)
Source: SQLitePCL.pretty
TargetSite: Void CheckOk(SQLitePCL.sqlite3, Int32)

Info Main: Shutdown complete
Info Main: Application path: /app/emby/EmbyServer.dll

It ran ok for a week or so then this error happened.  i removed it and reinstalled but it's happened again after about a week

Share this post


Link to post
Posted (edited)

Hi Guys,

I am trying to setup a reverse proxy to connect to my home emby docker remotely. And I am having a few issues and maybe a lack of understanding. I couldn’t find this question or problem anywhere, that’s why I’m posting it here (not sure if it's an emby or a letsencrypt problem). Please excuse that I’m just a beginner and don’t understand everything.

Here is my situation:

I followed these tutorials from spaceinvaderone:
https://www.youtube.com/watch?v=I0lhZc25Sro
https://www.youtube.com/watch?v=AS0HydTEuA4

I have rented a domain (domain.com) at godaddy and changed the name servers to my cloudflare account. At my cloudflare  I have setup two cnames (nextcloud and emby) both with with the same target (sub.duckdns.org). This duckdns URL is connected to the duckdns docker running on my server.
(As far as I know this should work)

My router is configured to forward port 443 and port 80 to port 1443 and port 180 on my unraid machine.
The ports for the letsencrypt docker are changed respectively. When I view the log of letsencrypt it reads ‘Server ready’ at the bottom.

Then in the letsencrypt -> nginx -> poxy-confs folder  I saved the emby.subdomain.conf.sample file as emby.subdomain.conf. Where ‘server_name’ is ‘emby.*;’, because I want to access my emby through that subdomain.
This conf file has a few comments at the top:

# make sure that your dns has a cname set for emby, if emby is running in bridge mode, the below config should work as is, although,

The cname is setup, but emby is not running in bridge mode. I have setup a custom net, as shown in the spaceinvaderone video, but now I don’t know what to change in the conf file.

# the container name is expected to be "emby", if not, replace the lines "set $upstream_emby emby;" with "set $upstream_emby <containername>;"

As my container name is ‘Emby’ I changed that. But Emby is only the display name in Unraid, in the appdata folder there’s an EmbyServer folder, so to what should I change it in the conf?

# for host mode, replace the lines "proxy_pass http://$upstream_emby:8096;" with "proxy_pass http://HOSTIP:8096;" HOSTIP being the IP address of emby

What other mode than host mode is there for emby? And what is the IP address of emby? When I go to the emby settings, there are two addresses on the dashboard site. None of them work. Not In-Home nor Remote. This is probably because I didn’t setup port forwarding in my router settings. But to my understanding that’s how it’s supposed to be, as everything should be routed through letsencrypt.
I tried with different IP addresses for HOSTIP, but nothing did work and I don’t know what I’m missing. Or is it my unraid machine's ip? Because I can access emby using that.

# in emby settings, under "Advanced" change the public https port to 443, leave the local ports as is, set the "external domain" to your url,

Again I’m not sure what to put here. I communicate to letsencrypt through port 1443, so should I put that here as well? And is emby.domain.com my url or is it domain.com??

I still don’t really get how it works that two cnames point to the same ip (sub.duckdns.org), but letsencrypt is supposed to know when to connect to my nextcloud docker and when to my emby docker.

Any help regarding this will really be appreciated.
Thanks

 

SOLUTION:

Okay so I have just solved the issue and will show my steps for future people with a similar problem;

It doesn't matter if emby is running in bridge mode or not, but I think it has to be in the same network mode as letsencrypt. (Not sure if mandetory, but works for me) Also for <containername> choose the display name, not the folder's name. HOSTIP should be the local IP address (the right one from the emby docker at the unraid docker tab). Don't forward port 8096 in your router, because then you will have an additional exposed port, and then you wouldn't need letsencrypt. Inside the emby settings set public https port to 443 even if you changed the letsencrypt port like I did (letsencrypt handles my incoming port 1443 as port 443 in the internal proxynet). Don't forget your subdomain for your "external domain"! I still don't really get how exactly cnames work, but at this point I don't care anymore. It just works and I am happy about it. It's possible that my explanations aren't quite correct, because I didn't exactly know what I was doing, so please keep that in mind. In the end I think it was a cloudflare problem, because when I would try to connect firefox always showed a "not properly redirected error" and I had to disable proxy in my dns settings in cloudflare.

Edited by noran

Share this post


Link to post

Having an issue with the new UMASK_SET variable. I've set this to 000. However new images get created in my media folders with the wrong permissions. 

 

I have a user script to tidy these up but it would be good if Emby created files with the correct permissions. The files it creates seem to be using the default UMASK of 022 as created files are 644 and backdrops directories are 755. I want 666 files and 777 directories if at all possible.

Share this post


Link to post
3 hours ago, dgreig said:

Having an issue with the new UMASK_SET variable. I've set this to 000. However new images get created in my media folders with the wrong permissions. 

 

I have a user script to tidy these up but it would be good if Emby created files with the correct permissions. The files it creates seem to be using the default UMASK of 022 as created files are 644 and backdrops directories are 755. I want 666 files and 777 directories if at all possible.

Please post your docker run command.

Share this post


Link to post

As requested:

 

root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='emby' --net='bridge' --cpuset-cpus='10,11,12,13,14,15,26,27,28,29,30,31' --log-opt max-size='10m' --log-opt max-file='3' -e TZ="Europe/London" -e HOST_OS="Unraid" -e 'UID'='99' -e 'GID'='100' -e 'GIDLIST'='100' -e 'NVIDIA_VISIBLE_DEVICES'='GPU-66d7bffd-998c-3fd7-c9eb-f71063803d75' -e 'UMASK_SET'='000' -p '8096:8096/tcp' -v '/mnt':'/mnt':'rw' -v '/mnt/user':'/unraid':'rw' -v '/tmp':'/config/transcoding-temp':'rw' -v '/mnt/cache/appdata/EmbyServer':'/config':'rw' --runtime=nvidia 'emby/embyserver:beta' 

26d948bb9ae05b57247936dc185bfc3f79713fc8acce655f5b05ae8ecc266653

The command finished successfully!

 

The script I wrote to identify these issues runs every day and picked up the following this morning:

 


Script Starting Fri, 06 Sep 2019 06:45:01 +0100

Full logs for this script are available at /tmp/user.scripts/tmpScripts/Fix File Permissions/log.txt

Fixing files not conforming to unRAID permissions standards in XXX share
/mnt/user/xxx/xxx/xxx/xxx.nfo : -rw-r--r--
/mnt/user/xxx/xxx/xxx/poster.jpg : -rw-r--r--
/mnt/user/xxx/xxx/xxx/fanart.jpg : -rw-r--r--
/mnt/user/xxx/xxx/xxx/landscape.jpg : -rw-r--r--
/mnt/user/xxx/xxx/xxx/logo.png : -rw-r--r--
Fixing directories not conforming to unRAID permissions standards in XXX share
Fixing files and directories not conforming to unRAID user:group standards in XXX share

Fixing files not conforming to unRAID permissions standards in YYY share
Fixing directories not conforming to unRAID permissions standards in YYY share
Fixing files and directories not conforming to unRAID user:group standards in YYY share

Fixed all issues where found

Edited by dgreig

Share this post


Link to post
2 hours ago, dgreig said:

As requested:

 

root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='emby' --net='bridge' --cpuset-cpus='10,11,12,13,14,15,26,27,28,29,30,31' --log-opt max-size='10m' --log-opt max-file='3' -e TZ="Europe/London" -e HOST_OS="Unraid" -e 'UID'='99' -e 'GID'='100' -e 'GIDLIST'='100' -e 'NVIDIA_VISIBLE_DEVICES'='GPU-66d7bffd-998c-3fd7-c9eb-f71063803d75' -e 'UMASK_SET'='000' -p '8096:8096/tcp' -v '/mnt':'/mnt':'rw' -v '/mnt/user':'/unraid':'rw' -v '/tmp':'/config/transcoding-temp':'rw' -v '/mnt/cache/appdata/EmbyServer':'/config':'rw' --runtime=nvidia 'emby/embyserver:beta' 

26d948bb9ae05b57247936dc185bfc3f79713fc8acce655f5b05ae8ecc266653

The command finished successfully!

 

The script I wrote to identify these issues runs every day and picked up the following this morning:

 


Script Starting Fri, 06 Sep 2019 06:45:01 +0100

Full logs for this script are available at /tmp/user.scripts/tmpScripts/Fix File Permissions/log.txt

Fixing files not conforming to unRAID permissions standards in XXX share
/mnt/user/xxx/xxx/xxx/xxx.nfo : -rw-r--r--
/mnt/user/xxx/xxx/xxx/poster.jpg : -rw-r--r--
/mnt/user/xxx/xxx/xxx/fanart.jpg : -rw-r--r--
/mnt/user/xxx/xxx/xxx/landscape.jpg : -rw-r--r--
/mnt/user/xxx/xxx/xxx/logo.png : -rw-r--r--
Fixing directories not conforming to unRAID permissions standards in XXX share
Fixing files and directories not conforming to unRAID user:group standards in XXX share

Fixing files not conforming to unRAID permissions standards in YYY share
Fixing directories not conforming to unRAID permissions standards in YYY share
Fixing files and directories not conforming to unRAID user:group standards in YYY share

Fixed all issues where found

You are not using our container.

Share this post


Link to post

I have an issue that's driving me a little nuts.

 

I have emby as a docker container and because docker assigns it a private 172.17.x.x address clients inside my home network can't access the server when logging in using emby connect.  I can give the container it's own IP address on my network which fixes that issue but then other apps such as Sonarr and Radarr can't talk to it.  


Any ideas?

 

 

Share this post


Link to post

Think you need to set your IP here. The second issue is caused by a security "feature" of docker.

Screenshot_20190911-215528.jpg

Share this post


Link to post
27 minutes ago, j0nnymoe said:

Think you need to set your IP here. The second issue is caused by a security "feature" of docker.

Screenshot_20190911-215528.jpg

This worked, thank you. I can't believe I overlooked it.  Just started using Emby yesterday from Plex and learning the ropes.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.