Instructables
Picture of Ultimate Pi Home Server
100_2820.JPG
100_2900.JPG
100_2817.JPG
100_2816.JPG

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 220Next »
rjanssen210 months ago
To fix the session closed after the prompt login, you need to change /etc/hosts.
Enter the following:
nano /etc/hosts
Then change the core in the line 127.0.1.1 to your hostname.

Hey man, I'm having the same problem but how do I get to

nano /etc/hosts

as I can't log into shell in a box?

Thanks

Hey Elliot, did you fix it? I'm having the same problem you are (hopefully were).

do it on the pi

DrWilson (author)  rjanssen210 months ago
Thanks for that! I'll edit that in (with credit of course!)
rjanssen2 DrWilson10 months ago
Glad to be of help!

Hey. I'm kinda having a problem with

/etc/init.d/transmission-daemon stop

All I get is

-bash: /etc/init.d/transmission-daemon: No such file or directory

and when I try to access

nano /etc/transmission-daemon/settings.json

It's just blank

Can someone please enlighten me :)

Ran into the same problem, Elliot. Uninstall the package by running

apt-get remove transmission

Then, run

sudo apt-get install transmission-cli transmission-common transmission-daemon

That should do the trick. If not, let me know!

Yeah it worked. Thank you so much Garrett :)

Not a problem, Elliot!

Thanks man I'll give that a try and let you know ?
glenn899 months ago
after pressing "Finish setup" I only get a new red window in top of screen saying: "MySQL username and/or password not valid

You need to enter either an existing account or the administrator."

anyone know how to get solved this one?
I double-checked the Mysql user several times. checked the config.php file for owncloud but still have this problem..

Thanks up front,
Glenn

while doing this I notice that for some reason when setting up MySQL the username had a capital c in ownCloud so I tried typing it this way and worked first time

Kk4619 days ago

Dear Dr,

please explaine where webmin should run on, is it the computer I use to acces the Pi or on the Pi itself? If on the Pi how do I start it up?

Keesk

Great project! Installed in a Cooler Master mini-itx case alongside my desktop mobo etc. The server rpi is mounted in the optical drive bay, the HDD is an internal 2.5" connected via SATA ~ USB adaptor cable (mounted in usual HDD bay). Power cable just runs out the back -haven't rigged a switch yet (don't really see a need to).

Replying to my own post I know, but I had a thought. Have you tried this with a model B+ using ZFS and multiple HDDs -redundancy is awesome!

l0nghy9 months ago
I get error after "finish setup" showing:
Can't write into config directory 'config'
You can usually fix this by giving the webserver use write access to the config directory in owncloud

I even change the permison to 777 but still not work. What is the problem. please help

Thanks a lot
Arizno l0nghy4 months ago

are you sure your SD card partition is not full (or near full). You should check it by running the following comand in your shell in a box:

df -l

If your available space on "rootfs" or "/dev/root" is minimal you will get an error. If that is the case you will need to pug a monitor back into pi and go to Advance Menu. You should Quit out of the configuration console menu. You will then see a separate menu asking with a long list. Select the one asking you to fill the rest of your partition. This will expand the partition. Reboot.

You might need to delete owncloud and start fresh. I would also delete the user files that owncloud created just in case.

If you have additional issues please see my reply to rjansen2

Hi Arzino

I tried quitting out of the configuration console back to the menu but I just end up going back to the terminal and I can't see the separate menu asking with a long list. Can you please tell me what I'm doing wrong?

Thanks man

try

sudo raspi-config

to get to the menu

Thanks man, that worked perfectly

colinkhalid5 months ago

You can solve the network config error by editing the /etc/network/interfaces file just after you copy the image to your SD card while it is still in the card reader attached to your PC. As root or administrator open the /etc/network/interfaces file and add the following the the top of the file # UNCONFIGURED INTERFACES

After this put the SD in the RPi and all should be well

information found here

https://github.com/turnkeylinux/confconsole/blob/master/ifutil.py

This was THE ANSWER! Thank you.

So now, after I have the possibility to edit the interfaces file via the network settings menu, what should I enter to be officially headless? DHCP or static? If static, should I also set this ip on my router by the Pi's MAC address?

"Just input logical answers" LOL this incstructable tells us how to unwrap and then skip this part TROLOLOL:D

