GithubHelp home page GithubHelp logo

rutulian / docker-xbmc-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from celedhrim/docker-kodi-server

0.0 2.0 0.0 153 KB

Runs xbmc in headless mode with docker on any distribution.

License: MIT License

C++ 100.00%

docker-xbmc-server's Introduction

docker-xbmc-server

This will allow you to serve files through the XBMC UPnP Library to your UPnP client/players (such as Xbmc or Chromecast).

Docker is used to compile and run the latest headless version of XBMC Gotham/Frodo

This also includes some custom patches that will fix crashes. See the FAQ section for details.

Preqrequisites:

Quick start

  1. Clone this repository:

     $ git clone [email protected]:wernerb/docker-xbmc-server.git
    
  2. open xbmcdata/userdata/advancedsettings.xml and change the following information to reflect your installation:

     <videodatabase>
             <type>mysql</type>
             <host>192.168.1.50</host>
             <port>3306</port>
             <user>xbmc</user>
             <pass>xbmc</pass>
     </videodatabase>
     <musicdatabase>
             <type>mysql</type>
             <host>192.168.1.50</host>
             <port>3306</port>
             <user>xbmc</user>
             <pass>xbmc</pass>
     </musicdatabase>
    

    The ip,port,user and password refers to your xbmc mysql database.

  3. You now are ready to pull and run XBMC. You can either run as a daemon serving your xbmc library through UPnP as well as being capable of updating your library, or you can simply run the container and only update the xbmc library.
    Before pulling the image and running check what version you need (gotham/frodo)

    • Daemon:

      Run the following command to spawn a docker container running xbmc with UPnP:

        $ docker run -d --net=host --privileged -v /directory/with/xbmcdata:/opt/xbmc-server/portable_data wernerb/docker-xbmc-server:gotham
      
      • Replace wernerb/docker-xbmc-server:gotham with wernerb/docker-xbmc-server:frodo if you use frodo!
      • Replace /directory/with/xbmcdata with the folder where you would like to store the xbmc data. Point it to the full path to the xbmcdata folder of this repository.
      • If you need to mount extra folders, just use -v /local/folder/:/remotefolder. For example, in my case I use -v /media:/media
      • The webserver is automatically configured and started on port 8089 with the username/password configurable in userdata/advancedsettings.xml.

      Extra note:

      • Advanced: If you have problems reaching the web-server then xbmc is binding to the wrong address. Try adding the following after --privileged: -e BIND_ADDR=ipaddress -e LD_PRELOAD=/opt/xbmc-server/bind.so
    • Single run:

      Run docker with the following command each time you want the library to be updated:

        $ sudo docker run -v /directory/with/xbmcdata:/opt/xbmc-server/portable_data --entrypoint=/opt/xbmc-server/xbmcVideoLibraryScan wernerb/docker-xbmc-server:gotham --no-test --nolirc -p
      

      Replace /directory/with/xbmcdata with the folder where you would like to store the xbmc data. Point it to the full path to the xbmcdata folder of this repository.

      Replace wernerb/docker-xbmc-server:gotham with wernerb/docker-xbmc-server:frodo if you use frodo!

      Use this command in your automation scripts or in a crontab. Keep in mind that a library scan can take some time.

Build the container yourself

Replace gotham with master or frodo accordingly if necessary:

$ git checkout gotham
$ docker build --rm=true -t $(whoami)/docker-xbmc-server .

Then proceed with the Quick start section.

F.A.Q.

Why Docker? Docker ensures that xbmc-server can be run on multiple operating systems, as well as making xbmc-server portable. In the case of xbmc-server, a lot of people are having trouble compiling it to work in headless mode for different distributions. The steps to compile xbmc can be viewed in Dockerfile and lists the best practises found in this xbmc forum thread.

What do the patches do? I discovered that the UPnP server in XBMC was very unstable, and crashed when browsing the library in headless mode. The problem was with thumbnail generation for some videos. The patches provided in this repo are automatically applied when compiling for headless mode, and allows xbmc to run without crashing.

What versions did you test this with?

  • Docker v0.12: XBMC (13.2ALPHA1 Git:20140607-96b4c73) Gotham
  • Docker v0.12: XBMC (12.3 Git:20131212-9ed3e58) Frodo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.