Raspberry Pi: the Perfect Home Server

Ever since the announcement of the Raspberry Pi, sites all across the Internet have offered lots of interesting and challenging uses for this exciting device. Although all of those ideas are great, the most obvious and perhaps least glamorous use for the Raspberry Pi (RPi) is creating your perfect home server.

If you've got several different computers in need of a consistent and automated backup strategy, the RPi can do that. If you have music and video you'd like to be able to access from almost any screen in the house, the RPi can make that happen too. Maybe you have a printer or two you'd like to share with everyone easily? The Raspberry Pi can fill all those needs with a minimal investment in hardware and time.

Raspberry Pi Benefits

Low cost: for $35, the RPi model B is nearly a complete computer with 512MB of RAM, 100Mb Ethernet, an SD card slot, two USB ports, audio out and HDMI or RCA video out. I've seen HDMI cables that cost more than that.

Energy efficient: hardware costs are only one component of a server's expense, because you also need to consider the energy cost to keep the device running constantly. The services needed for home use aren't going to tax the CPU much, and most of the time it will just be idling, waiting for something to do. The RPi's ultra-low power components are a perfect fit for this workload, which helps keep your power bill down. My model B unit plus external hard drive consume only 8 watts total, while the old Athlon-based box it replaced drew 54 watts at idle. Assuming 10 cents per kilowatt hour, that puts the yearly power bill for an RPi at $7 vs. $47 for an Athlon-based machine. The RPi basically pays for itself in less than a year!

Low noise: because the RPi doesn't have fans or moving parts, the only component in your final configuration that generates noise or any appreciable heat will be the hard disk. If you're concerned about noise, enthusiast sites like Silent PC Review often include noise benchmarks in their storage reviews. My experience is that any modern drive is quiet enough to avoid detection anywhere there's something else already running (such as a media center, gaming console or other computer). If your home doesn't provide a lot of flexibility for wiring options, the RPi's small size, minimal thermal output and low-noise footprint may make it possible to sneak in a server where it was difficult to justify one in the past.

Figure 1. A Compact, but Highly Capable Home Server

New opportunities: a less tangible benefit is the simple joy of trying something new! For me, this was my first time really working on a Debian-based distribution, and it's probably the first time many Linux enthusiasts will have a chance to try an ARM-based architecture.

Arranging the Hardware

For a home server, you'll need a medium-size SD Flash card for local storage. It's possible to use a USB thumbdrive for booting, but that would use up one of the two precious USB slots. The Flash storage card doesn't need to be large, but the faster the better. I chose a name-brand SD card with an 8GB capacity and class 10 speed rating. For backups and multimedia files, a large hard drive with a USB dock is a must. I chose a 1.5TB hard drive and a Calvary EN-CAHDD-D 2-bay USB 2.0 hard drive dock. This dock has a feature to run two drives in RAID-0 mode, which could be useful someday. Finally, the RPi doesn't come with a power supply, but most smartphone chargers supply the required 5v-over-micro USB. To see if the RPi was fussy about the power source, I swapped through three different micro-USB cell-phone chargers for power supplies. I tried each one for about a week, with no issues on any of the units.

Installing the Operating System

Installing the RPi operating system is covered in extensive detail elsewhere, but here are a few home-server-specific tips, roughly in the order needed.

1) Get the Raspbian "Wheezy" install image directly from http://www.raspberrypi.org/downloads, and copy it onto the SD card, using the steps listed on the site.

2) When booting the RPi for the first time, attach a keyboard, mouse and monitor. Don't forget to turn on the monitor before booting the RPi, so that it can detect the correct HDMI or composite output port.

3) The RPi has a nice "raspi-config" screen that you'll see on first boot. For a home server, the following selections will be useful:

  • expand_rootfs: resizes the default 2GB OS image to fill the rest of the Flash card.

  • change_pass: the default password is "raspberry", but something more secure than that would be better.

  • Set your locale and timezone.

  • memory_split: assign the minimum amount possible (16) to the GPU to leave as much room as possible for services.

  • SSH: don't forget to enable the SSH server.

  • boot_behaviour: turn off boot to desktop (again, to save memory for your services).

When finished, you'll be at the pi@raspberrypi prompt. The setup script can be re-run at any time via sudo raspi-config.

There are just a few more configuration items, and then the operating system is ready to go.

1) A static IP makes everything easier, so switch the network settings for eth0:

