Picture of Ultimate Pi Home Server

Welcome reader.

First please note: This instructable can be done within a day, but a weekend is certainly recommended.

In this instructable I hope to teach you key skills involved with setting up and configuring a Linux Server. The knowledge used here can be applied to almost all PC architectures so if you don't own a Pi
(Why not dude?) or it's tied up in another project, any old or unused PC will work. In more detail the main skills taught will be:

  • Burning an ISO image to an SD for the Pi
  • Installing an OS
  • Setting up A web server
  • Setting up An SQL instance
  • Deploying a custom cloud network
  • Managing users for the cloud network
  • Setting up a SAMBA File sharing network, which will integrate into an established windows based home or office network
  • Controlling SAMBA users
  • Establishing a static IP whilst using a non-static IP internet connection
  • Using Webmin Console to install packages
  • Using Command line terminal to install packages
  • Carrying out basic commands such as rebooting (terminal)
  • Editing system files with Nano terminal based editor
  • Permanently mounting hard drives within the Linux file system table via webmin
  • Understanding the principal of the Port forwarding function on a home router
  • Setting up a web interfaced bit torrent manager
  • Being an overall IT nerd.

If you're interested then carry on reading. If not, give it a try; you may discover a new hobby.

As the above list demonstrates there's a lot to learn. I definitely feel this is a weekend project. I've followed this process several times and it takes a couple of days at least. Its good to take long breaks because your eyes may begin to become strained and you may suddenly become unenthusiastic about the whole thing.  This instructable offers functions of many different store purchasable products, such as:

The server we'll setup will cost far less than each of these services in the long run and only a fraction of the cost of the combined services. Setting up your own server is not only custom and cheap, its very rewarding. I will be a happy guy if somebody benefits from what this instructable contains or become inspired by what I have done. It took ages to plan and write this instructable. If you learn anything at all or feel this instructable is well written or well documented, please vote for me in the Weekend Projects Contest or the I could make that contest.

I would also like to point out that this is not a comprehensive tutorial on designing a server case. There are details of my case on step 3, however this guide is intended to be a comprehensive software tutorial. So if you get stuck or feel a step isn't too clear, just let me know and i'll be happy to help.

A few tips: Because this takes more than one day, don't just fall asleep and forget what you were planing on doing next. Instead have a pile f post-it notes. This way before you ZzZzzzz... you can jot down anything that needs doing during the next session. I had loads. All over the walls, floors, chairs, desks - you name it! Okay slight exaggeration, but on a serious note they do help. I did use a full stack.  Another tip would be to follow the steps on order. Don't just think "Hmm I like the sound of my own cloud network lets do that first!" The steps are in such an order that each before is most likely required for the current, if that makes sense. Just stick to the order, it'll make life easier. A final tip: don't be limited to what is taught here. Do Think of this as a base for inspiration. Adding more services such as those listed on the turnkey website is easily done using the search APT function within the Webmin Package manager.

Okay, Confused? Then let's learn...


 Caution! This instructable contains 30 steps. Proceed at your own risk. 

Remove these adsRemove these ads by Signing Up
1-40 of 373Next »
EulerFF made it!7 days ago

Great Instructable! Thanks! With some try and error and good comments I got it done!
However I have problem getting OwnCloud work with my Android SmartPhone. I Can access Owncloud with my browser from another computer & Phone but I can't access it with my Owncloud App from Play Store (Android App). The App just shuts down when I Log in to my Owncloud.
Since a test server worked with the app, I guess there is some problem with my server accepting request from an app.
Anyone with similar Issue?

1435074611274-1340247717 (1).jpg
AndyRReyna7 months ago

I'm having an issue installing OwnCloud. I get the following error:

Can anyone help? I have follewed the instructions to a "T"

owncloud error.JPG

