Creating a Home Media Streaming Center With Ubuntu




Introduction: Creating a Home Media Streaming Center With Ubuntu

Let's face it. Discs are a thing of the past, and external hard drives are bulky and inconvenient. With this guide, I will show you how to create a Home Media Center, capable of streaming movies and music straight to you PC. The best thing is, this is free, or cheap, project!

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Gathering the Supplies

What we will need
  • An unused PC
  • Ubuntu 9.04 Desktop Edition
  • A DVD-R(optional)
  • Media

You can replace the DVD with a USB flash drive, but for this guide i will be using the DVD

Step 2: Download Ubuntu 9.04

Can be acquired here I have a fairly decent internet speed, so it took me about an hour to download. Download time may vary, so sit back, relax, grab a cup of coffee, or learn the metric system.

Step 3: Burning the ISO

After you are done downloading the file, we must burn it to a disc. is a pretty good program for the job. If you know how to burn an ISO, then you are on the right track. Once you have burnt the disc, it is time to install!

Step 4: Installing Ubuntu

I won't go over this step, for it is pretty self explanatory, but if you need assistance, it can be found here

Step 5: SSH

Once you have installed Ubuntu, it is time to configure you server! In the upper left-hand corner, click on Applications>Accessories>Terminal. A window should pop up, similar to Mac OS X terminal, or Windows CMD Prompt.

In this window, type

sudo apt-get update


sudo apt-get upgrade

Reboot the install OpenSSH-Server in terminal using

sudo apt-get install openssh-server

Find your local IP address. MIne is under eth1.

On another Linux machine, ssh into the client using

ssh your_username@local_ip

On Ubuntu 9.04, ssh has been replaced with OpenSSH, which comes pre-installed
If you are using a Windows machine, or Mac, go grab a copy of putty which serves as a ssh client.

Step 6: Configuring Samba

Install Samba in terminal using,

sudo apt-get install samba


sudo apt-get install samba smbfs

Stop Samba

sudo /etc/init.d/samba stop


sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.orig


sudo touch /etc/samba/smb.conf


sudo pico /etc/samba/smb.conf

Copy this file into the window

Replace "YOUR_HOSTNAME" with "Media"

Replace "YOUR_WORKGROUP" with the name of your Windows workgroup

Replace "/media/samba/" with "/"

Replace "YOUR_USERNAME" with your username


Hit CTRL+X, Y, Enter

Set permissions

sudo chmod 0777 /

Restart Samba

sudo /etc/init.d/samba start

Add/edit/delete network users

Add user