>> sudo nano -w /etc/network/interfaces

change the eth0 line iface eth0 inet dhcp to the following (modify to meet your home network setup):

iface eth0 inet static

2) Create a local user, and put it in the users and sudo group:

>> sudo adduser YOURUSERIDHERE
>> sudo usermod -a -G users YOURUSERIDHERE
>> sudo usermod -a -G sudo YOURUSERIDHERE

3) Update the system to ensure that it has the latest and greatest copies of all the libraries:

>> sudo apt-get update; sudo apt-get upgrade

4) At this point, you're ready to go headless! Shut down the PI:

>> sudo /sbin/shutdown -h now

Once it's down (monitor the green status LEDs on the RPi circuit board to know when it has finished shutting down), unplug the monitor, keyboard, mouse and power cord. Attach the USB storage, then restart the RPi by plugging the power back in.

5) Once the RPi starts up (again, those green LEDs are the clue to its state), you can ssh in to the RPi from any other machine on the network and finish all the configuration remotely from here on out (modify the following for your static IP):


Congratulations, you have a working Raspberry Pi!



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I have

Damianus's picture

I have a raspberry pi but I never got to do something with it, I even have a little dongle which I assume is for wireless communication. But I wanted to use the raspberry as some kind of hub, for example I wanted to connect my printer and my external hard to the raspberry then access it as a NAS and print from any computer in my house but like I said I never got around to do it.

Damian from SmartIT


JohnSn's picture

Well, this is a great article. Too bad I did not find it earlier.
It would have saved me a LOT of time 8-)
Anyhow, I finally got my first Rpi.
Media center, BANG!
Well, not so fast. I found that making it a file server with a share work a lot better form me.
It took a while before I had it working. I am a newbie a Linux so finding all the commands, apps, whatyamagot to get it working.
But I got it up and running without problems. I am using a WD Live as media center, the RPi as the (windows)storage. And it is all connected to a 1 GB cabled network.
I have no buffering (like with Netflix and Amazon). I even tried to overload teh share by copying files to it while copying other file from it WHILE playing a movie. Still no delays, no buffering.
I now have 6 RPi's up and running with diferent configurations from File Shares to Mail server, Webserver, a monitor that keeps an eye on my routers, Another media server. And all this is a self-made case that is smaller than a case of cigarettes.
I all, it has been a great experience. I highly recommend this for folks who like to tinker a bit.
If you do not like to tinker, not a problem, there are hardware choices for cases and several distros you can use without too much hassle.
Anyone who has negative things to say about the RPi, either has not used one and is judging by what he/she read somewhere/sometime LONG ago, or they just do not like the tinkering aspect.
This is MY opinion and if you don't like it: *PFFRT*
See y'all!!!

Awesome RPi Use

iOS Jailbreak's picture

Since the launch of RPi in public, I wanted to use it in my real-life, and recently, I was looking out ideas for which I can use RPi.

I am planning to equip my sound system with RPi, and install an AirPlay receiver, or AirServer type application, which actually allows me to listen to music from my iPhone, MacBook Air, or iPad directly with sound system. At the other end, the Media Center idea is also great. As I have couple of devices in my house, and it is very hard to copy / paste date in every other device personally.

Must be amazing

Joey Stawlen's picture

Wow that must be amazing.
Where can i get pi servers? Is it possible to install in existing home servers?


I am blogger.

Regarding above post.

Hammad Baig's picture

I've been using some of these small form factor home servers for personal uses like media centers, media hosting for around the house, it works great if its for internal use only, as far as it being an actual production server for web and such, its good if you're hosting like a couple pages lol.
Hammad Baig

I think there is some problem

fashion fur hats's picture

I think there is some problem in cooling system . .

There is no cooling problem.

Anonymous's picture

There is no cooling problem. It does not need it.

Hello, I have browsed most of

AC Maintenance Contract's picture

Hello, I have browsed most of your posts. This post is probably where I got the most useful information for my research. Thanks for posting, maybe we can see more on this. Are you aware of any other websites on this subject.

Nice Server

Tahir's picture

I like this server. I am also thinking to become familiar with Pi perfect home server shortly. nabard.org

Media Center

Jamaica Joe's picture

I have serial doubts about if Raspberry will be a decent Media Center, Does anyone has tested with HD multimedia? What if I want to play a 6Gb file from a BRrip? Or Netflix HD Streaming?...

While the CPU might be slow,

