Kodi Community Forum

Full Version: Headless Kodi
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
(2015-05-14, 09:58)MuzzleAU Wrote: [ -> ]
(2015-05-13, 03:26)Richie Wrote: [ -> ]So I've been monitoring the headless Kodi client development for sometime, as it's exactly what I want. I've got a Synology NAS which, just yesterday, has now had it's firmware updated to DSM 5.2. Nothing huge, other than the fact it now supports docker.

Loaded up Kodi headless Helix (sparklyballz version) and it seemed to load in, create the image and container, but can't for the love of me how to access the web gui.

Does anyone have any advice they can give me to get this working?

I've got it working on my Synology DS1511 using that version (BTW nice job Sparklyballz).

There's a few things you need to set up on the Synology Docker UI. Click the 'Edit' button on the 'Container' tab and...
1. On the 'Basic Options' tab, click '+' to add a port mapping. The default web port is 8080, so I made a mapping from local port 8008 to container port 8080 to avoid any conflicts with my NAS.
2. On the 'Environment Variables' tab, add the login settings for your MySQL database; these variables are named 'MYSQLip', 'MYSQLport', 'MYSQLuser', 'MYSQLpass'.
3. On the 'Volume' tab, you might want to add a mount for the Thumbnails if you're using a shared folder across all your PCs.

Incidentally, the default login / pass to the web interface is 'xbmc'/'xbmc'.

This is likely enough if you're using the default database names (eg. MyVideo##). Unfortunately in my case, I have non-standard names as a result of following this guide, and had to SSH into the container and make manual adjustments.

I also have a synology NAS and running docker.
How do you enter the kodi container by SSH?
I tried port forwarding but when i connect my SSH connection is simply not accepted

Also i have on all my kodi clients a sources.xml with the correct paths to my media (located on the nas), how do i set this in kodi headless (in docker on a synology nas)?

I do have the media vissible on the web interface, but i don;t understand how this headless version scan for new media and where it scans, i cannot set this?
Does it scan automaticly using cron/intervals or more like watchdog?

Who can explain how this works and how to set this?
(2015-05-19, 22:56)B3rt Wrote: [ -> ]I also have a synology NAS and running docker.
How do you enter the kodi container by SSH?
I tried port forwarding but when i connect my SSH connection is simply not accepted

SSH into the NAS first, then use the 'docker' command from within the NAS.

First run 'docker ps' to get a list of whats running. It'll spit out something like this:

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
18e7d80a897f registry.hub.docker.com/sparklyballs/headless-kodi-helix:latest "/sbin/my_init" 6 days ago Up 5 days 9777/udp, 0.0.0.0:8008->8080/tcp headless-kodi-helix

Next, run 'docker exec -it 18e7d80a897f bash' (replacing 18e7d80a897f with the container ID with the output from running docker ps above). You'll then be in a shell running in the container.

(2015-05-19, 22:56)B3rt Wrote: [ -> ]Also i have on all my kodi clients a sources.xml with the correct paths to my media (located on the nas), how do i set this in kodi headless (in docker on a synology nas)?

I do have the media vissible on the web interface, but i don;t understand how this headless version scan for new media and where it scans, i cannot set this?
Does it scan automaticly using cron/intervals or more like watchdog?

Who can explain how this works and how to set this?

Not sure I can help you there... I have Sickbeard adding via the web API (rather than relying on the headless Kodi to scan).

Though I did also copy across the sources.xml / passwords.xml files from an existing Kodi client into the container's Kodi profile folder (/opt/kodi-server/share/kodi/portable_data/userdata), just in case.

Maybe the XBMC Library Updater addon might do what you need?
I try i also as a docker on my Synology.
But when i copy sources.xml to: /opt/kodi-server/share/kodi/portable_data/userdata (next to advancedsettings.xml), and i start the container, nothing happend.
When i check te log i see:

*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
stderr
11:59:33
*** Running /etc/my_init.d/firstrun.sh...
stderr
11:59:33
using existing datafiles
stdout
11:59:33
using existing advancedsettings.xml
stdout
11:59:33
*** Running /etc/rc.local...
stderr
11:59:33
*** Booting runit daemon...
stderr
11:59:33
*** Runit started as PID 21
stderr
11:59:34
May 20 09:59:34 Kodi syslog-ng[29]: syslog-ng starting up; version='3.5.3'
stdout
11:59:35
Can't open display