Try tu run "sudo chmod 770 *" and "chown your_user:your_user *" on that folder from shell login with user on which you run that owncloud server. (obviously "your_user" is your's user name on raspi, default pi)

root already has ownership. In fact, I uninstalled Owncloud and recreated all databases. I mkdir new folder with the chmod of 0770 but yet still getting same error. I'm Puzzled to say the least . Any Thoughts???

You can't set linux style permissions on an ntfs drive, so chmod won't work. I'd say just go with ext4, it simplifies things.

I have done that and still getting same results. I'm leaning towards the NTFS drive. Perhaps I should covert it to Fat32 and see what happens.

Did converting to Fat32 fix this issue? I really would like to stay NTFS if it is possible.

I would suggest mounting your drive manually using the ntfs-3g driver and editing the fstab file rather than through webmin. Fat32 is only going to make things worse as FAT32 has no support for linux stile (Unix/Posix) file by file permissions whereas NTFS has full support but not the nicest implementation in the linux ntfs drivers.

give yourself superuser status (not the best habit but hey!): sudo su

install ntfs-3g if not already got it: apt-get install ntfs-3g

you need your drive unique identifier using: blkid

edit fstab file: nano /etc/fstab

add to bottom of file: UUID= 204UJ.......(YOUR DRIVE UUID) /media/yourhddlocation ntfs-3g auto,users,permissions 0 0 sudo mkdir /media/yourhddlocation mount /media/yourhddlocation

Save and exit file (CTRL+O, ENTER, CTRL+X)

reboot: reboot

I tried and it still did not work. If I am understanding right all I need to do to mount is add the lines in /etc/fstab. This did not work for me. Is there something else I need to do to mount the drive?

Thanks! I will try this next weekend.

I had the exact same issue. I ended up having to format as ext4 to get around it.

Halphinian17 days ago
Could I run Minecraft or Terraria mini-servers on this? I have been wanting the build a server for either or both of these for a while now, and I have been struggling because of my lack of knowledge in this subject. Any help would be appreciated on this
DhruvV18 days ago


my owncloud refuses to go into my /media/<hardisk>/cloud folder and gives some error about permissions please help

BillyF219 days ago

For anyone going through the tutorial and experiences a failure in the installation, here is what I needed to do to get mine working.

AndyT529 days ago


I have installed everything and it worked and rebooted and I know my IP address. Coming to this step though I cannot access webmin with the IP address. Is there something I need to configure on the PI first?

BillyF2 AndyT519 days ago

AndyT5, if your still having an issue, try this. On your pi, run

service webmin start

then you may receive some message like

[ ok ] Starting webmindone.

This should get webmin up and running and allow you to hit it through the url. Hope that helps.

MaxB920 days ago

First of all thank you for your great tutorial!

However, I don't get why you specifically state to exclude superuser rights to the owncloud user but in the picture of the added user credentials you clearly see permissions: all.

Furthermore, in the next step where you create the cloud folder and chmod that to 750, when I do that the owner and group of the folder is root. And thus I think the owncloud user has to have superuser rights. Am I correct? or should my cloud folder be owned by a different user/group?

MaxB920 days ago
SDB906926 days ago

Ok, Please help me. The OS That he is talking about is not working on my pi, so i got rasbian and installed it manually. Than, when i tryed installing MySQL, it kept saying instalation failed. I want to do this project, but i keep running into problems. Please help

Hello friends this was a great instructable on how to create an ultimate pi home server by dr wilson, but I encountered a great many errors when I went through the entire process so I thought I should give you guys a heads up just in case

First error

perl: warning: Setting locale failed.

perl: warning: Please check that your locale settings:

LANGUAGE = (unset),

LC_ALL = (unset),

LANG = "en_US.UTF-8"

are supported and installed on your system.

perl: warning: Falling back to the standard locale ("C").

The Solution

you will find many solutions on the INTERNET, some may work for you and others might not, so the permanent solution is to Comment the line

SendEnv LANG LC_* in /etc/ssh/ssh_config,

so it should looks like:

#SendEnv LANG LC_*

Second Error

MySQL server 5.5 , no matter what you do , it will always fail to restart, doesn't really matter how many times you reinstall it. So a temporary fix for this is to restart it every time you install something which requires it to the MySQL server to be stopped and then started again. You will find how to do it by simply googling it.

Third Error

Its not an error actually its a bit of an advice, instead of using the webmin panel to install stuff like MySQL , PHP , and SAMBA , use the command line interface to do the same, it will be much much more easier. And there is very little probability of you encountering any errors.

Generally people have this common perception that using command line is tough, but once you do try using it, you will surely realize that it is quite easy to use.

Just google stuff like “install MySQL server 5.5 raspberry pi” , and you will find a lot of links which can help you out with the installation using the command line.

For example :

To shutdown the pi remotely using SSH give the command sudo halt -p

To connect to the server using SSH use the command: ssh user-name<i.p. address of the server> i.e. ssh pi@

To edit any file i.e. a file named config : nano /directory/of/file/config

A couple of suggestions as well :p


Even the new pi 2 , cannot take so much load , I mean you are running the MySQL server , SAMBA file share server as well as SSH . Added to all this you will have own-cloud running on it as well, a better option is to install a FTP downloader for Linux , just as we have the InternetDownloadManager for windows. There are severalFTP download softwares which have a web interface as well which can be used easily. Some of them are pyload, aria2 and fatrat.


If you connect the external hard disk to the pi directly, chances are it will never boot up. Because the pi does not have enough power to run it, you should buy a usb hub with external power source and a small usb laptop cooler, the smallest that you can find, then keep your hard disk as well as the pi on the fan and power everything via the usb hub. This will keep your hard disk and the pi cool 24x7. It can be of critical importance as you intend to run it as a server.


If you try to mount an NTFS drive to the pi, it will always be a pain in the ass for you at some point or another, instead format it to the new ext4 partition system and all is cool.


I used the same folder for my samba file share, my torrent downloader (transmission) and my ftp downloader(pyload) so that I could easily view all that stuff as and when a download finished. You could make a directory named cloud and keep a torrent folder, a ftp download folder and all other folders that you wish to share on the network. Then just make the cloud folder as the folder that you want to share in samba.


The TurnkeyOS dosent seem to work on sd cards that have a capacity of more than 4GB. So there is this link of another intructable that lets you turn your present raspbian installation into turnkey .

This is the link I believe

after you follow this instructable you and try to fix the INTERFACES error , you will still get it but dont worry, it aint gonna cause you any sort of trouble. But you will have to manually install WEBMIN using command line . Again google it up” Install webmin on raspberry pi” and you will get a lot of links to help you with it.


Note down the MAC id of your raspberry pi device using the following command

ifconfig eth0

This will result in output similar to :

eth0 Link encap:Ethernet HWaddr c7:35:ce:fd:8e:a1

inet addr: Bcast: Mask:

inet6 addr: fe80::ba27:ebff:fefc:9fd2/64 Scope:Link


RX packets:336 errors:0 dropped:0 overruns:0 frame:0

TX packets:304 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:27045 (26.4 KiB)

TX bytes:43758 (42.7 KiB)

The “HWaddr” is the MAC address. In this example “c7:35:ce:fd:8e:a1″

Now give a static IP address to your raspberry pi. This will make it a lot easy for you to open webmin , shellinabox , transmission web interface or pyload web interface. To make a static IP you will just need to enter the mac id of your pi in your router's setings and get a static IP. Again if you google it up you will find a lot of solutions for the same.

#7 If youu are not able to access webmin using PI_IPADDRESS:12321 , try using https://PI_IPADDRESS:12321/ i.e. , notice I am writing https instead of http. Keep that in mind and maybe you will be able to access webmin.

I hope this was of some help to you guys. If you require further help I ll always be available at .

jordomaller1 month ago

i am on the original rpi and i cant seem to get past step 5. is the webmin on my pc or the pi? im pretty much a noob in the department of programing and terminals but i am very interested in figureing this out. after i get past the turnkey linux config console it asks for a user and pass. i endered it but never got the screen for turnkey logon it was code.

thanks if you can help

cdesangles made it!1 month ago

Works great! I have in the picture:

Raspberry Pi 2
5tb Seagate HDD
Ethernet Hub

I wonder, can you run Plex Media Server and Webmin at the same time?

2015-05-09 13.48.38.jpg
What will b better fir a server and why? Use a raspi or this Odroid-CI, the last one say is gigabit ethernet. Why will raspi b better if i want a server to stream my movies to my devices and storage documents? Thx

Has Turnkey really not been updated since Nov 2012? 2.5 years is a v. long there a newer ISO somewhere or a newer/better distro? I have an RPi2.

Here is a link where it shows you how to transform Raspian into Turnkey. It's better than the one I just commented

I've been using the Raspian distro, it works just fine. You only need to webmin manually (which you can do from here.

Nuts_Boltz1 month ago
Been having same issues with the NTFS format and owncloud. Have decided to format in ext4 in the hope i can continue. Fingers crossed.
Raphango1 month ago

Awesome work dude!

Congratulations for your ible!!

Janrabbit1 month ago

Hey, I'm not too sure what to set as the default download directory so that owncloud users would be able to access the files downloaded, any help would be appreciated.

Getting the Data directory (/media/serhdd/cloud) is readable for other users

Please change the permissions to 0770 so that the directory cannot be listed by other users.

But when going to edit the /etc/fstab file there isn't one so I'm creating a new on.. Any ideas? Should I have one? or do I need to create one?

I'm getting the same error. Are you using an NTFS HDD? Seems to be due to this as the commands for setting permissions are different from linux file systems. Yet to find a fix however so hopefully somebody here can slide a work around in ;)

I am getting the same error as well

just format your harddrive in linux friendly format - e.g. ext3, ext4. You can run it on NTFS, but it's a little bit tricky so different filesystem is the easiest, and the best solution

msykes42 months ago

Sorry if I am stupid, but did I miss something between 6 and 7? I can't get webmin running. I seem to be able to ssh into the pi with putty, but as this is not on the list of software, I assume this is wrong. Please tell me exactly how to get webmin open. Thanks.

If you installed the proper disc image from the last step (the ghoulman reference), your Pi should boot to the TurnKey Linux Configuration Console, which gives you all the addresses you see him accessing here. If this image isn't working for you, you can also install a vanilla copy of Raspian on your Pi and then follow these steps

to get Turnkey working.

Once you do have Turnkey working on the Pi, he omits the point that you should be typing these codes (i.e. "") in the URL field of your web browser, from another computer. Then you will be able to access the same screens that he is above. Gook luck!

GG92 months ago

Hi, to begin I find your work really impressive ans useful, I learned a lot, thanks

I have some questions, I plan on buying a Raspberry Pi 2 B will this work on it the way you’ve done it or will it be different ? Could I use only Raspbian OS and patch Turnkey to do the same?

My other question could i use Mycloud, Transmission, and Samba at the SAME time, will the server be so powerful to do it ??

I’m a beginner, so forgive me if some questions are for noob...

desterre2 months ago

Will this work on a Rapi 2?

duke5032 months ago

Can anyone help? I can't get my FAT drive to work with owncloud. It works with samba, but shows up as NTFS on the network. Help! I can't get chown to work to give owncloud ownership as it says "operation not allowed" in shell. I also can't get chmod to work to change permissions. (I renamed /media/serverhdd to /media/serverfat)


If you are still stuck, worth reading this post that explaining that for a FAT or NTFS mounted drive the chown and chmod don't work as you'd expect (versus EXT4). They need to be set at mount for the whole drive with some exceptions for NTFS (note this has no impact on your Windows permissions for Users and Groups, unless if you have set up user mapping).

On an another note if you have an NTFS drive, that you plan to use with linux worth using windows safely eject drive as one particualr reason is an extra 0 that is written in an unsafe eject can cause mount issues with NTFS-3g mounting in linux. Worth runing windows error checks in that case to reset drive.

I gave up ntfs, and formatted the hdd as ext4, and everything is cool...

1-40 of 373Next »