Anonymous's picture

While the CPU might be slow, the GPU is not. I've played several blue ray rips w/o any issues at all.

Great for media centers

Gerardo V's picture

I've been using some of these small form factor home servers for personal uses like media centers, media hosting for around the house, it works great if its for internal use only, as far as it being an actual production server for web and such, its good if you're hosting like a couple pages lol.

LowFormfactor server.

berry.whitetiger's picture

I hear that there is a 100Mb network card you can add onto the raspberry to improve the throughput. Im using a low form-factor Linux box made from D-link DNS-320 called "ShareCenter" running some version of linux. Small Linux systems are replacing those noisy servers now days. I looked seriously into this after lighting took out all my beige boxes. You might want to consider it for your next home media share center.This is an interesting application that is very similiar and less DYI.

RasPi server

LinuxUser_1's picture

Brian - great article!

Couple of comments - long time Linux user, first time "headless server" guy. Neat! I've never had much "luck" with autofs and devfs setups for ubs drives, so I just set up the usb drive in /etc/fstab as "auto".

I was backing up my big linux box to the RasPi, and tried copying over some files from another machine to a SMB share - whoops, timed out and died. Worked later when the backup was finished.

Speaking of backup, deja-dup is great for backups over ssh, but the lack of multiple profiles is really bugging me. I'd like to backup and encrypt my home dir (~15 GB), but I don't need to encrypt my music archive (~300 GB). Can you recommend another backup solution that works over SSH? I might just go to an rsync script if I have to.


Thanks for the feedback, Don!

Brian Trapp's picture

Thanks for the feedback, Don! I actually ran into problems with automount after a few weeks of use (see an earlier comment) where minidlna was triggering a remount every few minutes and making the filesystem require a fsck at boot - so I'm on board with your plan to just use /etc/fstab.

For multiple profile support, I haven't seen anything really great yet that supports encryption and multiple profiles. I would suggest keeping deja-dup going for anything you want encrypted (/home, /etc), but use something like rsync to keep things like media directories in sync. *Not* using deja-dup on media dirs is nice because a) its not the kind of thing where incremental backups make sense in the first place, and b) an rsync-ed dir on the RPi server end can be easily shared via minidla - can't do that with the deja-dup incremental files.

My very first rsync command ever I had backwards, so I wiped my local dir instead of copying it over, so make sure you pre-backup your backup :)

Thanks for the reply! You

LinuxUser_1's picture

Thanks for the reply!

You can't be too careful with rsync. Looks like deja-dup combined with samba shares and rsync scripts will provide my long-sought centralized home backup server. Amazing little $35 linux computer. Probably rates pretty good on the old "bogomips" benchmark.

we're not quite there yet

Tim's picture

Respectfully, a "server" which is bottlenecked by Class10 (10Mb/sec) USB flash drive + USB 2.0 external drive (~25Mb/sec) ...is a bit off the mark of "perfect".

I suppose 'perfect' is subjective :)

Brian Trapp's picture

Well I wouldn't use it to host Reddit, that's for sure. But for home use (my home, at least), my primary needs are serving streaming media, backups, and sharing a printer.

I used to use a leftover server with a dual-core cpu, gigabit ethernet, and sata to do those things... but after switching to the Pi, a) nobody noticed any speed hit (backups run in the background, and media streaming takes only a wee bit of bandwidth at a time) and b) I'm saving money on the power bill and c) I get to play around on ARM instead of x86 for a change.

So it won't be perfect for everybody, but there's a lot you can do within the RPi's capabilities that will let you benefit from its great price and super low power appetite.

Thanks for the marvelous

excursion marrakech's picture

Thanks for the marvelous posting! I seriously enjoyed reading it, you happen to be a great author.I will remember to bookmark your blog and will come back in the future. I want to encourage yourself to continue your great posts, have a nice day!


priyanka ahir's picture

I truly planned to article a word to i would like to show some gratitude to the entire fabulous guides you happen to be writing as of this site. Our difficult world wide web investigation has really been compensated along with high quality info to share with our spouses. Rankings file for a large number of among us traffic tend to be rather fortunate This is a nice site! to reside an awesome web site several http://photoshoptravel.com particular people with valuable styles. I am incredibly fortunate to get employed all your web site and appear forward to extra enjoyable minutes reading the following. Cheers quite a lot once more for a lot of items.

External HDD NTFS

PeterReed's picture

