Categories
Day-to-day work Hardware Technology

Transitioning from Cloud Hosting to Self-Hosting

Thanks to advancements in fiber optic Internet technology, symmetric speeds have become commonplace, allowing users to stream video and play games without experiencing lag.

My journey with Cloud Hosting began in 2018 when I found that my web hosting plan with GoDaddy couldn’t meet my needs. I required the ability to host multiple sites and utilize free SSL encryption. At the time, my home VDSL connection offered a mere 10MB/5MB, which was barely sufficient for streaming my online radio station, Blur FM.

Initially, I experimented with the free tier of Amazon EC2. However, due to the unpredictable nature of my billing statements, I opted to launch a Debian instance in Amazon Lightsail. This service offered a fixed price for a VPS, providing me with a single-core vCPU, 1GB of RAM, 40GB of disk space, and 1TB of bandwidth.

The problem

A couple of times I’ve tried to upload an image to my photoblog from the WordPress app and the whole process resulted in the server collapsing. That was primarily because the Lightsail instance was very low on resources: it only had only 1GB of RAM memory and a single core CPU.

Having recently launched a VPN to access my home network while away, it dawned on me: why not leverage this virtual machine to host all my websites currently residing on the underpowered Amazon Lightsail instance?

My server setup is not the fastest by any means, but it definitely has better specs than Amazon’s VPS.

ASUS Prime N100I-D D4 Mainboard Intel N100 used as server
Upgrading the machine that hosts my websites, broadcasts Blur FM, and serves as a Jellyfin server.

Cloudflare DNS

This is where Cloudflare DNS came into play. Cloudflare provides various benefits, including improved website performance, security features, and a reliable DNS infrastructure.

Setting up Cloudflare DNS was straightforward. After signing up for an account, I added my domains to Cloudflare and updated each domain nameservers to those provided by Cloudflare.

Once the DNS changes propagated, my domain was now using Cloudflare’s DNS infrastructure. This meant that all incoming traffic to my websites would be routed through Cloudflare’s network, allowing for optimizations and security features to be applied.

Additionally, Cloudflare’s caching and content delivery network (CDN) helped improve the performance of my websites. By caching static content and serving it from Cloudflare’s edge servers located around the world, my websites experienced faster load times for visitors regardless of their geographic location.

A planisphere pinpointing the location of each of the servers in the Cloudflare network.
The Cloudflare network consists of servers located in 275 cities in 100 countries.

Another significant benefit of using Cloudflare DNS was the built-in security features, such as DDoS protection and Web Application Firewall (WAF). These features helped mitigate potential threats and attacks, ensuring the continued availability and integrity of my websites.

Conclusion

Overall, migrating my websites from Amazon Lightsail to my home server using Cloudflare DNS was a smooth and successful process. Not only did it improve the performance and security of my websites, but it also allowed me to have full control over my hosting environment. With Cloudflare DNS, I can confidently host my websites from home while providing a reliable and fast experience for my visitors.

Leave a Reply

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