sudo smbpasswd -a system_user (system_user, being the user you created in the installation"

sudo pico /etc/samba/smbusers

Insert following line into new file

system_username = "network username"'


Edit user

sudo smbpasswd -a system_username (system username being the one you chose in the installation)

Delete user

sudo smbpasswd -x system_username

Reconfigure Sharing

sudo pico /etc/samba/smb.conf

and add this to the file

path = /mediaserver
browseable = yes
read only = no
guest ok = yes
create mask = 0644
directory mask = 0755

Now Restart Samba

sudo /etc/init.d/samba stop

sudo /etc/init.d/samba start"'

Step 7: Add Media

Find you Media server over the network, login, find the folder "Media". And drag and drop the media you want into the folder.

Step 8: Adding Server Dependencies

First we must install some web-server dependencies.

Run each of these separately (DO NOT COPY AND PASTE THE WHOLE BLOCK OF TEXT!!!)

sudo apt-get install apache2

sudo apt-get install php5

sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql

sudo apt-get install php5-gd

Step 9: Getting the Files to Play Nice

In you ssh window, run this command


Next we need to unzip the folder

unzip fileNice

Now we need to put it in the files at the web-root directory

sudo cp -a fileNice /var/www

you can now test your server by navigating to your server via web browser using the url

(replace web_server_local_ip with the ip assigned to your server by your router)

Step 10: Customizing You Prefs

Now to get you server working the way you want it, you must customize some code, allowing for certain file types and directories. To do so, run this command in the ssh terminal

sudo cd /var/www/fileNice/fileNice


sudo pico prefs.php

Find the line that says $embedTypes, and add the file extensions you want to the list.For mp3s, you simply remove it from the "$embedTypes" and add it to the "$miscTypes" list array. This makes it easier for a mobile device to use the mp3 file.

Press Ctrl+X, Y, then Enter

Step 11: Add Files

in the ssh terminal run this command

sudo /etc/samba/smb.conf

And add this block of text to the bottom of the file

path = /var/www/fileNice
browseable = yes
read only = no
guest ok = yes
create mask = 0644
directory mask = 0755

path = /MediaStreaming
browseable = yes
read only = no
guest ok = yes
create mask = 0644
directory mask = 0755

Press Ctrl+X,Y,Enter
Restart Samba

sudo service samba restart

Now you can browse it over the network, and transfer files to your server. You make need the run these commands in the terminal to obtain the proper folder permissions.

sudo chmod 775 /MediaStreaming
sudo chmod 775 /var/www

Step 12: (optional)Create a Domain Name With No-ip

Go to and create a free account, and a domain for your server. Next in your ssh terminal type:

sudo apt-get install no-ip


noip2 -C

Follow the prompt, and then you should be able to use that domain name to connect to your server.

Step 13: Setting Up Darwin Streaming Server

Many of us have phones and iTouches, some like me are lucky enough to have an iPhone. In any case, Darwin Server will satisfy your general streaming needs. Unlike before in which we used progressive download, I believe that DSS will enable you to have true streaming capabilities.

First we must create the necessary user requirements

Enter these commands in the terminal
sudo addgroup -system qtss


sudo adduser -system -no-create-home -ingroup qtss qtss

This will add the user and user groups needed by DSS
Now enter the directory we need

cd /usr/local/src/

Download the latest version of DSS

Now decompress the file

tar -xvf lstol*

Enter the new directory

cd lstoll*

Build it!!

./Buildit install

Now sit back and enter the matrix, this step may take a while, so sit back, relax and enjoy. I recommend these comics here,here and here

When it is done

cd DarwinStreamingSrvr6.0.3-Linux

Then install (If you haven noticed, case sensitivity is important!)


Follow the prompts for a Admin username and pass. When it is completely installed, visit your new server at server_ip:1220, enter your username and pass you just created, and configure your server, making /MediaStreaming your streaming directory.

Step 14: Creating a Start/Stop Script

We must now create a script which will allow you to start/stop your sever. First, we must create the script file.

sudo touch /etc/init.d/dss

Then edit it

sudo pico /etc/init.d/dss

Courtesy of ruman of Ubuntu Forums, we have a script to use. Paste this into your terminal
# chkconfig: 35 92 12
# description: Quicktime Streaming Media Server
# init script to start up the quicktime (Darwin) streaming server

case "$1" in
if test -r /var/lock/dssd
echo "Lockfile /var/lock/dssd exists. Server not started."
echo "Starting Darwin Streaming Server: "
touch /var/lock/dssd
echo "Darwin Streaming Server started..."

echo "Stopping Darwin Streaming Server: "
[-f /var/lock/dssd] || exit 0
echo "stopping..."
rm -f /var/lock/dssd

$0 stop
sleep 1
$0 start

echo "Usage: $0 [start|stop|restart]"
exit 1
exit 0

Make it executable

sudo chmod +x /etc/init.d/dss

And make it start at boot

update-rc.d dss defaults

Like before, you can drag files from any computer on your network to your server, courtesy of samba, which will automatically show up on your servers.

Step 15: Adding Playlists to DSS

Go to server_ip:1220 in your browser, and in the left-hand bar, click "Playlists". Name it and add files, be sure to un-check Send this Playlist to a broadcast server, unless you plan to create a broadcast server, or already have one. After you finish, push the play button next to the playlist to stream it.

Now you can view your streaming in Quicktime Player by entering you streaming URL into the player, the URL should be in this format,

rtsp:// server_ip /MediaStreaming/ file_you_want_to_stream

Step 16: Enjoy

The sky is the limit, Google to find out more about streaming, and the potential things you can do. Your media is worldwide now, just create a proper firewall so that hackers do turn your friendly media server, into an evil hack machine. If you have stuck with this guide, kudos to you, it will prover to be worth it.
Now go outside, play some games, or do something fun, you'll probably need a pick-me-up after the tediousness of this guide.

Be the First to Share


    • Raspberry Pi Contest 2020

      Raspberry Pi Contest 2020
    • Wearables Contest

      Wearables Contest
    • Fix It Contest

      Fix It Contest

    13 Discussions


    8 years ago on Step 6

    I think u can find the smb.txt here:
    the content is

    ; General server settings
    netbios name = YOUR_HOSTNAME
    server string =
    workgroup = YOUR_WORKGROUP
    announce version = 5.0

    passdb backend = tdbsam
    security = user
    null passwords = true
    username map = /etc/samba/smbusers
    name resolve order = hosts wins bcast

    wins support = yes

    printing = CUPS
    printcap name = CUPS

    syslog = 1
    syslog only = yes

    ;valid users = %S
    ;create mode = 0600
    ;directory mode = 0755
    ;browseable = no
    ;read only = no
    ;veto files = /*.{*}/.*/mail/bin/

    ;path = /var/lib/samba/netlogon
    ;admin users = Administrator
    ;valid users = %U
    ;read only = no

    ;path = /var/lib/samba/profiles
    ;valid users = %U
    ;create mode = 0600
    ;directory mode = 0700
    ;writeable = yes
    ;browseable = no

    path = /var/lib/samba/printers
    browseable = yes
    guest ok = yes
    read only = yes
    write list = root
    create mask = 0664
    directory mask = 0775

    path = /tmp
    printable = yes
    guest ok = yes
    browseable = no

    ;[DVD-ROM Drive]
    ;path = /media/cdrom
    ;browseable = yes
    ;read only = yes
    ;guest ok = yes

    path = /media/samba/
    browseable = yes
    read only = no
    guest ok = no
    create mask = 0644
    directory mask = 0755
    force user = YOUR_USERNAME
    force group = YOUR_USERGROUP


    8 years ago on Step 6

    hi your link for smb.txt seems to be broken any chance of a new one


    Reply 8 years ago on Introduction

    Site is up for sale so no SMB.TXT file!

    Anyone have a copy?

    Please post the content here ...

    Lithium Rain
    Lithium Rain

    9 years ago on Introduction

    This is a neat instructable - with better pictures and perhaps a guide (or at least a link to a guide) for setting up a firewall, it would be feature-worthy!


    9 years ago on Step 1

    could you please change ubuntu 9.04 to 9.10 as support of 9.04 is over .By the procedures are same.


    Reply 9 years ago on Introduction

    each is supported for 1.5 years. LTS versions have 3 years. it is supported, even now with me typing this on UNR 10.04


    10 years ago on Introduction

    I'm confused.. Why don't you just use ubuntu server? And for the web server, instead of installing each one separately why don't you just use XAMPP?


    Reply 10 years ago on Introduction

    I don't know about you, but I usually customize my own code which explains the separate installation of each, so that I can configure each separately. And Ubuntu server is less user-friendly, no GUI can intimidate people.


    Reply 10 years ago on Introduction

    I understand that but your instructable only lists console commands :P


    Reply 10 years ago on Introduction

    And you can still use that machine as a desktop PC if your streaming operations aren't using all of its resources... Linux isn't *just* for servers shoved in a closet somewhere.


    Reply 10 years ago on Introduction

    That's true I have ubuntu on my main, but this server I built I do have shoved in a server somewhere.


    Reply 10 years ago on Introduction

    I have Linux Mint on my laptop and ssh into my Ubuntu Server inside a vm. Doesn't need to be in a closet :P


    Reply 10 years ago on Introduction

    i think it was designed for people who arnt comfortable using the console only, plus this way u can use it as a computer as well. If you want to just use the server version, you can do all the console commands on the local pc, using sudo. i think, its been a while since i set up my server.