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.

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.

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):

Comments

Comment viewing options

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.

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!!!

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.

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.
Regards,
Hammad BaigCovershub

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.

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.

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.

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! 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 :)

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 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!

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.

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

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.

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.

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% :)

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?

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.

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!

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.

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.

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!

Geek Guides

Pick up any e-commerce web or mobile app today, and you’ll be holding a mashup of interconnected applications and services from a variety of different providers. For instance, when you connect to Amazon’s e-commerce app, cookies, tags and pixels that are monitored by solutions like Exact Target, BazaarVoice, Bing, Shopzilla, Liveramp and Google Tag Manager track every action you take. You’re presented with special offers and coupons based on your viewing and buying patterns. If you find something you want for your birthday, a third party manages your wish list, which you can share through multiple social- media outlets or email to a friend. When you select something to buy, you find yourself presented with similar items as kind suggestions. And when you finally check out, you’re offered the ability to pay with promo codes, gifts cards, PayPal or a variety of credit cards.