Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Release Headless Kodi Docker Container
#1
Heart 
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
Reply
#2
Thread stickied in this forum subsection for the obvious reason.
Reply
#3
Pardon my *extreme* ignorance but... what's the point of Kodi headless? Is it for centralized database use, towards other clients?
For troubleshooting and bug reporting please make sure you read this first (usually it's enough to follow instructions in the second post).
Reply
#4
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)
Reply
#5
(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.
For troubleshooting and bug reporting please make sure you read this first (usually it's enough to follow instructions in the second post).
Reply
#6
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
Reply
#7
root@5ae7ff8624ca:/usr/lib/kodi# ls
addons  cmake  kodi-x11  kodi-xrandr  system

it does exist though
Reply
#8
What OS and architecture? And what headless kodi version trying?
Reply
#9
Ubuntu 22.04/x86 and using nexus
Reply
#10
x86_64 ?
I dont build 32bit
Reply
#11
Yes, 64 bit
Ubuntu 22.04.1 LTS (GNU/Linux 5.15.0-58-generic x86_64)
Reply
#12
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
Reply
#13
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
Reply
#14
Oh, think you had same issue as
https://github.com/matthuisman/docker-ko.../issues/30

Looks like updating docker may solve
Reply
#15
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?
Reply

Logout Mark Read Team Forum Stats Members Help
Headless Kodi Docker Container0