Kodi Community Forum

Full Version: kodi headless docker on debian
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I would like to run the kodi-headless docker image on a debian machine (my file server) which is only managable via ssh. In the same network there are some TVs and I just want to use the kodi server for uPnP/DLNA. I don't need any libraries or video playback functions. So I loaded a container with "host" network configuration and "mounted" my media directory of the docker host to /media within the kodi container.
As next step I use the web interface to enable uPnP service. Now I can see the kodi server on my TVs via DLNA; so far so good. But the video and music dirs are empty. My problem is: I can't add my media directory to kodi via web interface. I mean the bottons "File manager" -> "add source" in the settings part of the normal GUI. Since I don't have any GUI, is there any way to add sources via webinterface?
My next thought was to edit the sources.xml in the container but when I load a bash via "docker exec -it kodi /bin/bash" I don't have any tools like vi or nano...

I'm stuck for the moment, any advices? Thanks in advance!

Michael
(2019-12-28, 21:57)Evile Wrote: [ -> ]and I just want to use the kodi server for uPnP/DLNA. I don't need any libraries or video playback functions
But the video and music dirs are empty.

You will need the video library, as the UPnP/DLNA listings are based on it. So your video collection will need to be scraped and kept up-to-date.
Setup Kodi how you would like it to be on the server on a platform with "head" and copy over your userdata folder to the headless-server
Thanks for your replies!
Quote:You will need the video library, as the UPnP/DLNA listings are based on it. So your video collection will need to be scraped and kept up-to-date.
I installed Kodi on a win7 machine for testing. The media dir on the file server is accessable via smb, so I added the smb share on the win7 kodi (In the GUI: Settings -> File manager -> Add source) The I enabled webinterface and DLNA. The music and video libraries are still empty!! (checked on the webinterface). On the TV, I can see the win7 Kodi and I can browse the media dir and play movies. The share is visible besides the empty music and video folders. So I  think it isn't necessary to populate the libraries to share content via DLNA.

Meanwhile I also got vi running in the headless kodi container. So I edited the sources.xml by hand and added a <file> source with the local share on the server. Now I can see the content in the webinterface, like on the win7 machine. BUT: When I browse the headless server on the TV via DLNA I don't see the share. Only the empty video and music folders.

So what happens in the backend when I use the GUI with "Add source" in the "File Manager" menu? It seems that it isn't just an <file> entry in the sources.xml
Quote:Setup Kodi how you would like it to be on the server on a platform with "head" and copy over your userdata folder to the headless-server
Does this work when I copy the folder of a win7 installation to a debian server? At least, I would have to change the paths...

Thanks,
Michael
You cannot populate the libraries from a UPNP source. Those are only available via direct access (file) mode.
Quote:You cannot populate the libraries from a UPNP source. Those are only available via direct access (file) mode.
Tanks for your reply! I don't try to populate the libraries from a UPNP source. Actually I don't populate the libraries any way. I want to share a local folder on my server via UPNP to access it from the TV. That works with a kodi installation on a window 7 machine but not on a headless container on the server. (Server, windows 7 machine and Tv are all in the same network).
Ah ok, sorry. Misunderstood what you were trying, got it backwards Wink

Wouldn't something like a miniDLNA server be simpler, as Kodi for this is somewhat overkill. Testing with that (if you do want to use Kodi for some other reason) might be worthwhile to eliminate networking issues compared to potential issues with the container set-up itself.
(2020-01-09, 17:22)DarrenHill Wrote: [ -> ]Ah ok, sorry. Misunderstood what you were trying, got it backwards Wink

Wouldn't something like a miniDLNA server be simpler, as Kodi for this is somewhat overkill. Testing with that (if you do want to use Kodi for some other reason) might be worthwhile to eliminate networking issues compared to potential issues with the container set-up itself.

Yes maybe Kodi is a little bit overkill but I know that Kodi works with all DLNA clients. If I don't get Kodi running I'll try something else. Network settings of the container are all right (you have to lauch the container with "host" network settings, with that the broadcasts for DLNA also work). I also tried to install Kodi native without container but it always crashes with a segfault when I start it in a X2go session... So running the headless server container is already the simple way Smile