Not sure if this is best practice, but a part-time hobby is blossoming into a business generating a useful, supplementary, recurrent and passive hosting income and all thanks to Caddy (plus some clever sleight of hand). Using Caddy, I originally started out serving my own self-hosted WordPress blog blog.udance.com.au located on a FreeNAS server from home. Note: My ISP provides me with a residential broadband service and a dynamic IP address.
I’m not sure how it’s happened, word of mouth mostly, and it’s happened surprisingly quickly, I find myself hosting and developing mobile responsive WordPress sites for several customers and there’s no sign of that side business abating. I’m in cahoots with my brother who does the web design, while I focus on the web development side of the business. You can see an example of his animation work at readymcgetty.com.au (the animation appears after a few seconds. Compare the cartoon representation with the actual person here https://www.readymcgetty.com.au/about/. Note the striking likeness).
It’s not big business. There are some risks e.g. several single points of failure, but the current customer base (all small businesses) is able to tolerate this. The customer trade-off is a slightly elevated risk in exchange for considerably lower hosting costs and a personalised, local consulting service. As business needs change, I’ll begin to address some of these single points of failure.
I don’t serve customer sites using subdirectories (paths) or subdomains. They have their own custom domain names. Customers might use their own domain name providers e.g. godaddy.com, crazydomains.com.au, etc. In order to control the domain names, I use Cloudflare as the DNS hosting provider. Cloudflare is well supported by Caddy. The clever sleight of hand is having the custom domain names point to the public, dynamic IP address assigned to my broadband router.
Caddy serves two functions. First, it provides the reverse proxy service linking a custom domain name with the hosted WordPress service. Second, it acts as a web server serving PHP scripts for each WordPress site . I’ve separated these two functions out like in this example Case study: Variations in Caddyfile design for different Nextcloud builds. The reason for this is that Caddy is built from source with the Cloudflare module for the reverse proxy function, whereas, for each hosted website, the static Caddy binary will suffice.
Best practice measures I currently have in place:
- A focus on customer data - I use FreeNAS (a FreeBSD derivative) to host customer sites. The strength of FreeNAS is storage including disk redundancy, and onsite and offsite data replication.
- Rapid recovery for several scenarios e.g. server and router hardware redundancy.
- Integration of statuspage in Cloudflare and on hosted websites to inform clients/visitors of scheduled maintenance or system downtime.
- I’ve found the separation of duties between web designer and web developer a key factor in making the websites we’ve set up stand out. Web developers generally don’t make good web designers (I’m a classic example). Having my brother who is an amazing animator onboard has turned a typical, clinical looking website into something with a more human connection. This has given our websites an edge. If you can collaborate with a web designer, I strongly endorse the approach.