MediaTomb UPnP Media Server – Debian.

MediaTomb allows you to stream your digital media through your home network and listen to/watch it on a variety of UPnP compatible devices.:

  • PlayStation3 (PS3),
  • Xbox 360,
  • satellite devices,
  • DVB and DVB-T devices,
  • smart TV/DVD,
  • youview..


Install MediaTomb.

sudo apt-get install -y mediatomb


Install some needed dependencies.

sudo apt-get install -y ffmpeg imagemagick mediainfo mencoder ffmpegthumbnailer transcode

Setup MediaTomb.

Create database MediaTomb.

  • user: mediatomb,
  • password: Hasło,
  • Database name: mediatomb,

Log on to your MySQL as Administrator – root,
Create a MySQL user: mediatomb and set privileges to a new user.

sudo mysql -u root -p
create user 'mediatomb'@'localhost' identified by 'Hasło';
create user 'mediatomb'@'%' identified by 'Hasło';
grant all on mediatomb.* to 'mediatomb'@'localhost';
grant all on mediatomb.* to 'mediatomb'@'%';


Log on to your MySQL as mediatomb, and create database: mediatomb,

sudo mysql -u mediatomb -p
create database mediatomb;


Load database mediatomb to MySQL.

sudo mysql mediatomb -u mediatomb -p < /usr/share/mediatomb/mysql.sql
sudo /etc/init.d/mediatomb restart


Edit configfile /etc/default/mediatomb.

sudo nano /etc/default/mediatomb

Change the listening port for MediaTomb (default port – 49152):

OPTIONS="-p 50000"

Change the listening newtork interface for MediaTomb (eth1).
MediaTomb is listening on all network interfaces by default.


Edit configfile /etc/mediatomb/config.xml.

sudo nano /etc/mediatomb/config.xml

Enable Web Interface MediaTomb.

MediaTomb provides a web interface to help with configuration. To enable:

<ui enabled="yes" show-tooltips="yes">


Using MySQL.

If you’d like to use MySQL as main database you must disable Sqlite3 , and enable MySQL.

You must fill: host, username, password, database.

<sqlite3 enabled="no">

<mysql enabled="yes">


Allowing Accounts MediaTomb.

Accounts are disable by default, to enable do this:

Default login/password is: mediatomb/mediatomb.

<accounts enabled="yes" session-timeout="30">
<account user="mediatomb" password="mediatomb"/>


Playstation 3 (PS3) Compatibility

    <protocolInfo extend="yes"/><!-- For PS3 support change to "yes" -->
    <!-- Uncomment the line below for PS3 divx support -->
    <map from="avi" to="video/divx"/>


       Uncomment the lines below to get rid of jerky avi playback on the
       DSM320 or to enable subtitles support on the DSM units
      <add header="X-User-Agent: redsonic"/>

        <!-- Uncomment the line below for D-Link DSM / ZyXEL DMA-1000 -->
        <map from="avi" to="video/avi"/>


Configure Firewall – iptables.

Media share MediaTomb – port 1900.
-A INPUT -p tcp -m tcp -s --dport 1900 -j ACCEPT
-A INPUT -p udp -m udp -s --dport 1900 -j ACCEPT

-A INPUT -i eth1 -s -d -p igmp -j ACCEPT
-A INPUT -i eth1 -d -p igmp -j ACCEPT
Interfface WWW MediaTomb – port 50000.
-A INPUT -p tcp -m tcp -s --dport 50000 -j ACCEPT
-A INPUT -p udp -m udp -s --dport 50000 -j ACCEPT
Commands: start, stop, restart:
  • sudo /etc/init.d/mediatomb start
  • sudo /etc/init.d/mediatomb stop
  • sudo /etc/init.d/mediatomb restart


If you want run MediaTomb manually,
you must first remove the service using the following terminal commands

Remove old links mediatomb.

sudo update-rc.d -f mediatomb remove

Create new links mediatomb.

sudo update-rc.d mediatomb defaults 99
sudo /etc/init.d/mediatomb restart
[ ok ] Restarting upnp media server: mediatomb.


With any changes to the configuration file, the MediaTomb service will need to be restarted for them to take effect.

Access to WWW MediaTomb.

http://address_IP:50000 (



Satellite tuner: humax-mediatomb


Windows Media Player and MediaTomb.



Log MediaTomb.

Startup MediaTomb log.

sudo more /var/log/mediatomb.log


INFO: Loading configuration from: /etc/mediatomb/config.xml
INFO: Checking configuration...
INFO: Setting filesystem import charset to UTF-8
INFO: Setting metadata import charset to ISO-8859-15
INFO: Setting playlist charset to UTF-8
WARNING: You enabled the YouTube feature, which allows you
                             to watch YouTube videos on your UPnP device!
                             Please check
                             By using this feature you may be violating YouTube
                             service terms and conditions!

INFO: Configuration check succeeded.
INFO: Initialized port: 50000
INFO: Server bound to:
INFO: MediaTomb Web UI can be reached by following this link:




1 comment

    • lachlan-00 on 14 October 2013 at 04:29

    miniupnp is still active. mediatomb isn’t in active development

Comments have been disabled.