Home Web Hosting Best Practices
Welcome dear reader. Today I’m sharing with you my experience on how to be your own web host.
Before you read any further, I’ll ask you some questions to help you to determine if you Should.
- Do you have any knowledge about how internet is working ? I mean technical stuff like protocols, ports or DNS or,
- Do you want to learn how it all works ?
- Do you have a lot of time ?
- Do you take the risk for your site ?
If you answered Yes to all these questions then you probably should do host your own website or blog from home, else you can still continue your reading for information or share this post with a friend who expressed this idea.
Note: I will not cover every parts of how to set up your host. It’s up to you to find the specific informations for your particular hardware, OS, ISP and router combination.
In this post I’ll try to cover what I learned the hard way, what I actually found that works better.
1. Hardware

Rule 1 – Don’t go too cheap on hardware. If you do, you will have to use your backups and that’s time consuming and coupled with heavy downtimes.
Rule 2 – Go silent. Nothing is worse than an old, noisy, dusty PC running continuously in your living room. As a personal choice I use a netbook as my server for hosting this very blog.
At the time of this article, Netbooks with SSD storage device are the most silent PC on the market and if applicable, their look and size will please your wife. On top of that, they are wifi enabled out of the box, wich is kind of really awesome if you want to stock your server in a remote place in your house.
If you don’t mind noise and dust, or if you can’t affoard anybetter go for an old PC, with the right OS and configuration even an old PC can revive and serve at it’s best. For old hardware nothing better than a fresh linux distribution.
Tip: If you go for a netbook or a notebook as webserver, remove the battery pack so it won’t kill its longevity.
Tip: If you go for SSD storage also go for a noatime in your /etc/fstab, this will prevent a write for every read and decrease the read time and increase longevity.
Tip: If you go for old hardware, go linux. Linux scales better, linux runs with low ressources, linux is better at web hosting from home, linux is free, linux is here, here and here, depending on your level.
2. Software

This choice is really up to you and what you want to host; Blog ? Gallery ? Portfolio ? Personal Sandbox ? Everything is now at your reach; Without any limitation except for your will to learn.
Nettuts contains a wide variety of tutorials that I know will grately help you in this task.
Note that, the backend softwares will be often dictated by the frontend software you choose. Be wise in your choices.
3. Monitoring

Every good server is monitored. There’s plenty of tools to monitor your server, here’s a couple that are not hard to setup :
- Tobi Oetiker’s MRTG : Easy install and setup. Enough information to know what going on on about anything from Network traffic to Harddrive temperature.
- Snort : Network Intrusion Detection System (NIDS). This tool will help you to know and prevent supicious activity on your network, remember, you will be directly serving to the internet.
- Web stats : You may want to use Google analytics free service to monitor your visitors, but you maybe also want a log parser like Webalizer of Awstats to keep track of bandwidth and untracked files like MP3, images or videos.
4. Backup Strategies

The most important thing to do when you are your own webhost is to backup your data, wait, not exactly; the MOST important thing is to be able to actually RESTORE your backuped data. It’s may sounds funny but, hey, give it a try :)
Rule 1 – Be organized.
Rule 2 – Setup cronjobs that never forgets to do their dutty.
Rule 3 – Never trust hardware. Assume it will fail.
Here an example backup strategy you can use for your own blog :
Make archives of files once a day, if you have many sites, make a single archive for each of them. The filename must be named after the site’s name + day of the week combination.
Example: blog.shinylittlething.com-wd4.tar.gz
Make an archive for each databases following the sames rules :
Example: db-dump-wd4.bz2
Tip: You can find the day of the week in unix systems using the date command :
$ date +"%u"
Once the backup script is done, make it run once a day when your traffic is very low, possibly at night and upload everything to a remote host or on a separate Harddrive. I do prefer to send all my data to a trusted host once a day but you might find handy to store everything on a USB pen aswell to allow offline data access.
You will end with a 7 days backups rotation of all your sensitive data. You may want to have a longer period rotation if you have large storage you may want to use the day of the month.
5. Bandwidth Issues

ADSL. What important here is the “A”. That means Asymmetric. In other terms, if something eats up all your bandwidth in any direction, the other direction will be affected. That’s why you will have to carefully watch your bandwith.
Rule 1 – Shape your bandwith for certains tasks. Traffic shaping will be useful if you are planning to send your backup archives to a remote host. There’s many tools to achieve this. I personaly use a combination of tools depending on the tasks :
- lftp command line ftp client allows you to limit your upload rate for ftp transfert.
- mod_bandwidth may be used to control bandwidth on certain virtual hosts, like the one hosting all your rss feeds, per directory, or even per host to control spiders.
Rule 2 – Use a CDN. Here’s some free Content Delivery Networks :
- CoralCDN : Entirely free. Easy to setup. Might have slow response times. Use it for videos and content images (not layout images). I setup mine to reduce a light Reddit effect from the last week, my upload bandwitdh is caped at 72kb/s and I was using 50% of it. Here is what happened when I put a simple rewrite rule to redirect all the images requests to the CoralCDN. I put this up at around midnight on saturday the 21th, the upstream traffic drasticaly downed. I even had more visits on monday and was still under the saturday’s upload rates.

- Velocix : Add this to your watch list : They have a limited free solution in closed beta, limit is 32MB per file with a 500GB tranfert hardcap per month. Wich is more than enough for a blog I guess.
- If you use a common javascript library I urge you to use the Google’s Ajax Library API. This tools will deliverthos heavy files to your clients for you. It will make you and your clients happy because every time they will visit a site that use this technique, they will already have thos files cached on their computer. As a downside effects, If you use the same templates on your developement servers it will be a pain to work while offline.
Rule 3 – Downsize what can be downsized.
- HTTP Compression will compress all your compressible content on the fly. That means HTML, scripts, stylesheets and even ajax requests. mod_deflate is a good choice for web servers supporting apache modules.
- Minify your javascripts
6. Have fun learning!
Thanks for reading this article fellow reader. I hope it helped you in some way!










Nice!
Another good idea maybe to use dynamic dns services, for when your isp wont provide a static ip. Changeip.com is decent, there are others.
I have to agree with all of these points, very true and couldn’t agree more.
@M
Yes ! I used to use DynDNS service a while back when static IPs weren’t as cheap as nowadays.
Thx, It’s very helpful informations.
Thank you for these great informations.
thank you! I really liked this post!
Excellent blog post about home web hosting : http://bit.ly/17rDJk
This comment was originally posted on Twitter
Shiny Blog » Home Web Hosting Best Practices http://bit.ly/4jCDYa
This comment was originally posted on Twitter
New Blog post – Home Web Hosting Best Practices #webhosting #cheap http://bit.ly/pqj5B
This comment was originally posted on Twitter
RT @ncrovatti: New Blog post – Home Web Hosting Best Practices #webhosting #cheap http://bit.ly/pqj5B
This comment was originally posted on Twitter