In my first Zero Cost breakdown, I'm going to go over the fine details of setting up a Zero Cost Website using donation worthy hardware and Free and Open Source Software.
When you pay for a hosting service, you are paying a portion of a lot of other background costs. Many of them some people aren't even aware of. We'll break down some of those costs, and compare them to my Zero Cost method. Afterwards, we'll actually go over the steps to take a computer and turn it into a full-fledged webserver.
There are many ways to break down possible costs. In the end, it really depends on how you want to compare things. I will make 2 basic comparisons agains a hosting service (likely the cheapest), and self-hosting (better like-for-like).
This is where you pay a company like GoDaddy a monthly/yearly fee and they host your website from their webservers. The costs, limitations, and varyations are all over the boardd for this. For the sake of this article, here are a few local hosting services I found and their costs and quick limitations:
GoDaddy - "As low as 2.99 per month. First year only. Annual purchase required.", GoDaddy website builder
Aborg Hosting - "$195/year or $16/month", limited to 1 GB storage space
nvira - "$50 per month or $500 per year (2 free months) if paid in advance.", 250Mb of storage space
Web Hosting Ottawa - $15/month, 1 GB storage space
Storm Internet - $20/month, 25 MB storage space
Note: These prices were obtained on April 8th, 2015.
Note: These are the lowest price points, which also have the greatest limitations on bandwidth, storage space, and others.
We can see that while hosting services aren't too terribly expensive, they can still break a budget for small organizations. The biggest limitation here will be storage space. Storm Internet's hosting service hardly gives you enough space for a basic HTML page, let alone an entire website.
This is the solution that most large corporations opt for. It gives you the greatest amount of freedom to do whatever you want. The biggest freedom here is storage space. If you have a 250 GB hard drive, you have 250 GB storage space (minus OS and overhead of course). Unlike a hosting service, where you essentially "rent" server space, here, you own the server. This is obviously a more complex setup than a hosting service, and thus has a more complex price breakdown.
Hardware - Obviously, if you own the server, you bought the server. Here are a few entry-level price comparisons:
Dell - Starting at just under $800
Canada Computers - start at $500,without a hard drive. $760 to start including a hard drive
The prices for severs are harder to find online. Most of the time you are dealing with companies and purchase orders and such, so the prices are typically not as easily available.
Software - So now that you've got the hardware, you need software to do something with it
Windows - The obvious Operating System to compare against. Prices start at $500 for Windows Server 2012
Services - This is the slightly less obvious cost of self hosting. This includes costs like electricity, internet access, and maintenance. Electrical and Maintenance costs can vary very wdely, so we go into that, but internet access, that we can price.
Rogers - $52 per month
Storm Internet - $55 per month
ThinkTel - starting at $50 per month
Start Communications - $50 per month
Labor - This is a cost that will be difficult to put any kind of number to. This is stuff like creating the content of the website, general maintenance and upkeep, updates... This is the day-to-day upkeep. Some of the upkeep like the maintenance of the physical devices are rolled into the hosting service. Other things, like maintaining the website itself and creating the content will have a cost. This cost is always dependant upon the amount and type of work involved. It will also be affected by the skills and abilities by the individual who will do this work. A reasonable fee to hire a contractor to do this work can be in the $60/hour and more (I have seen some at over $500/hour! ).
As we can see, the Hosting service is by far cheaper, but far more limited. The self-hosting is obviously much more expensive, but does away with most of the major limitations of the hosting service. Now, let's take a look at how my Zero Cost Concept addresses these costs.
Hosting service - This concept does away with the hosting service costs by going the self hosting approach
Hardware - As mentioned before, much of what we are looking to do can be done with donated hardware. Cost: free
Software - We are using nothing but FOSS (Free and Open Source Software). The combination we will walk through is known as a "LAMP Stack" (LAMP = Linux, Apache, MySQL, PHP). LAMP Stacks are by far THE most popular webservers out there. Cost: free
Services - Since this is a self-hoted approach, these "costs" easily roll into your existing internet bill. In the situation for my website here, the server itself is located in my house, and the internet acess is through the same internet service as my personal internet usage. Since I am already paying for that internet, and hosting this site incurs very little data usage, this is as well is zero-cost, or free.
Labor - This is the work and effort that someone puts into the project; installing the LAMP Stack, installing the software, creating content, general upkeep and maintenance... Since this is a DIY project, this is all me. While I do believe that my time and efforts are worth money, I am not necessarily "paying" myself, so the cost here as well, is free.
So based of this info, just get things started, you are looking $1200 in for the server and system, $50/month for internet, and an undefinable labor cost. With my Zero-Cost POC, this is all free.
Now, on to setting up the server...
Now, we are going to walk through installing a "LAMP Stack" Linux-based Webserver.
I am going to assume that the hardware has been tested and found to be fully functional. For a bare-bones web server, you will need at least the following:
- Motherboard and CPU
- RAM, at least 256MB
- Hard Drive, at least 10G
You will also need something from which to boot the Linux installer. On older hardware, this will likely be an optical drive (CD/DVD). On newer stuff, you can boot from a USB stick as well. To see what you can boot from, turn on the computer and check out the BIOS settings. There will be something about boot options, boot order, or something boot. This will show you what you can boot from. Whichever options are here, be sure to have something it can boot from. If you are using a USB, be sure to use one that is at least as big as the ISO you will use. Typically, a 4GB USB is adequate for *MOST* Linux installers, but if the installer is a full DVD (4.4GB), you will need an 8GB USB. For the sake of this article, a 4GB card would be adequate.
Before we begin, I will assume that the device we are installing to is powered and connected as necessary; for an old Desktop PC, that would include keyboard and video, for a server, either keyboard and video, or console access. Once the initial install and configuration is complete, we'll be doing the rest of the work remotely from another PC.
- Download Turnkey Linux LAMP Stack:
- Either burn the ISO to a DVD, or make a bootable USB. There are many many tools and methods to make a bootable USB from an ISO, but UNetbootin is a very good cross-platform GUI option for Linux, Windows, or MAC.
- Put the media (CD/USB) into what will be your new server, and boot from it. You may need to alter the boot settings to make it boot form the media first.
- Follow the on-screen instructions. In short, you will format the HDD and install Turnkey Linux LAMP Stack, configure a hostname, configure an interface and default route, and that's all.
- DONE! You now have a fully funtional webserver!
Great! So now all you need to do is open a web browser on another machine connected to the same network, browse to http://<IP ADDRESS>, and voila, you have a test page. At this point, you have a fully functional webserver, but no actual webSITE set up. From here, you can use any number of options to create a website... You can start manually coding your pages in HTML or PHP, or use any number of pre-built web frameworks to create a "shell" site. Using this option, you would get a full website, all coded, without any content. Here are a few options:
This is by no means a complete or exhaustive list... These are just a few of the website frameworks I have personally used. Each one of these products will have it's own "install" process, but they are typically very similar, and very easy. In short:
- Download the package.
- Upload it to the server.
- Extract it to the /var/www folder.
- From a web browser, go to http://<IP ADDRESS>/install.php (or similar).
- Follow the on-screen instructions.
This is not to be taken as literal replacement instructions for these products, please consult their documentation for full install details. But that is the gist of what you'll be doing.
Next, you will probably want to allow the outside world to access your webserver. Assuming you are doing this in a home setting, this will likely be accomplished through some port forwarding. If you have a wireless modem/router combo from your ISP, this is what you will want to do. There are very many ways to accomplish port forwarding, depending on the exact nature of your router. One of the most complete resources I have come across is PortForward.com. The website is a bit fugly and not supremely straigh-forward for the navigation, but the info on how to set up port forwarding for almost all devices can be found there.
In another article, we'll go over a sample installation of one of the above products with a focus on the other work that needs to be done.