Kodi Community Forum

Full Version: Headless Kodi Docker Container
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
Image

This has been out for some years, but thought I'd make a thread for it as it's now more stable and complete.

 
  • Leia, Matrix, Nexus & Omega available
  • x86_64 / amd64 / armv7 / armv8 / arm64 compatible
  • Patched to work headless (no gui)
  • Patched to enable addons on boot
  • Patched to allow installing add-ons via cmdline

Source & Instructions
https://github.com/matthuisman/docker-kodi-headless
Thread stickied in this forum subsection for the obvious reason.
Pardon my *extreme* ignorance but... what's the point of Kodi headless? Is it for centralized database use, towards other clients?
I use it so I can have it running on my NAS where my Kodi SQL database lives and where my media lives.
I can then use it to scan in new content very fast and point other Kodi instances to the shared SQL database (https://kodi.wiki/view/MySQL)
(2022-12-05, 23:41)matthuisman Wrote: [ -> ]I use it so I can have it running on my NAS where my Kodi SQL database lives and where my media lives.
I can then use it to scan in new content very fast and point other Kodi instances to the shared SQL database (https://kodi.wiki/view/MySQL)
Thanks for your quick reply. It's more or less as I envisioned it.
hello, im trying to run this. am I supposed to install kodi on my own?

 docker logs -f kodi-headless
[migrations] started
[migrations] no migrations found

-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/


Brought to you by linuxserver.io
-------------------------------------

To support the app dev(s) visit:
Matt Huisman: https://www.matthuisman.nz/donate
Kodi: https://kodi.tv/donate

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    1001
User gid:    1001
-------------------------------------

[custom-init] No custom files found, skipping...
Error: /usr/lib/kodi/kodi-x11 not found
[ls.io-init] done.
Error: /usr/lib/kodi/kodi-x11 not found
Error: /usr/lib/kodi/kodi-x11 not found
Error: /usr/lib/kodi/kodi-x11 not found
root@5ae7ff8624ca:/usr/lib/kodi# ls
addons  cmake  kodi-x11  kodi-xrandr  system

it does exist though
What OS and architecture? And what headless kodi version trying?
Ubuntu 22.04/x86 and using nexus
x86_64 ?
I dont build 32bit
Yes, 64 bit
Ubuntu 22.04.1 LTS (GNU/Linux 5.15.0-58-generic x86_64)
im running basically the same without issue.

you sure your not mounting a volume over /usr or anything silly like that?
the exec it calls is /usr/bin/kodi
which is a bash script that checks /usr/lib/kodi/kodi-x11 exists and is executable and then gives the error your getting if not.
I wonder if it's permission issue...

could you trying setting the env variables PUID and PGID both to 1000
if that doesn't work, try setting both to 0
yes, I do not mount /usr or any other dir in any special dir, all is default.

Tried with both pid 1000 and 0, no difference

 bash -x kodi
+ APP=Kodi
+ bin_name=kodi
+ SAVED_ARGS=
+ prefix=/usr
+ exec_prefix=/usr
+ datarootdir=/usr/share
+ LIBDIR=/usr/lib
+ APP_BINARY=/usr/lib/kodi/kodi-x11
+ CRASHLOG_DIR=/config
+ KODI_DATA=/config/.kodi
+ export __GL_YIELD=USLEEP
+ __GL_YIELD=USLEEP
+ export MALLOC_MMAP_THRESHOLD_=131072
+ MALLOC_MMAP_THRESHOLD_=131072
+ '[' 0 -gt 0 ']'
+ KODI_BINARY=/usr/lib/kodi/kodi-x11
+ '[' '!' -x /usr/lib/kodi/kodi-x11 ']'
+ echo 'Error: /usr/lib/kodi/kodi-x11 not found'
Error: /usr/lib/kodi/kodi-x11 not found
+ exit 2

it has executeable flag as it appears.

root@1ad4558a1249:/usr/lib/kodi# ./kodi-x11 
terminate called after throwing an instance of 'std:Confusedystem_error'
  what():  Operation not permitted
Aborted (core dumped)

is there a text editor inside this docker?

edit: adding --privileged to docker solved it. thanks for the help
Oh, think you had same issue as
https://github.com/matthuisman/docker-ko.../issues/30

Looks like updating docker may solve
Question: i'm running your headless kodi container.
I've enabled the Watchdog plugin to monitor changes

but how and where can i configure which directory should use what scraper :

in a regular kodi instance : i would go to Files -> right click on a directory (for instance movies) : set content  and specify :
- this directory contains : movies
- choose information provider : The movie database python.

I don't find this in the web interface?
Pages: 1 2 3 4 5