My sources.xml:

<sources>
<programs>
<default pathversion="1"></default>
</programs>
<video>
<default pathversion="1"></default>
<source>
<name>Video</name>
<path pathversion="1">nfs://10.73.31.1/volume1/Synology/Media/Video/</path>
<allowsharing>true</allowsharing>
</source>
<source>
<name>Tv-serie</name>
<path pathversion="1">nfs://10.73.31.1/volume1/Synology/Media/Tv-serie/</path>
<allowsharing>true</allowsharing>
</source>
<source>
<name>Kids</name>
<path pathversion="1">nfs://10.73.31.1/volume1/Synology/Media/Kids/</path>
<allowsharing>true</allowsharing>
</source>
<source>
<name>Test</name>
<path pathversion="1">nfs://10.73.31.1/volume1/Synology/Media/Test/</path>
<allowsharing>true</allowsharing>
</source>
<source>
<name>Music Video</name>
<path pathversion="1">nfs://10.73.31.1/volume1/Synology/Media/Music Video/</path>
<allowsharing>true</allowsharing>
</source>
</video>
<music>
<default pathversion="1"></default>
<source>
<name>Audio</name>
<path pathversion="1">nfs://10.73.31.1/volume1/Synology/Media/Audio/</path>
<allowsharing>true</allowsharing>
</source>
</music>
<pictures>
<default pathversion="1"></default>
</pictures>
<files>
<default pathversion="1"></default>
</files>
</sources>



(the media files, and database and docker are on the NAS/ipadres)
I'm assuming this doesn't work with NFS sources? I've had it running on my system and it sees the 'library' but not attached to any media files.
there is no reason that it shouldn't work with NFS
i understand but why don't see kodi my sources.xml
Oden do you mind explaing how you merged this with master? thanks!
(2015-05-14, 09:58)MuzzleAU Wrote: [ -> ]
(2015-05-13, 03:26)Richie Wrote: [ -> ]So I've been monitoring the headless Kodi client development for sometime, as it's exactly what I want. I've got a Synology NAS which, just yesterday, has now had it's firmware updated to DSM 5.2. Nothing huge, other than the fact it now supports docker.

Loaded up Kodi headless Helix (sparklyballz version) and it seemed to load in, create the image and container, but can't for the love of me how to access the web gui.

Does anyone have any advice they can give me to get this working?

I've got it working on my Synology DS1511 using that version (BTW nice job Sparklyballz).

There's a few things you need to set up on the Synology Docker UI. Click the 'Edit' button on the 'Container' tab and...
1. On the 'Basic Options' tab, click '+' to add a port mapping. The default web port is 8080, so I made a mapping from local port 8008 to container port 8080 to avoid any conflicts with my NAS.
2. On the 'Environment Variables' tab, add the login settings for your MySQL database; these variables are named 'MYSQLip', 'MYSQLport', 'MYSQLuser', 'MYSQLpass'.
3. On the 'Volume' tab, you might want to add a mount for the Thumbnails if you're using a shared folder across all your PCs.

Incidentally, the default login / pass to the web interface is 'xbmc'/'xbmc'.

This is likely enough if you're using the default database names (eg. MyVideo##). Unfortunately in my case, I have non-standard names as a result of following this guide, and had to SSH into the container and make manual adjustments.

How did you add your sources?
Because my headless kodi in DOcker doesn't find any sources/
I have copy my sources.xml next to advancedsettings.xml for sure.
(2015-06-04, 09:53)Stephan296 Wrote: [ -> ]How did you add your sources?
Because my headless kodi in DOcker doesn't find any sources/
I have copy my sources.xml next to advancedsettings.xml for sure.

Just by copying the sources.xml and passwords.xml from a working Kodi installation.

