How to Host Your Website From Home

Host your site for $30 per year or less
Series: 
Web Design and Development

Soooo ... I'm a cheapskate. And, over the past number of years, I've learned a few tricks that have helped me be able to maintain a webserver from my house. Over a DSL connection, in a manner that still allows my son to play all of his video games and for both of us to manage our Youtube and Cruncy Roll addictions.  The purpose of this brief tutorial is to allow you to host a small website at home (maybe a few hundred clicks per month), not one that will get thousands or millions of monthly hits. You will need to know some basic Linux / DNS / routing stuff for this tutorial; all I'm going to do is hand you an outline based on what I've done, it will be your job to assemble everything!

  1. Locate a computer you're not using for much of anything, any more. We've all got one of these: it's sitting in the basement corner or under a bed (or in my case, the "Dead Tech" closet). This computer will be your website's dedicated server. I suggest that you modernize it as much as possible (add a few extra gigs of RAM, a new processor and/or a new hard drive, if you have them available) and install Ubuntu Linux using the default LAMP Stack profile on the server distro. Follow the instructions! Once you're finished the install and have your computer on your internal network, set a static IP. If the computer of choice was already decent, you just spend $0 on this step.
  2. Enable mod_pagespeed. Take some time to review the PageSpeed filters, and tweak it out. Trust me: it's worth the effort! My fully tweaked .htaccess file reduces outbound bandwidth by 60%.
  3. Configure your in-house router to forward traffic bound for port 80 to the static IP configured in the last step. Alternatively, although less safe, put your server in your router's "DMZ". Configure your server's firewall appropriately.
  4. Register a domain name. Use an inexpensive domain name company (like Godaddy.com) that allows you to make changes to your DNS settings as frequently as you like. Although you will only be doing this once, some companies actually charge for numerous DNS settings changes. Total cost this step: about $5 for a .com, .info, .co, .us or similar domain.
  5. Set up an account with Dyn.com and follow their instructions for setting up your DNS. Total cost for this step: about $25 for their cheapest package. Use Dyn.com to control your DNS if you have special needs; I do, therefore, I suggest them.
  6. Set up an account with Cloudflare.com and follow their instructions, substituting their DNS entries for the first two entries from Dyn.com. Total cost for this step: $0 for the "Free Package". Cloudflare will act as a CDN, putting less stress, overall, on your network connection.
  7. Now that you have a Dyn.com and Cloudflare account, use this script to sync your local IP with their services. Total cost for this step: $0.
  8. You probably know the rest: setting up Apache, getting the latest versions of PHP, but I just wanted to outline how I have a site that, I personally believe loads as well as most comparable sites.

You're welcome.