mstruble shmaic1 month ago

Did you ever find a solution to this problem?

I can't seem to find a way to open up the /etc/network/interfaces file while the SD card is plugged into my PC. Nor what the proper information to put under the DHCP / Static fields when that comes up.

Any help would be appreciated!

fsagentnarsil4 months ago

I'm having difficulty booting with this image file. I've read that older software ( from before Sept. 2013) is problematic with newer boards . Has anyone successfully booted using this image file with a newer Raspi?

I'm seeing the single green LED blink described here:

http://elinux.org/R-Pi_Troubleshooting#Red_power_LED_is_on.2C_green_LED_does_not_flash.2C_nothing_on_display

I'm not sure if this causes problems later (as I'm having HD mounting problems now), but I was able to replace the boot files with these: https://github.com/raspberrypi/firmware/tree/master/boot

Is it possible to get the image file with your corrections? Thank you

Yeah, I'm at the HD mount stage now and running into the next set of errors folks have encountered.

What you need is to fix the boot files before you put the card back into your pi. Download these: https://github.com/raspberrypi/firmware/tree/maste...
and drop them into the root folder replacing the other boot files.

tlankford1 month ago

I am actually working at setting this server up. However, the distribution that is recommended for this build is not working in my r-pi. I tried several ways and it will not boot up at all. I am wondering if anyone else has had this problem. What would it take to use a normal edition of wheezy? Thank you in advance for the answer.

bandr3w52 months ago

I am having problems with user storage quota on owncloud 6.

I am using a 2TB external USB HDD. I have my quota set as unlimited.

Once i started syncing to my owncloud account using the windows sync client, the " XGB of XXGB in use" message continually changed withthe quota changing downward.

At first it was 0GB of 2TB in use, then changed to 500MB of 3GB in use, now it is 2GB of 2GB is in use and I am getting the cannot continue to sync, cannot upload messages.

When I go to my owncloud webpage i get this:

An exception occurred while executing 'DELETE FROM oc_preferences WHERE userid = ? AND appid = ? AND configkey = ?' with params ["ben", "login_token", "4009f6f791524244e744ea52e51e20f4"]: SQLSTATE[HY000]: General error: 13 database or disk is full

tdoetsch2 months ago

currently been running this since march! love using it and is very stable!

wwinter23 months ago

Why did you choose to use ownCloud instead of Cloudmin?

Johnandgill7 months ago

I'm loving this. Great Job.

I've been following this and have managed to get most of it working. some bits are a nightmare, like port forwarding on my router (why is the documentation so bad from hardware companies?)

I did get stuck after a reboot MySQL has stopped working and won't restart. any ideas? Also No-Ip doesn't seem to be updating my ip address at all.

thank you for putting so much effort into this.

PS I have found a great little case, which came with my dielsel aftershave from christmass. i'll do a wee instructable when I have it finished.

I had the same problem - my MySQL would not restart either. I traced it to the previous instruction to change the hostname. You also have to edit the /etc/hosts file to update the entry for your machine there. .... And reboot.

Noip was also a bit of a fiddle - the path for the 'duc download' was close but wrong.... Luckily, I didn't need it as my router has a 'dynamic DNS' function that did all that for me. Otherwise, try www.noip.com...... And remember to unzip the download before you attempt to cd into it.

akinich6 months ago
brilliant instructable a few questions does this os have a gui screen? can this run normal programs built for raspbian? last what is the difference between this os and the normal rasbian apart from the turnkey software?

to get The GUI screen - you need to install a rdp service. I used xrdp (sudo apt-get install xrdp). This provides a service that you can connect to using 'remote desktop' from a PC or similar rdp clients ion iPad, etc. you will need to forward port 3389 to access from outside. I had someone access my RPi in the UK from the US and write / run a scratch program. It does not support audio - but otherwise....

Killerspec6 months ago

Anyone able to help me out I have installed owncloud and run through the set-up but I keep getting a message which i will post as a picture and I aint a clue how to fix it. Please help !!!!!

owncloud.png

i've got the same problem, and another (see image)

oc-prob.PNG

this problem is mentioned and resolved in other places in this thread

0770 is the required permissions on the directory you are mounting - and is probably because you are mounting a ntfs formatted USB disk drive. You need to edit /etc/fstab to fix.

1-40 of 220Next »