Raspberry Pi Home Server v2: Meet the Raspberry Pi

Note: This post is part of a series. Each post builds on the previous ones. If you are just trying to add one thing to an existing system that was not built following this series, then I cannot promise that these instructions will work for you, although they probably will. If you’ve started from something other than a non-NOOBS Raspbian image, then you’ll probably need to adjust for that.

Please refer to the series Introduction for a list of all the different posts in the series.

Self-Promotion: I have recorded this series as a screencast for Pluralsight:
(http://www.pluralsight.com/courses/raspberry-pi-home-server)
If you have a Pluralsight subscription, please consider watching it. Reading the instructions is one thing, but watching it done demystifies the whole process.

Thank you!


What’s a Raspberry Pi?

The Raspberry Pi (http://amzn.to/2ecP7Zi) is a Linux computer about the size of a deck of cards (Uno cards if you put it in a case), and it’s not the prettiest computer in the world. The early models didn’t even really have a “front”. Because it’s so small, there were ports sticking off every side of the board. The newer models (B+, 2B, Zero, 3) have consolidated the ports so that cables are only sticking out of one or two sides now.

The Raspberry Pi was designed as an affordable computer to teach students computer programming with. Before long, it found a following in the “maker” community for its ability to act as an affordable, low-power brain for a wide variety of electronics projects. With its low cost, power consumption, and size, it has been used for a surprisingly large number of projects.

There have been several different models for sale. The $25 Model A+ has 256 MB of RAM, and 1 USB port. The $35 Model B has 512 MB of RAM, 2 USB ports, and a built-in Ethernet port. The B+ builds on the B and while it doesn’t change any of the key attributes of the system like RAM or CPU speed, it doubles the number of USB ports to four, moves some of the connectors around into a little nicer arrangement, and uses a bit less power. There was an earlier, 256 MB version of the Model B as well, but that was completely superseded by the 512 MB version. The Raspberry Pi 2 introduced a quad-core processor to the mix, keeping the same physical layout as the B+.

Next came the Raspberry Pi Zero, which only costs $5 (Usually), but has some serious limitations in both memory, speed, and connectivity. It’s a great choice for building small projects, or for fulfilling the Raspberry Pi’s original goal of teaching children to code, but it isn’t quite suitable for building this project.

Then, the Raspberry Pi Model 3 increased the overall speed of the system, and added built-in WiFi and Bluetooth.

Finally, the Raspberry Pi Zero W added WiFi and Bluetooth to the Zero.

I built my first Raspberry Pi Home Server with a Model B. These days I would recommend at least a Model 2, but you’ll get the best results using a Model 3.

But I don’t know Linux

Yeah… that’s pretty normal. Let’s face it, Linux is not an OS you’d put in front of your grandmother or non-technical spouse. For people used to Windows or Mac machines, Linux is going to be very unfamiliar. You generally don’t get to just right-click on things and pick “Properties” to set stuff up, and when you plug in new hardware, Linux doesn’t automatically download drivers from the internet and set them up for you. The desktop environment is getting pretty nice these days, though.

For those of us that were around for the first wave of home computers in the 80’s, and remember tweaking out the settings in autoexec.bat to get the memory settings just right so that we could play a certain game, this will be like a wave of nostalgia. For the younger folks, this may seem very strange and foreign.

Linux is an enchanted land full of magic words that you have to get exactly right in order for them to work. You have to stand in the right spot, at the right time of night, under exactly the right moon, and you’d better be sure that the chicken you’re about to sacrifice is a lefty, or you’ll bring doom and destruction on all the land.

Okay, it’s not quite that bad, but if you are uncomfortable with the idea of following instructions that tell you to type an obscure string of commands and parameters with little or no explanation as to what they mean, you’ll need to get over that fear. The internet is your friend, and you can look up how to do just about anything, but there are a lot of things to configure, and people aren’t always going to tell you why something has to be phrased the way it is.

In this series, I’ll try to explain the meaning of the obscure commands as best as I can, at least the ones that I understand well enough.

What hardware do I need?

Unless you bought some kind of bundle, your Raspberry Pi will need a few accessories before you can do anything with it. The Raspberry Pi doesn’t come with a power supply, or any kind of storage. When you buy a Pi, that’s all you get. A single-board computer, and nothing else.

You’ll need to supply your own monitor, keyboard, and mouse. The monitor can be anything with an HDMI or composite video input. There are adapters available to go from HDMI to VGA if that’s all you have available, but they can be pricey. Any USB keyboard and mouse will do.

Nearly everything in this series will be done from the command line, but the current Raspbian OS boots to the desktop initially, so you’re going to need a mouse as well, but only for the initial setup, and when configuring CrashPlan later on.

The power supply can be almost any Micro-USB phone charger, although it must provide at least 700mA for 1st generation Pis, 1800mA for the Pi 2, or 2500mA for the 3. Check here for a complete table of recommendations. Since the quality of the power supply can directly affect the stability of the system, I’d recommend buying a high quality supply like the official Raspberry Pi power supply. They’re only about $12, and will save you frustration later. I have some leftover chargers from old cell phones that claim to be full 1-Amp supplies, but can’t even power the caps-lock light on my keyboard. The better your supply, the better your experience will be. Trust me, it’s worth it.

Note: In general, you should try to avoid plugging things into the Raspberry Pi while it is running. Linux is more than capable of hot-plugging peripherals, but with such a small power supply, the Raspberry Pi has tendency to “brown out” and reboot when you plug things in. Your basic flash drive is probably safe, but plugging in a game controller might power-cycle the computer. You’ve been warned.

Storage comes in the form of an SD card. The larger the card, the more stuff it will hold, so you might be tempted to get the largest card you can. As part of this series, I’ll show you how to boot the Raspberry Pi from an external hard drive, so in the long run anything over 8GB will just go to waste, and will take longer to back up. For that reason, I usually stick to an 8GB card while I do the build. Similarly, once you’re booting from the hard drive, the speed of the card won’t matter anymore, but faster cards will make some of the initial setup noticeably faster. If you’re not planning to boot from the hard drive, then feel free to go a little larger on the SD card.

Finally, you may want to buy a case of some kind. There are plenty to choose from, and there are even plans you can print out and fold up to make a case out of card paper. Many people seem to like making cases from Lego bricks as well. I’d recommend a decent protective plastic case with keyhole slots on the back so that the whole thing can be mounted somewhere when you’re finished. You could also Velcro or tie-wrap the Raspberry Pi to the side of the hard drive if you want.

What software do I need?

The Raspberry Pi has no built-in operating system of any kind. It expects to find its OS on the SD card when it powers up, so you’ll need to get an OS onto the SD card before it’s going to do anything.

Note: Older versions of these posts talked about using the Raspberry Pi Foundation’s “NOOBS” image, but that really does cause more problems than it solves when building a server, so I have removed that information. If you really want to read that stuff, then you can dig around using the Internet Archive’s Wayback Machine:

https://web.archive.org/web/*/melgrubb.wordpress.com

These days, I only recommend getting a plain, Raspbian image from the Raspberry Pi Foundation’s download page, and writing it directly to the card using a program like Win32 Disk Imager or HDD Raw Copy

You might also want to go get the SD Association’s “SD Formatter” tool. This will help you reclaim the unallocated space on your SD card in the event that you want to use it for something else. When you write a 4GB image to a 16GM SD card, you can’t just stick it in a Windows machine, reformat it and expect to get all the space back. Windows is going to see an SD card with a 4GB partition, and 12GB of unallocated space which it will totally ignore. When you tell Windows to format the drive, it’s just going to format the 4GB partition, and leave the other 12GB alone. SD Formatter will format the whole card and get all your space back.

You can accomplish the same effect using something like diskpart on Windows or fdisk on Linux, and you’ll need them if things go really wrong, but in most cases, SD Formatter is all you need. See the supplemental post “SD Cards Gone Bad” for more information on using diskpart to recover corrupted SD cards.

What’s next?

That’s it for the introduction. In the next post, we’ll start building the initial OS image, and get the machine up and running.

Posted in Computers and Internet, Home Server, Raspberry Pi | Tagged , , , | 10 Comments

Raspberry Pi Home Server v2: Introduction

Preface to the “second edition”

Back in 2014, I wrote a series of posts on creating a complete home server using a Raspberry Pi. There were plenty of articles out there on the web that covered the same individual elements, and even a few that covered larger chunks of the entire process, but they were all either incomplete, or lacked the detail I wanted, so I started creating my own. The idea was that it would be a single series of articles written in a consistent style, at an appropriate level for a beginner, and would do their best to actually explain what the commands were doing as much as possible rather than just giving a “do this” list. I was explaining this process to myself as much as anyone else at the time.

Since that time, the Raspberry Pi world has changed several times. We’ve seen the release of several new Pi models (Model B+, Pi 2, Zero, and now the Pi 3), two major OS releases (Jessie and Stretch), and a new desktop environment (Pixel). I’ve spent a lot of time building and re-building essentially the same server over and over again each time something changed and broke my instructions. I also recorded this entire process from end to end as a course for PluralSight, and streamlined my personal approach to building the server along the way.

I feel that the time has come for me to stop patching my original blog articles and create a new set of posts, updated with all of the things I’ve learned since the original series was published, including what I think is a better ordering of the steps. For instance, I’ve found that moving the OS to the hard drive early on in the series became a burden since it was no longer possible to take a simple SD card backup of the system. As a result, I’ve moved that step closer to the end, and added a new section on making usable backups after the move has been made.

This also gives me a chance to declare “comment bankruptcy”, and start over with a clean set of reader comments that won’t be as clogged up with old information that’s no longer relevant.

The new posts are largely a copy/paste/update/clarify process. Most of the body text has been carried forward from the original posts, but I’m reviewing it top to bottom, fixing errors I somehow never noticed before, and adding clarity where I can. In addition, I’ll be adding a Troubleshooting section to each article addressing problems as they arise. I found that updating my existing instructions didn’t help those who had already built a server, but encountered problems after upgrading individual components.When things stop working, I want people to be able to come back and find the answers they need.

Lastly, I’m not going to number the individual steps this time around. This will allow me to rearrange the recommended order later on, and to insert or replace steps as needed. I also feel this will provide a better mechanism for alternative routes through the series.

Hopefully this version of the series will last for a while, and I won’t have to do this kind of overhaul again anytime soon. The original articles will remain, but with a note at the top redirecting users to the updated versions.

Introduction

This series originally started as my own notes on building a complete home server using a Raspberry Pi. I found a lot of other posts out there on the internet, but they were all in varying levels of detail, and were often out of date. As I have found since publishing my original series, keeping up with the Raspberry Pi world is hard. It changes very fast. Every time major changes happen, I brace myself for a flood of comments letting me know that one piece of the series or another has stopped working, and I have to play detective again to figure out how to adjust to the latest change.

Not only does the OS keep changing, but the individual components keep getting their own updates as well. Any one of these could receive an update at any time, but I try to stay on top of it as best I can. Fortunately for me, each component is fairly independent of the others, so I usually don’t have to revise everything at once. If something doesn’t work for you, please be sure to read through the comments. This series has received great support from the community, and often questions in the comments are answered by someone else before I even get home to look into them.

Article Index

Acknowledgements

A lot of credit goes to the Instructables article that got me started: http://www.instructables.com/id/Ultimate-Pi-Based-Home-Server

It’s a good article, but it’s extremely out of date now. Also, I wanted to start from a standard Raspbian image rather than TurnKey, and I didn’t agree with some of the choices and ordering. For instance, I felt that basic file sharing should be tackled before building out a private cloud, and that the LAMP stack should be installed all at once before any other components that depend on it to prevent their installations from jumping the gun and installing bits of it on their own.

Posted in Computers and Internet, Home Server, Raspberry Pi | Tagged , , , | 10 Comments

Almost there

The second edition of the Raspberry Pi Home Server series should be finished and published this weekend. I just wanted to give everyone a heads up. I got a fire lit under me last night when it seems my series was linked to by a certain Wil Wheaton, the patron saint of geeks. My version 2 posts were mostly done, but I’m really pushing now to get the final versions out this weekend.

If you briefly saw a post about Syncthing, sorry about that. I don’t know why WordPress decided that one didn’t need to be a draft anymore. It was totally not finished yet, and you shouldn’t take my word for it on that part yet. It’s a new section I’m considering for the series this time around as an alternative to BitTorrent Sync, but I’m still evaluating its performance on the Pi. I’ve heard mixed reviews, and found about three different ways of installing it. It looks good so far, though. I’ll unleash it on my public share and let it cook for a while before releasing my findings. You can expect that one in the coming weeks.

P.S. CrashPlan on the Pi is still a big ball of fail. There are workarounds, but I dislike all of them. I’m working on the total end-run of the workarounds, which requires nothing from the pi but a share. Let’s see them break THAT.

Posted in Computers and Internet | Leave a comment

State of the Blog

I wanted to post an update here to let people know what’s going on with the blog, and the Raspberry Pi Home Server series in particular. I realized a while ago that the Pi world moves incredibly fast, and my articles keep getting out of date. This affects some articles more than others.

The worst one is the CrashPlan installation. Code42 does not support ARM-based devices, and in the last year or so seems to have really cranked up the frequency of their releases. With each release, CrashPlan auto-updates itself, destroying all of the necessary tweaks that were done to make it work in the first place. There’s no good solution to this problem. There are, however, some “kinda bad but they’ll have to do” solutions. I’ve heard mixed reviews about the success or failure of the different approaches, and have been trying to crowdsource a consensus out of my comments, which now dwarf the articles they are attached to.

I’ve also just recently had a hardware failure. The SD card in my own server croaked, and while I DO have backups, Raspbian has moved significantly onward since I first wrote these articles. I’m taking this as an opportunity to rebuild from scratch, document it all again, and release an updated set of articles with new ordering, advice, and screenshots. This is going to take a little while, but I’m working on it.

It’s time to declare comment bankruptcy and publish the RPHS v2 series, and it starts right now with me rebuilding my own server from scratch, and documenting it all like I did the first time.

In the meantime, the old articles are still perfectly valid, and should get you where you need to be. Just make sure you read the Updates sections that now appear on pretty much all of the articles. I think my plan now is to do less updating in-place, and publish new versions of the articles instead. This will let me occasionally reset the long tail of comments each article has grown, and start over with a fresh set for each update. It’s worth a shot.

Posted in Computers and Internet | 2 Comments

Raspberry Pi Home Server: Changes

A lot of exciting changes are happening, and at least one major disappointment. There’s a new Raspbian image out(https://www.raspberrypi.org/downloads/raspbian), and it brings a new desktop along with it (https://www.raspberrypi.org/blog/introducing-pixel). The Pixel desktop is a Pi-optimized LXDE variant, and it looks pretty much like what you’re used to if you’ve built a Pi since the beginning of the year. There are some notable changes, though.

Chromium Browser: This is the open-source version of Chrome, and while we’ve always had the ability to install it ourselves, it’s there by default now. Not only that, but it’s got some plug-ins preconfigured to make the web more Pi-friendly. In particular, it’ll force YouTube to send videos in a format that the Pi can decode more easily using hardware acceleration. That doesn’t really mean much to a server, but it’s a welcome upgrade.

Built-in VNC: That whole chapter I wrote about x11vnc? Yeah, you can forget that now. You now have a working remote desktop included in Raspbian out of the box. Just download the RealVNC Viewer and connect. It might be possible to use other viewers like UltraVNC, but it’ll take some configuration. The RealVNC viewer is small, portable (no need to install it), and works immediately. I’ve made the switch.

And now for the bad news. The folks at Code42 have been pushing updates to CrashPlan at an increasing rate, and every time CrashPlan updates itself, it breaks all of the patching and tweaking we had to do to get it running. At first, this was merely annoying. Now it’s become unmaintainable. I can’t trust my backup machine if it can be brought down at any time by a silent, compulsory update. I’m working on a new blog post about alternative approaches to using CrashPlan at home, and I’m hoping that the Pi can still be a part of that setup.

In the meantime, if you want to continue holding the Pi’s hand, and diving into the guts of CrashPlan roughly once a week, be my guest, but I won’t be putting any more time into maintaining the CrashPlan instructions unless I hear that Code42 has either started supporting ARM-based devices directly, or at least given us an alternative to stop the constant updates from undoing everything.

Posted in Computers and Internet | 4 Comments

Backing up a Pi that boots from the hard drive

I get this question a lot, and figured it’s about time to address it. Once you’ve finished a Raspberry Pi Home Server, and have it booting from the hard drive, how are you supposed to take backups? After all, you can’t just pop out the SD card and just run it through Win32DiskImager anymore.

If your main computer is a Mac or Linux machine, then you can simply shut down the Pi, hook it up to your main computer, and use the “dd” command to make a copy of the OS partition in the same way you wrote the SD card in the first place, but with the “if” and “of” parameters reversed.

If your main computer is a Windows machine, then one answer is to create a secondary, minimal SD card or the Pi. You can use Raspbian Lite for this, since you won’t need anything but the command line. Then, you just shut down the Pi, drag it back over to your desk and hook it back up to the monitor and keyboard, swap the SD cards, boot up using the new SD card, and use the “dd” command to write a backup of the OS partition to the Data partition on the same drive, or mount a flash drive, and back up to there.

But wait… there’s a much simpler option. You can just attach the hard drive to your Windows computer, and use Win32DiskImager to take a backup of the whole hard drive. You’ll get a snapshot of the complete working state of the system this way. If the drive attached to the Pi is very large, then I realize this may not be an option, but let me tell you about my current setup.

My Raspberry Pi Home Server has two drives these days. The first is a smallish SSD (like 60GB small) that I have long since “traded up” from. It still has two partitions on it, a 16GB OS partition, and a Data partition, but that’s not where most of my actual stuff goes. I use the Data partition on this first drive for things like the swap file, MiniDLNA’s database, and CrashPlan’s metadata, but my actual music, movies, pictures, and CrashPlan backup files are all on a second hard drive, which is the 2TB RAID. In this way, I’ve completely separated my “stuff” from the system. The storage drive is blissfully unaware of the Pi’s existence. I still format this drive using NTFS, so I can just plug it into my regular computer and get to my stuff.

By the way, I don’t really use Win32DiskImager anymore, either. These days I use HDDRawCopy, which has the added benefit of writing out compressed image files, so instead of creating a 60GB file and then Zipping it up to get my hard drive space back, I end up with a file that’s already compressed in the first place.

Every now and then, after doing system upgrades, I’ll shut the whole thing down, hook the primary drive up to my regular computer, and create a new image. This image contains not only the OS, but the current state of the Data partition as well. If I’ve added music or movies since the last back up, then MiniDLNA will have to play catch-up when the system starts up, but eventually, it all sorts itself out.

But what if you only have a single, very large drive hooked up to the Pi? There are many programs available that will let you back up individual partitions. I don’t have a personal favorite here, but I would welcome recommendations in the comments.

I’ve heard good things about Paragon Backup & Recovery, and Macrium Reflect Free, but I don’t know if backing up and restoring individual partitions is included in their free versions or not. Also, I think the free version of Paragon is limited to backing up and restoring drives that are 2TB or less. I’m not sure about Macrium. Perhaps I’ll find the time to do some testing on these free solutions and update this post a bit later on.

Posted in Computers and Internet | 3 Comments

CrashPi Zero?

So I just went to my local MicroCenter, and picked up a Raspberry Pi Zero for $5. It’s pretty much everything the model “A” had, but with 512MB of memory. You could also say that it’s like a model “B” without the network jack. Networking is really the only thing this model is missing, and if you are planning to use a USB hub, or just a wireless network adapter, then you should be all set.

The way I have the CrashPi set up right now with a powered USB hub running the whole thing, I realize that I could replace the current B+ with a Zero, and everything would continue to work just fine. The only new piece of hardware needed is a Micro-USB to regular USB adapter, sometimes called an “OTG” (USB On-The-Go) adapter, so I picked one of those up as well. Due to the new design, I also had to use a Mini-HDMI adapter which I originally bought for our DSLR camera. I have used the adapter precisely zero times for that purpose, so it’s nice to see it finally getting some use.

I just burned a new Raspbian Jessie image to the card and plugged it in. According to my “Charger Doctor”, it’s only drawing 130 milliamps with the desktop running, so the power consumption is considerably less than previous models. The possibility of battery-powering this new version is very real. The composite video output is still there in the form of some unpopulated solder pads on the board, so you’ll have to provide your own jack. At this point, I’m thinking it should be very possible to buy one of those “TV Games” joysticks, and entirely replace the guts with a Pi Zero, making it the most portable DIY emulation system ever.

If it weren’t for the lack of networking, I’d be ready to replace my single Raspberry Pi Home Server with a cluster of Pi Zeros, each running just one or two of the normal server functions. You could have one that just runs VPN, another that’s just for the file server, and another that’s just doing CrashPlan. The functions would be more isolated, and you’d STILL be cheaper than a normal Pi. Adding in USB hubs and wireless adapters would raise the cost of course, but it’s amazing what you can find on Amazon.

Oh yes. There will be updates coming.

Posted in Computers and Internet, Home Server, Raspberry Pi | 3 Comments

CrashPi – An off-Site backup for the whole family

Note: Just as with the main CrashPlan article, the CrashPi is not currently operational, but I’m leaving the article here in hopes that maybe the next update to CrashPlan won’t break things quite so completely.


In Part 15 of the Raspberry Pi Home Server series, I mentioned the possibility of building a “CrashPi”, a simplified version of the full server running only CrashPlan, and some basic supporting functions such as X11VNC for maintenance. I hadn’t actually built one, though. It was just an idea… until now.

Today, I’m introducing a dedicated CrashPi into my home network. The original idea of the CrashPi was for it to be placed at a friend or relative’s house to act as my off-site backup, keeping the home videos, photos, and documents safe in case of a disaster like a house fire. I hadn’t quite gotten around to asking to mooch from the in-laws broadband, though.

Then, just last week, my wife suggested that I could just put it in the garage, which is not attached to our house. The odds of the house and the garage being lost in anything short of a meteor strike are pretty low, so I’ve decided to build a real CrashPi, and to use CrashPlan’s “friend codes” to act as a true off-site backup for my college-age twins, who are now off on their own. No matter where they go now, the CrashPi in my garage is their secure backup.

Gathering the parts

I have a few older Raspberry Pis sitting around since the 2s came out, so I’m going to use my old B+, which has more RAM than my original B. This extra memory will be very helpful for CrashPlan, which can be rather resource hungry. Offloading CrashPlan to a separate server means that my main home server will have less to do now, which will also help with its stability.

The complete list of parts is as follows (with Amazon links):

  1. Raspberry Pi Model B+ (http://amzn.to/24K2Fiz)
  2. Power Supply (http://amzn.to/1p93m58)
  3. 8GB Micro SD card (http://amzn.to/1p93kKu)
  4. TP-Link TL-WN722N WiFi adapter (http://amzn.to/21TlD40)
  5. CyberPower SX550G UPS (http://amzn.to/1pt06RO)
  6. 5TB Seagate “Expansion” drive (http://amzn.to/1pt04cN)
  7. BUD Industries NBF-32018 ABS NEMA Enclosure (http://amzn.to/1pt0aRs)
  8. C14 Power Inlet (http://amzn.to/1pt09NE)
  9. Panel-mount USB cable (http://amzn.to/1pt0fol)
  10. Powered USB Hub (http://amzn.to/21TmbXG or similar)
  11. Adhesive anchors (http://amzn.to/1p94SE5)

Note: Not all the items actually came from Amazon. Most of the parts (hubs, power supplies, cables, WiFi dongle, etc.) came from my local MicroCenter, but not everyone has a toy store like that close to their house, so I’m providing Amazon links so you can at least see the parts I’m talking about. My hub is actually made by Inland, but Amazon doesn’t carry it, so I picked something similar.

The Pi, power supply, and SD card I already had on hand. The other items I bought new for this project. I have a smaller WiFi adapter (Tenda W311M) that I’ve used inside the house, but wanted a little more range to reach the garage, so I sprung for the dual band. I know how Pis hate having their power yanked, so I picked up another $45 UPS to keep things maintenance-free. The hard drive was the biggest expense on this project. All together, it came to a little over $200, but I think it will be worth it to keep the whole family’s stuff safe, and especially the kids. One has already had a laptop stolen and lost all of her work for the semester up to that point, so the cost seemed worth it to me.

I won’t repeat all the individual steps here, but I’ll refer back to the original posts, and explain any differences.

Install the OS

installed the OS as usual using the current Raspbian image (not NOOBS). I left the overclocking off this time, favoring stability over performance for the CrashPi. I didn’t add any additional users, either.

Going Headless

Next, I set everything up for headless operation, installing Webmin and X11VNC exactly the same way as I did for the main server.

Attaching a Hard Drive

I attached the hard drive, mounted it at “/mnt/backups”, and created a “public” share through Samba. I did not, however, choose to boot from the hard drive in this case. I did set up a 1GB swap file on the external drive, and configured the Pi to use that for swap space rather than the file on the SD card. This will prolong the life of the SD card. I opted for NTFS as the file system again so that I can easily attach the drive to my regular computer if needed. “ext4” is still your best choice for performance and reduced overhead, though.

CrashPlan

Of course, the whole point of this project is to run CrashPlan, so that went on next, with the backups going to “/mnt/backups/crashplan”. I have signed into CrashPlan using the same credentials as my regular computer and Raspberry Pi Home Server. I signed each of the kids up with their own accounts, though, and used the friend code from the CrashPi instance to use as a destination.

It’s important to note that the friend codes are installation-specific, so the code from the CrashPi is different than the code from my regular computer or the existing server. Using the friend code from the CrashPi means that my kids have the ability to backup to the CrashPi, and only the CrashPi, so I don’t need to worry about them using up all of my primary server’s space.

Also, since each kid has their own account, they get their own notification emails about how up-to-date their backups are, rather than all of the emails going to me. Using their own accounts also means that their stuff is safe from prying eyes, even mine. They own the encryption of their individual backups, not me. The downside is that if they forget the password to their CrashPlan account, I can’t help them and they’ll have to start all over again.

NUT

Finally, I installed NUT, and configured the CrashPi to shut itself down in the event of a power failure. I didn’t set up email notifications about power events or anything like that because my main home server is already telling me about those.

Building the enclosure

Here’s where the project starts to become its own thing. I ordered the BUD box from Amazon based on it’s interior dimensions. It’s a bit deeper than I had anticipated, but that worked out well as it allows me to simply lay the hard drive down on the bottom of the enclosure rather than mounting it to the back of the box as I originally had in mind.

A metal box would have let me mount a bare hard drive directly to it, and would have acted as a heat sink, but I went with a plastic box so as not to interfere with the wireless signal. A metal box would have required an external WiFi antenna. I tried to build a system with as little custom fabrication as possible so that all the pieces can be easily swapped out if needed.

I could have run cords out of a simple hole in the box, but since this computer will be mounted in my dusty garage, I wanted to leave no holes where dust or spiders could get in and mess things up. For that reason, I wanted to keep the number of holes to a minimum (zero). I got the power inlet and panel-mount USB port so that once they were in place, I could seal around the openings with some RTV sealant I already had around. This should keep everything clean, and keep any insects out.

WP_20150922_17_08_54_ProWP_20150922_17_08_42_Pro

I cut most of the cord off of a small, three-outlet power strip (from Big Lots), soldered the leads directly to the power inlet, and enclosed the joints with some heat-shrink tubing. Then I mounted all the components to their respective walls using tie-wraps and adhesive anchors. The end result looks like this:

WP_20151124_08_55_46_Pro

On the right is the USB hub and power strip (behind the hub). On the back of the box is the Pi itself, and just resting on the bottom of the box is the drive. There’s still room in this box for me to add another drive or two if needed, so I should be set for quite a while.

As you can see, the Pi is powered by its own hub. The hub is plugged into one of the Pi’s regular USB ports, but the Pi’s own power cord plugs right back into the hub again. You might not expect it, but this works just fine because the micro-USB jack on the Pi doesn’t even use the data lines, it only uses the power lines. You don’t have to worry about the Pi “talking to itself” or anything.

The drive I chose has its own power supply, but luckily it’s been implemented properly and doesn’t “back-power” the hub (and thereby the Pi), so when I turn the hub off, the whole system goes down. Naturally, I log in remotely and “sudo shutdown -h now” first.

Finally, here’s a picture of the whole thing mounted to the wall in my garage:

WP_20151124_08_56_11_Pro.jpg

The single cord coming from the right side of the UPS (The battery-backed side) is running everything in the server box. The USB cable coming from the bottom of the UPS runs to the panel-mount USB port, which is then plugged directly into the Pi internally. The two plugs on the left have nothing to do with the server. They are for a couple tool chargers, and the UPS just provided a convenient, surge-protected place to plug them in.

It’s not the world’s most attractive “server rack” for sure, but it’s weather-proof and kind of off-site. It’s now the destination for all of my backups, including backing up the data from my regular Raspberry Pi Home Server. I’ve set up CrashPlan on my server to back up it’s drive full of stuff (Media, mostly) to the CrashPi, so now I have a redundant backup of all of the family photos, videos, and music. These were already stored on a two-drive RAID, but now they’re even better protected in the event of a disaster.

Posted in Computers and Internet, Home Server, Raspberry Pi | 5 Comments

Raspbian Jessie released

Raspbian “Jessie” just went official, and that means that those of you following along with my instructions are going to notice some serious changes. The first and most obvious is that Jessie boots straight to the desktop by default, and raspi-config has been superseded augmented with a desktop GUI tool.

I have built up a new server using the Jessie image, and will add updates to the beginning of each individual post. I’ll be updating the posts in-place in the near future, but I’ve simply run out of weekend for now.

Posted in Computers and Internet, Home Server, Raspberry Pi | Leave a comment

The Raspberry Pi Home Server series is now on Pluralsight

I’ve been working on this for the last couple of months, and I’m excited to announce that I’ve turned this series into a course for Pluralsight. The course is available at:

http://www.pluralsight.com/courses/raspberry-pi-home-server

For those that don’t know already, Pluralsight is a subscription-based online training site. Don’t worry, I’m not going to take the blog posts away. I would never do that to you. Sometimes you just want to SEE something being done instead of just reading about it, though. You can follow along with the bouncing ball, and build your own server along with me.

The course is divided up in much the same way as these blog posts, with each module adding on one more piece of the puzzle, although the order is a little different, and some items (like Transmission) weren’t included.

If you have a Pluralsight subscription, please consider watching the course. If it does well, I might be able to do more of them.

Posted in Computers and Internet | 8 Comments