How to stream files from Raspberry Pi to a smartphone

Turn your Raspberry Pi into a file server and seed box

Stream files to a smartphone from Raspberry Pi

The best thing about the Raspberry Pi is that, besides being an excellent educational device, it can double up as a very capable headless server - now even more so with the increased memory.

Contrary to popular belief, not every server task requires lots of processing power. For example, if you wish to download files and share them with users on the network irrespective of their operating system or device, you don't need a machine with a multi-core processor. In fact, using an old Linux computer as such a seedbox is a popular way of rescuing discarded hardware.

Article continues below

The only downside of this approach is that it consumes a lot of electricity. Most modern routers have a USB port, and will share the plugged-in device with all computers connected to this router. But what if you have an older router and want to do more than just share files?

With the RPi, you can do all this and a lot more without the costs associated with a traditional computer, and without the restrictions of dedicated devices such as routers.

Gather the ingredients


We'll use a revision 2 RPi with 512MB of RAM, but it should work fine on older versions. It'll be powered by the latest version of Raspbian (version 2012-10-28-wheezy-raspbian). The best thing about the newer releases is that they can use all of the increased memory without any tweaks. They also ship with SSH enabled, which allows users to access and set up the RPi without ever connecting it to a monitor.

Download the latest version of the Raspbian distro and flash it to an SD card, either with dd on Linux or Win32DiskImager if you are on Windows. While you can use a USB wireless adapter to connect the RPi to the internet, it's best to use the Ethernet port and pull up a cable to the router.

After connecting and powering up the RPi, head to your router's admin page (check the router or its documentation for the address). In all probability, your router is using DHCP to hand out IP addresses to connected devices.

Explore the admin interface, look for a list of all connected devices and note down the IP address the router has assigned to the RPi. Later, you'll have to assign it a static IP address to ensure the RPi is always accessible at the same address.

For now, let's assume the dynamic IP address assigned to the RPi is With this bit of information, we're all set to connect to the RPi and prepare Raspbian via SSH.

Every Linux distro ships with an SSH client. Windows users can use the PuTTY tool. To connect from a remote Linux machine, launch a terminal and enter the command:

$ sudo ssh pi@

After agreeing to add this address to the list of trusted hosts, you'll be asked for the login credentials. On a fresh, unconfigured Raspbian install, the password for the default 'pi' user is 'raspberry'. From this point on, the commands in this tutorial will be the same irrespective of whether you are connected to the RPi from a Linux or a Windows machine. That's because the commands are run on the Rasbian Linux distro on the RPi.

Since this is a fresh install, you'll be asked to configure it before going any further. Enter the command:

$ sudo raspi-config

This will bring up a screen with lots of options. Scroll down to the bottom of the list and select the Update option, which will grab the latest version of this configuration utility.

Once it's done, the RPi will restart and you'll have to reconnect via the ssh command, or PuTTY like earlier. You'll have to do this every time you tweak any setting and restart the RPi.