All my shares are SMB though (simple username/password protection)... the ones listed in your post are NFS (don't know anything about that, sorry).

The kodi.log file (under /opt/kodi-server/share/kodi/portable_data/temp) might have more detail, if you haven't already checked.

sources.xml:
Code:
<sources>
    <programs>
        <default pathversion="1"></default>
    </programs>
    <video>
        <default pathversion="1"></default>
        <source>
            <name>Movies</name>
            <path pathversion="1">smb://NAS/video/Movies/</path>
        </source>
        <source>
            <name>TV</name>
            <path pathversion="1">smb://NAS/video/TV/</path>
        </source>
    </video>
    <music>
        <default pathversion="1"></default>
        </source>
    </music>
    <pictures>
        <default pathversion="1"></default>
    </pictures>
    <files>
        <default pathversion="1"></default>
    </files>
</sources>

passwords.xml:
Code:
<passwords>
    <path>
        <from pathversion="1">smb://NAS/video</from>
        <to pathversion="1">smb://username:password@NAS/video/TV/</to>
    </path>
</passwords>
(2015-06-04, 12:34)MuzzleAU Wrote: [ -> ]
(2015-06-04, 09:53)Stephan296 Wrote: [ -> ]How did you add your sources?
Because my headless kodi in DOcker doesn't find any sources/
I have copy my sources.xml next to advancedsettings.xml for sure.

Just by copying the sources.xml and passwords.xml from a working Kodi installation.

All my shares are SMB though (simple username/password protection)... the ones listed in your post are NFS (don't know anything about that, sorry).

The kodi.log file (under /opt/kodi-server/share/kodi/portable_data/temp) might have more detail, if you haven't already checked.

sources.xml:
Code:
<sources>
    <programs>
        <default pathversion="1"></default>
    </programs>
    <video>
        <default pathversion="1"></default>
        <source>
            <name>Movies</name>
            <path pathversion="1">smb://NAS/video/Movies/</path>
        </source>
        <source>
            <name>TV</name>
            <path pathversion="1">smb://NAS/video/TV/</path>
        </source>
    </video>
    <music>
        <default pathversion="1"></default>
        </source>
    </music>
    <pictures>
        <default pathversion="1"></default>
    </pictures>
    <files>
        <default pathversion="1"></default>
    </files>
</sources>

passwords.xml:
Code:
<passwords>
    <path>
        <from pathversion="1">smb://NAS/video</from>
        <to pathversion="1">smb://username:password@NAS/video/TV/</to>
    </path>
</passwords>

Thx for your answer!
I have made samba mount, i see in the log that he import sources.xml but in the webinterface i dont see any movie of tv-serie.
Did you scan of change some settings?
(2015-06-05, 13:31)Stephan296 Wrote: [ -> ]Thx for your answer!
I have made samba mount, i see in the log that he import sources.xml but in the webinterface i dont see any movie of tv-serie.
Did you scan of change some settings?

No, they just showed up immediately in the web interface.

You say you changed to SMB in the sources.xml, but did you also rebuild the MySql database? (since the paths are also in the database, they'll still be NFS unless rebuilt)
hello i have a synology NAS too and i would know if with this docker ( thanks to sparkyballz ) when installed , i can see movies and photos on my hdmi TV ( plug to hdmi port on NAS ) .

I would like to insall a dockerfile in my NAS that permitt to run a kodi stand alone instance at start .

I think this is possible , and i ' m wondering if anyone already does it , if yes could you paste link please .

so my NAS become a NAS + XBMC server
@MuzzleAU Thank you for your how-to. It works like a charm.

my little raspberry pi will retire now :-)
(2015-06-12, 12:23)iznobe Wrote: [ -> ]hello i have a synology NAS too and i would know if with this docker ( thanks to sparkyballz ) when installed , i can see movies and photos on my hdmi TV ( plug to hdmi port on NAS ) .

I would like to insall a dockerfile in my NAS that permitt to run a kodi stand alone instance at start .

I think this is possible , and i ' m wondering if anyone already does it , if yes could you paste link please .

so my NAS become a NAS + XBMC server

Hello,

I don't think so. This headless server purpose is "only" to update your library from your nas, run the xbmc web server to display your library (not to watch movie), or broardcast movies with dlna through your network (if your TV has a DLNA client built-in, it could be useful for you)

Not sure it is possible to do what you want to do. I even did't knew that synology's nas have a hdmi port.
By the way, does anyone know how to install plug-in and web template on a headless kodi through ssh ?

Thanks in advance,
Manu
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32