Archive for November, 2011

Setting up Maraschino on an XBMC-Live Machine

November 8, 2011 2 comments

While browsing around the XBMC forums lately I came across a great new project called Maraschino, basically it is a web based frontend for XBMC which give you access to modules that can be configured for Trakt, SABnzbd and your XBMC library for now. WhenI stumbled across this I thought that this was a great idea and seeing the possibility of managing all of my servers in one easy to access page seemed to sell me on the idea.

Reading through the forum topic it became obvious that this was no simple project to configure. So I have decided to document the steps that I used to get it running on my XBMC-Live machine running Ubuntu 10.04.

UPDATE: Forgot to mention that you need to be running the latest nightly builds of XBMC-Live. See this post to get this up and running. You can also run this with other builds for Windows but I will not cover this below.

Ok so first of all we will need to install some programs and components onto our XBMC-Live machine. Log into your machine locally by pressing Ctrl + Alt + F1 or remotely via SSH.

Once you have logged into your machine you will need to update the repos, this is done with the below:

sudo apt-get update

Enter your password if prompted then when this completes we will need to install Apache, Python and other required components for Maraschino to run:

sudo apt-get install apache2 libapache2-mod-wsgi python python-setuptools python-pkg-resources git
sudo easy_install Flask
sudo easy_install Flask-SQLAlchemy
sudo easy_install jsonrpclib

Once the required components and applications have been installed we now need to download the Maraschino code to our machine:

git clone /var/www/maraschino

This will clone the code to our machine in the /var/www/maraschino directory so Apache can access this later.
We now need to setup a WSGI file for the application to run:

sudo nano /var/www/maraschino/maraschino.wsgi

In the file copy and paste the below:

import sys
sys.path.insert(0, "/var/www/maraschino")
from maraschino import app as application

Press Ctrl + X then Y to save the file.
Now that we have created this we can configure Apache. In order to do this we must create the below file:

sudo nano /etc/apache2/sites-available/maraschino

In this file copy and paste the below:

<VirtualHost *>
ServerName maraschino

WSGIDaemonProcess maraschino user=xbmc group=xbmc threads=5
WSGIScriptAlias / /var/www/maraschino/maraschino.wsgi

<Directory /var/www/maraschino>
WSGIProcessGroup maraschino
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all

Press Ctrl + X then Y to save the file.
Now we need to disable the default Apache site and enable the Maraschino site, this is done with the below:

sudo a2dissite default
sudo a2ensite maraschino
sudo /etc/init.d/apache2 reload

Now that we have enabled the site in Apache we now need to configure Maraschino to start, firstly we need to create a settings file, this is done via witht he below:

sudo cp /var/www/maraschino/ /var/www/maraschino/

Now we need to edit the file to define the location of the database:

sudo nano /var/www/maraschino/

Then change the DATABASE line to show the below:

DATABASE = '/var/www/maraschino/maraschino.db'

Press Ctrl + X then Y to save the file. Now we have a database location defined we can create the database with the below command:

sudo python

You should see “Database successfully initialised”. This means we are almost done.
We just need to ensure our permissions are now properly setup for Apache to serve the Maraschino web page. This is done by the following commands:

sudo chown www-data:www-data /var/www/maraschino -R
sudo chmod 755 /var/www/maraschino -R

Finally restart Apache to ensure that the services use the correct permissions:

sudo /etc/init.d/apache2 reload

OK now its time to open your browser and access the webserver, it will be the local IP of the XBMC-Live machine, this can be checked by doing the below:


Then in your browser type in http://<IP-of-XBMC-Live-Machine&gt;. You should now see the Maraschino page, to condigure it hover the mouse to the top left and click on the settings cog.

Ok thats it, its now time to enjoy this glorious project.

If you need to update to the latest version of the Maraschino code just do the below in the future:

cd /var/www/maraschino
sudo git pull

Thats it 🙂

More details for Maraschino can be found here.
Forum topic and support can be found here.

Hope this has helped you to setup this great project.

%d bloggers like this: