Home » Articles » Build a Cheap Linux Server
Click Here To Hide Tor

Build a Cheap Linux Server

Part I: Building & Preparing

My professional expertise is generally limited to all things Network, however I dabbled in other areas in school and continue to dabble in my free time at home. I have always taken an interest in different Operating Systems and how they compare to each other; so once I got over Darwin and its proprietary everything I feel in love with Linux: clean, fast, customizable and open source. I have always tried to challenge my Linux CLI skills but it’s only recently that I took the plunge into Linux Servers. Whether you’re building a server for fun, for simple file services or working up to building your own Onion site everyone has to start somewhere. Remember that companies like Apple, Amazon and even Google started with limited hardware in a garage.

Microsoft Server was one subject I focused on in school; however my career has little to nothing to do with MS Server. I have run a few MS Server 2008 VMs and even an old PC, but always found that my cheap hardware was too limited for Microsoft. Annoyingly, there are certain Server roles, which cannot be placed on the same server – this bad news if you’re looking to set up a cheap home server with some basic services on one box. A few months ago I tried to build another 2008 Server on an old PC and quickly got fed up. Looking around the Craigslist sites I found a few reasonably priced user PowerEdge (and similar server brands) in the $250-500 range, but at the time I really didn’t have the money to spend on a hobby machine. I decided to try something and found an AMD single core PC with 1 Gig of RAM and a 40 GB hard drive – this is my story of how I turned that old $10 beast and a $5 domain name into a functioning Linux server.

The first thing that I need to get out of the way is the GUI. I have since built another Linux server with absolutely no GUI, but when I started this budget endeavor I felt squeamish not having a GUI. As you can see, Ubuntu provides you with an easy-to-use menu even when installing no GUI (many server distros will not offer this).

cheapserv1

This would end up being quite ironic since I set up most of my services through a putty SSH connection to the box. Since I was dealing with a low spec machine I reviewed my options and decided to go with Xubuntu. Why didn’t I go with Lubuntu? Well, I honestly find it quite ugly and I know that Xfce is solid so the decision was easy. Why Ubuntu in general? As many of you may know, Ubuntu is probably the best supported “user friendly” Linux around (and I like Debian). With these lightweight versions of Ubuntu you don’t have to deal with the new touch screen friendly UI and you get a straightforward desktop. I didn’t want to hit time consuming roadblocks just to get the installation complete, so I decided to pick a distro that I could stand up easily. installing Ubuntu Server is as easy as installing Ubuntu desktop, so if you’re just beginning it is a great choice

cheapserv2

Ubuntu server installs now provide an option to install a LAMP server template (Linux Apache MySQL PHP), but since I was really looking for a lightweight HTTP & FTP machine, I didn’t bother with this – I certainly won’t be using an large databases, but if this is what you’re looking for I would recommend installing the LAMP installation and save yourself some time. As mentioned, my first goal was to get HTTP and FTP installed and running. For HTTP you are going to want to install Apache2 and for FTP you can go with the simple vsftpd (unless you need something fancier). Remember that a server doesn’t have to be a Proliant, Power Edge or ESX host. A server can be any computer that hosts various services.

Although I decided to start with a nasty old single core PC with a GB RAM (and have proven it can work), you may want to look for something beefier. My build was to see how cheaply I could make a functional server, but I can guarantee that anything more than 5 users on it will bring it to its knees. My recommendation is to buy the best hardware that you can at the time. Going with a Linux OS will save you a nice bit of cash not having to purchase an operating system – so spend the extra on your hardware. If you anticipate needing lots of disk space and/running large complex databases in the background then buy accordingly. Once you stand the server up you will have to deal with another major requirement: domain name and DNS.

I want to be clear that I am not exploring the intricacies of Onion (TOR) domains at this point. First, I would be way too far out of my element and second you should understand how domains work on the clearnet before wading in to running a server on the Darknet. Let’s also assume that you have a basic command of Linux. This article will not explain the basics of Linux CLI, so please be comfortable with the Linux CLI if attempting to build a Linux server. Since my preferred .com domain was going to cost me $75 annually I thought to myself “why the hell do I need a .com?” With the recent release of many new domain extensions the choices have greatly increased and will have the potential to be endless. I ended up grabbing a .space and a .us for about $6 a piece at Namecheap.com. I parked one of them and started preparing to bring the other online. I would like to warn that certain long-established systems are not yet prepared to deal with the new extensions. For instance, ‘nslookup’ has no problem resolving a .cafe address, however ‘whois’ doesn’t understand it. I’m sure the issue goes beyond there, but for the most part you shouldn’t have much trouble hosting a server on the internet.

Unless you have the capital to dish out an additional $100-300 a month to your ISP you will be like the rest of us and will have a changing public IP. Luckily, there’s a well established way to deal with what is known as “Dynamic DNS”. To keep the internet’s various DNS records up-to-date with your changing IP address you will need to run an application somewhere on your network, which will report your public IP back to DynDNS, Namecheap (or whoever you choose for your services). Namecheap offers an application called “Dynamic DNS Client” which can be set up to poll at specific intervals. If you have an always-on Windows machine and wish to keep this off of your server then this is your answer:

cheapserv3

I can say from experience that this client works VERY well and is quite simple to set up. It makes the most sense to have this type of application on your server, since your server will likely be up and online as much as possible. In this scenario you can easily install and configure a Linux service called ddclient. To determine if this service is installed, and what the status might be you can use the following command service ddclient status. If not installed, you can easily install and configure the application using apt-get install ddclient

cheapserv4

You will be prompted to configure the client during installation via a menu-driven installer:

cheapserv5

Once the installation is complete you will be presented with options that include start, stop, restart and force-reload:

cheapserv6

If you prefer to configure the service using the configuration file, or just need to modify settings as time goes on you will find the configuration file at /etc/ddclient.conf and it should contain something similar to this:

cheapserv7

The best way to confirm that this application is working is to release and renew your public IP and then look up the DNS entry for your domain using arin.net, whois, nslookup, etc. You should also be able to locate a log file (if enabled) in /var/log.

Now that you have a domain and an application to handle your IP changes, you can officially say that you are prepared to place a server on the internet. There will be an additional step involved before you can think about browsing to your server’s web pages or getting files with FTP: you will need to configure port-forwarding/NAT on your router. This can be very easy, very hard or not available at all depending on what you’re using as a router. We will tackle this first thing in Part II of “Build a Cheap Linux Server”. Feel free to figure it out on your own while you anxiously await the next installment :)

11 comments

  1. Probably the worst noob question there. But why do we need a VM can we not just use i.e host > tails > vpn > socks I am quite new.

  2. It is beautiful to see young guys like you starting up on the Web culture like that.

    These are some ideas you can develop for your next articles:
    – Wifi borrowing;
    Learn to hack your neighbors’ wifi to not have your Tor pointing to your home address. Use Kali Live USB + cheap TP-Link dongle + small directional antenna + wifite for acquiring freedumbz.
    – Low power systems;
    Although the system you bought does the job for you, spending 300W continuously from your home can be suspect to law enforcement. You can use a cheap brand new Single Board Computer that spends 5 to 20 watts continuously (that’s your TV in standby) and is more powerful (in processing power) than your current system (a SBC is like a raspberry pi 2). The initial cost of a SBC is offset in 3 to 6 months by the electricity savings. There are some extra batteries for cellphones that work nicely with the Pi to make a continous power supply to keep your system working in case cops wish to test your “guilt” by turning off your home electricity and see if your darknet service goes offline too. Being discreet in your electricity usage is double plus good.
    – Free as in freedom;
    There is a distro called Trisquel which is basically the same as Ubuntu but which doesn’t carry blobs. Blobs are closed source portions that are known to hold backdoors to open source systems. Ubuntu is full of blobs. Debian without the nonfree repository is also free as in freedom if you need a more complete system, it is the parent distro to Ubuntu.
    – Encryption;
    All modern Linux distros can provide disk encryption on installation. Performance hit can reach up to 30% in a system like yours, but it is worth the slowdown if your system is snatched by a competitor or LE. Also, beware of DDR2 Ram, if you got DDR2, you should glue the sticks to your mobo with superglue because of cold boot attacks. Also, don’t get a mobo with firewire.
    – Bitcoin anonymization;
    Namecheap accepts bitcoins as payment, you can learn how to acquire them anonymously and how to tumble them so namecheap cannot trace you back because of the payments you did to them. This is good to use in combination with the borrowed wifi thing.
    – SSH and Openvpn;
    These things are essential for security and they require customization for proper usage and to avoid weak cipher keys. You could make a nice tutorial about SSH and the dangers of using it with a mere password and DSA crypto.

    These skillz can be learned easily and on the cheap. You can improve upon them, like sticking your little Pi server in a neighbor’s home while they are on vacation to be even more stealth. lol

    If you want more ideas or directions on how to find certain info for your next articles, just drop a comment here. I hang around deepdotweb frequently.

    • I like the info you give. Though I’ve been computer literate since before the Internet, I find it difficult to stay knowledgeable about privacy, security, etc. What you called skillz. Things like how to use Bitcoins anonymously. Even OpenVPN, which I use can be confusing, especially with the myriad software and differing settings. I feel like I need Darknet for Dummies. It’s hard to keep a balance between simple e-mail and texts, slightly more secure things like online banking, and more obscure things like the modern Usenet. Some of the sites used accept things like Bitcoins, or VPN-servers. Other’s don’t. If you care to post more, I would certainly care to read it. Thanks!

    • teach all of that please

  3. Why did you feel the need to rid your self of a GUI ? The terminal is right there. Was it just an intellectually snobish thing ?

    • GUIs – at least in the Windows world – is where most of their OS bug fixes lie. I suspect it’s the same for other OS’s as well for Technical Reasons™.

  4. Laughing at you

  5. Just buy rasberry pi with wifi card, install linux distro, put somewhere in city with free net, all about 5$

  6. I can vouch for using the pi as a web server. I have one right now hosting a static html server. The performance is great.

    Now if I was running Magento forget it but a static site works great.

  7. I can vouch for using a raspberry pi 2 as a web server. I have one running a static web server serving up static html pages as we speak. It runs fast and is responsive.

    It couldn’t run Magento but for a simple site it works great.

  8. greetings masters. if i would like to set up a ubuntu os and running software ruby on rails and a sql server for my uncle office. i would really appreciate if you could give me specs, reliable and if possible cheap energy consumption. thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Captcha: *