Introduction: Raspberry PI, THE SERVER (TURNKEY LINUX)

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:

Dedicated Amazon EC2 turnkey servers

Belkin routers that offer built in apps

Online cloud services such as Google Cloud

NAS servers such as this.

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

what you need:
1-Raspberry Pi

2-SD card

3-Raspbian image file (Download from http://www.raspberrypi.org/downloads/ ONLY)

1-use this page to make your sd card bootable

2-insert your sd card and turn on your PI

3-wait until you see the "raspi-config" menu

4-expand your sd card

5-set your locale ,Timezone ....

6-(IMPORTANT) in the "ADVANCE" menu, set your gpu ram to 16mb

7-(IMPORTANT) in the "ADVANCE" menu, Enable ssh

8-finish. your pi will now restart.

now you have a HEADLESS PI. it means you don't need your keyboard or monitor anymore

just connect your pi to a router

we will use SSH to continue our work

1-find your PI ip address.

2-in Linux or Mac open the termianl and run this command:
$ ssh pi@"YOUR_PI_IP"

3-enter the default password "raspberry"
4-set your ROOT password:
$ sudo passwd root

5-logout of pi:
$ logout
6-login to root:

$ ssh root@"YOUR_PI_IP"

your Raspbian is ready now. we will use TKL_PATCH to turn the Raspbain into TurnkeyLinux.
Thanks to ghoulmann & Mort'z


(just copy and paste to your terminal)

1- ssh to root

$ ssh root@"YOUR_PI_IP"

2-clone git repo to your PI:
$ git clone https://github.com/mortezaPRK/Raspliance-Core /tmp/tkl

3-go to /tmp and compile tkl patch:
$ cd /tmp/tkl/

$ ./compile_tklpatch.sh

4-install TurnKey into system path:
$ tklpatch-apply / ./core/

wait until everything finish. you should restart your pi:
$ shutdown -r now


$ reboot

now connect your keyboard and monitor to PI again

in first boot, you should enter root password

remember to choose the most powerful password you can.

you can use this instructables for more information about TURNKEY....

Most common problems and their Solutions :
you may encounter some problems during or after installation.

1-you get session closed when using shell in box?
Solution: use ssh then "enter the "nano /etc/hosts" menu and change from "core" to "mynewname""

Solution 1: quit the confconsole. login to root. edit file "interfaces" on /etc/networkk

add following line to top of the file:


(or run this command: $ sed -i '1i# UNCONFIGURED INTERFACES' /etc/network/interfaces)

Solution 2: (ONLY if fix one doesn't work for you)
quit confconsole .login to root:

$ /etc/init.d/confconsole stop
$ update-rc.d -f confconsole remove



  • Epilog Challenge 9

    Epilog Challenge 9
  • First Time Author Contest 2018

    First Time Author Contest 2018
  • Sew Warm Contest 2018

    Sew Warm Contest 2018

We have a be nice policy.
Please be positive and constructive.




The compilation went without a hitch. Then the problems started.

"tklpatch-apply / ./core/" gets a lot of things done, but then exits with:

+ sed -i '1i# UNCONFIGURED INTERFACES' /etc/network/interfaces
sed: can't read /etc/network/interfaces: No such file or directory

manually edited the file to put the intended text ("# UNCONFIGURED
INTERFACES"), and tried to run the scripts manually. But after running
the scripts, when I restart, I'm locked out of my rpi2 with "ssh
connection refused". I don't have a monitor to connect to my rpi2, so
I'm doing this purely over ssh.

If anyone has succeeded to any extent, then please leave a comment detailing your method.

I suspect this and the instructable that was built from this (and which a comment sent me here to try to load the dang stuff) just don't work anymore. Why? Don't know as I haven't tried to tear into the tklpatch-apply yet. I do know that I can load Raspian to all 3 of the Pi's I'm using for testing this (a model B, a model B+ and a Pi 2 model B). I can do the git clone and the compilation. But the tklpatch-apply? Nope - I get aborts just as you do at the same point and same message. Considering how old this and the other instructable are, I'm not betting on ever getting this to work. If you, or someone else current, gets this installed please post the instructions back here.

I have installed per the directions above on a pi 3 model b. Now I can only ssh into the pi. When I boot up the pi I only get a blank screen on the pi itself, but I can ssh in from another laptop. Any thoughts would be greatly appreciated.

Hello guys,

I'm using putty to ssh into my pi, it works if i use the pi user but i keep getting the error that acces is denies or permission denied if i try to login to root user even though i use the same password i set it to for root user.

Can anybody help me?

You have to use raspbian wheezy not jessie to get this to work.

I did it, but the question is , how do I turn it back? well I tried this on a raspberry , and now I need to do this to an other raspberry , and turn this one back.Thanks, was a wonderful tutorial...

How do I get to the turnkey logon screen when I cannot access Pi with the internet address

With AndyT5. Followed instructions, everything went well, cannot access turnkey login through x.x.x.x:12321 I'm getting a connection refused error.

Me too. Ever get it figured out? I see no input from the author, I hope you can offer something.