As I am attempting to use cheaper low-powered Android devices (FireTV) for XBMC, an important feature for me with XBMC is the ability to have a shared database. I do not want the individual boxes to have to update and clean the library, as this can typically be a CPU intensive task and managing multiple copies of the library is tedious.

Using Gotham on the FireTV meant there was little support available for running XBMC in a headless mode. The previous guides I had found didn’t work. I did find a reference to using Docker to run XBMC Headless, which worked with XBMC 13.0 Gotham, but it wasn’t as clean of a solution as I was hoping for.

Eventually I stumbled upon a CyanLabs blog post for a Guide to Headless XBMC (Server) for Linux. This worked perfect for me. I was able to create an VM in ESXi and setup a low resource VM (1 CPU, 256MB ram) that can scan my entire library in a few seconds (compared to the multiple minutes on the FireTV).

I also setup the same VM to host the mysql database. This allows me to make changes to the library from any device, and the change is instantly available to all other devices. This was a big convenience item for being able to use XBMC in my house.

Below is an excerpt of the steps from the blog post for my own reference later:


After spending quite a bit of time trying to get a headless XBMC server set up i finally succeeded, I am using ESXi with Xpenology, PfSense and Ubuntu. So here is a guide on getting XBMC running headless, Enjoy.


  • A Debian based distrubution of linux (I’m using Ubuntu 12.10 minimal)
  • Patience


  • Install your debian based linux distribution.
  • Type the following commands in to the shell/SSH terminal.

sudo apt-get install python-software-properties

sudo add-apt-repository ppa:team-xbmc/unstable

sudo add-apt-repository ppa:team-xbmc/xbmc-ppa-build-depends

sudo apt-get update

sudo apt-get build-dep xbmc

sudo apt-get install libtag1-dev


  • Now we can begin with the XBMC building.
  • First we need to clone the github repo.

git clone git://

cd xbmc

  • Now we can checkout and patch the cloned source.

git checkout 13.0-Gotham


git checkout -b local

git apply xbmc-server.patch

  • Next we run some more commands.


./configure --enable-shared-lib --disable-debug --disable-vdpau --disable-vaapi --disable-crystalhd --disable-vtbdecoder --disable-vtbdecoder --disable-openmax --disable-joystick --disable-xrandr --disable-rsxs --disable-projectm --disable-rtmp --disable-airplay --disable-airtunes --disable-dvdcss --disable-optical-drive --disable-libbluray --disable-libusb --disable-libcec --disable-libmp3lame --disable-libcap --disable-pulse --disable-alsa

  • Next we need to make and make install (REPLACE “X” with number of cpu cores in system.)

make -jX

make install

cp /lib/


cd xbmc

make -f make_xbmc-server all

make -f make_xbmcVideoLibraryScan all

sudo cp xbmc-server /usr/local/lib/xbmc/xbmc-server.bin

sudo cp xbmcVideoLibraryScan /usr/local/lib/xbmc/

  • Next we create a service and add it to the startup.

cd /etc/init.d

sudo wget

sudo nano xbmc

  • replace the username with your username then press CTRL + X to save.

sudo chmod 744 xbmc

sudo update-rc.d xbmc-server defaults

  • Sorted, Now we can start the server and sort the remaining things out.

sudo service xbmc-server start

  • Wait around 10 seconds then stop the server.

sudo service xbmc-server stop

  • Now we need to enable the web server, feel free to use a different port if you prefer and change the password to whatever you wish (nano ~/.xbmc/userdata/guisettings.xml)

cd ~/.xbmc/userdata/

sudo rm -rf ~/.xbmc/userdata/guisettings.xml

sudo wget

sudo nano ~/.xbmc/userdata/advancedsettings.xml

  • Now we can just start the server again and it will connect to the existing DB (This guide assumes you have the DB all set up using a non-headless XBMC install and are just adding this headless XBMC to it).

sudo service xbmc-server start

  • That’s it all done, You can check the log by entering the following command.

sudo tail -f ~/.xbmc/temp/xbmc.log


2 Responses to “XBMC-Server”

  1. Fma965 on May 27th, 2014 5:11 pm

    Hey thanks for linking to my post, Glad it helped :) I don’t mind you quoting my post provided you give credit which you have.

    Thanks, Fma965,

  2. Fma965 on October 26th, 2014 1:34 pm

Leave a Reply