Using am external HDD with NTFS filesystem type needed the ntfs-3g package installed to enable read-write access described in the Peripherals section.


Brian Trapp's picture

Thats a good point. I was using ext4 since it was only going to be used by a Linux system, but NTFS would need that extra set of libraries.

Yeah I was aware of the

Pearse's picture

Yeah I was aware of the ntfs-3g requirement and completed that, still not getting the file system unfortunately


pearse's picture

Hi, great easy to follow guide for novices like me. I'm having problems getting Samba installed. When I run the prompt it tells me file cannot be found on the http://Debian.net/wheezy/main samba armel 2:3.6.6-2

Hopefully that is legible. Any ideas how I can get around this problem?


Brian Trapp's picture

That looks like maybe one of the mirror is just down temporarily? I'd try again today.


Pearse's picture

hi, thanks for the reply, got it sorted, I hadnt ran the update correctly so the version was incorrect. sorted now although I'm struggling with Samba, i think..., Ive set up samba.conf as instructed above and my win7 machine cant access the server. It's picking it up ok but getting a prompt to enter network username and password- I've tried everything, from my Pi login to the Smbuser username and smbpasswd and nothing is working


Brian Trapp's picture

Yeah, you should be using the id/pw you setup at the 'smbpasswd' step.

Anything useful in the logs (/var/log/samba) as far as why the W7 box can't connect? Does the samba userid have at least read access on the dir?


pearse's picture

hi, how can I check whether I have given my userid has full access t the dir? I suspect this is close to what my problem is because I dont think I set any permissions during the setup process


Brian Trapp's picture

Try accessing the directory and files *locally on the Pi* as the user you setup in the smbuser step. If you have read (and maybe execute?) you should be able to view them from te SMB side too.

Reply to comment | Linux Journal

heyo's picture

Excellent post. I was checking continuously this blog and I'm impressed!
Very useful information specifically the last part :
) I care for such information a lot. I was looking for this particular information for a long time.
Thank you and best of luck.

Tuning home server

Pyplate's picture

I've been doing some tuning on my Raspberry Pi - I'm getting pretty good results. I've been testing using 800 concurrent users in siege. I posted the details at server cluster tuning

for Android phone users that have a Pi server, or any web-server

TouchFreePhotoHomeSync's picture

for Android users that have a Pi server, or any web-server
and want to build an automatic photo gallery at home:

I looked in the marketplace for any App that would backup my pictures without the need to have a specific manufacturer's phone (or) a specific manufacturer's NAS drive, or a SAMBA share.
There was none.

This was the need for the app TouchFree Photo HomeSync.

You can choose to upload from multiple phones to the same server, or to different servers, all in the LAN wifi. And browse your collection from a browser.


Reply to comment | Linux Journal

cocinas modernas's picture

Good information. Lucky me I found your site by acciԁent (stumbleuρon).
I've bookmarked it for later!

Hey guys, let me tell you

Alicia Dickerson's picture

Hey guys, let me tell you something for an example. I got a Samsung mobile phone and I got all the essentials features in it so why should I go for iphone?

I use my Pi without a hard disk

Pyplate's picture

I've got my Pi set up as a web server at raspberrywebserver.com. Instead of adding a hard disk so that I can store media, I just upload my media to Tumblr, and embed it in the pages in my site.

Thanks for sharing

hello's picture

Thanks for the information. Keep on writing.

Another setup

Björn Ruberg's picture


I suggest a little different setup in my blog here:

It does not provide a hardware raid and it uses more expensive 2,5 inch harddisk. However, it demonstrates the usage of the pi together with two harddisks using only one power supply. As every power supply causes power loses, this setup is a little bit more power saving.

As suggested in the article, my maximal power usage is six watts, what is a little less than the eight watts mentioned here. That's more than 20% :)

Raspbian and codecs

Marcel G.'s picture

I have been thinking of using a raspberry pi as a home-server too.

I just wonder how Raspbian copes with codecs. I remember removing debian from my home server (laptop) a few years ago, because I had problems getting mpd to stream mp3-files. Is that possible with raspbian?



Client codecs

Brian Trapp's picture

If you use Minidlna (or any other DLNA solution) then the codec requirements are all on the client side, not on the RPi - same if you're sharing via network mounts.

I haven't done direct playback myself, but a quick seach of the Raspbian distro shows it has mpd and some frontends, plus lame and mpg321, so it seems like mp3 support should be pretty solid.

Reply to comment | Linux Journal

Harley's picture

Hi, I do believe this is an excellent website. I stumbledupon it ;) I may come back once again
since i have saved as a favorite it. Money and freedom is the best way to change,
may you be rich and continue to guide other people.

Reply to comment | Linux Journal

ppiclaimscentral's picture

Hi colleagues, its wonderful paragraph on the topic of cultureand entirely explained, keep it up all the time.

Reply to comment | Linux Journal

Granheritage's picture

Having read this I believed it was rather enlightening.
I appreciate you taking the time and energy to put this content together.
I once again find myself personally spending a lot
of time both reading and leaving comments. But so what, it was still worth it!

Reply to comment | Linux Journal

www.247shemalecam.com's picture

Hi there to all, it's in fact a nice for me to pay a visit this website, it includes helpful Information.

Reply to comment | Linux Journal

Nathaniel   Myles  's picture

excellent Post I'm a big player of Blackjack,Roulette,Slots from

Ugh, can we get moderation and spam flagging?

Anonymous's picture

Hey guys it's 2013. Get yourself the Mollum service, or at least allow users to downvote spam...

Innovative Thinking

Adam Phigit's picture

I had not thought of using Raspberry Pi as a home server. You are right that other peripherals cost a lot less. I will get the team to do some experimentation at work for some other innovative business uses - instead of the home based server.

Reply to comment | Linux Journal

http://realworldenergy.com's picture

Remaгkable things here. I аm vеrу glad to peer your рost.
Thanks a lot and I аm taking a lоok ahead
tο tοuсh yоu. Will you please ԁroρ
me a е-maіl?

J’ai fait un petit peu le

linda147's picture

J’ai fait un petit peu le tour de ton blog, il a l’air super intéressant. Je vais m’y installer tranquillement. Je te félicite c’est bien d’avoir fait ce blog

voyance gratuite en ligne, voyance gratuite mail

Cheap Ray Bans,Fake Ray Ban Sale,Ray Ban Unfaithful

podcfzu8's picture

All the time widely recognized as the most influential design company, It is little wonder there are rows of Hollywood and the fashion industry called 'Ray Ban, legendary fashion icon, the first in 1973 in Milan, the devil will be available to wear Austrian Cleveland.But more important, even far more equipment, or damage to the strength of their clothing and shoe design seems perfect in its best appearance.Ray Ban Eyewear lenses in bright light best in sunny conditions, all the lens to provide a truer color perception.Ray Ban also offers other types of sunglasses like skiing and snowboarding to keep sports fans to enter the sport to have a clearer understanding of sports.But there are also some people??, Who is unpleasant polarized glasses, but if you talk about your optician, they can make some adjustments, so you can get.Ray Ban sunglasses of choice, you must consider the shape of your face. Ray Ban sunglasses the choice depends on the shape of your face and change.The border of the straight line of Ray Ban sunglasses, will help balance the feeling of up and down your face shape, even if it is a broad forehead and narrow chin.Dark green lenses give the wearer the feeling of cool, but dark green lens light transmission and clarity of Ray Ban suitable to wear in the sunny outdoors wearing a bulletproof vest, while driving should not be.Your actual secret society's attention to orbital, which shows well-known brands do not need a high temperature the exact ray of hope to solve these two 8 oz glasses.Green grass that is returned to the embrace of nature, the adjustment role of vision, can make the adjustment of the eye muscle relaxation.Ray Ban sunglasses are stylish and beautiful young lady, Ms. Ray Ban sunglasses have many styles and colors, making them more fashionable.Ray Ban sunglasses are always leading in the field of science and technology, because the use of high-tech, faster and better preventive effect.Dark Ray Ban sunglasses in the movie "Matrix", has become an essential product for all gamers. But the heat of the colloid in recent years sunglasses Ray Ban sunglasses sales leadership style.You will find a reliable company, providing high-quality products, the lowest cost to the minutes of the best pattern, variety, sunglasses add-ons monitor.

Advice about automount

Brian Trapp's picture

One suggestion I'd like to add to the above article - I eventually moved away from using automounter for the storage device to a regular entry in /etc/fstab. The way minidlna was polling for new data meant the drive would mount/unmount a *lot* and eventually push me into a fsck at each reboot. By having it permanently mounted, it gets pushed over the fsck check limit at a much more reasonable interval. Hope that helps!