Previous post about how the page works
For a while now my paid VPS has not been utilized enough for it to make sense to pay for it. Partly because it’s way underpowered to be used for anything interesting and partly because it’s too costly to upgrade it to a usable state. I’m currently paying 12EUR every month for 2GB of RAM, 2 cores of an old i7-920, 20GB of SSD space and 150GB of HDD space. Besides that, the network connection wasn’t up to the standard I experienced at first. Essentially it hosted this page with its assets (photos and videos) and I used it as a glorified VPN. There are a couple of other services, none of which are essential or important enough to warrant a paid host.
The blog
Naturally, I started to look for replacements. For the blog it was easy. I’m already on Cloudflare so using their Cloudflare Pages thing was a no-brainer. It needs the code for the site to be on GitHub or Gitlab (which I have) and a simple build command (which I have from Hexo). It probably could work with completely static websites too, but it’s nice having the build process on the server side. After the first build is finished they give you an URL where your site is hosted, but obviously, you can add custom domain(s), which integrate well with their caching DNS settings.
The assets
I have about 32GB of photos and videos on this page currently. That’s certainly out of Cloudflare Pages’ hosting capabilities, so I needed something bigger. Hetzners Storage Box seemed like a good way, they offer 1TB of storage for 3.81EUR, but their registration requirements are way too harsh for me. You have to either verify yourself with your passport or a 20EUR (!) PayPal “verification” transaction. Eventually, I found Storj, who are some kind of decentralized, S3-compatible, community-hosted storage company. It sounds a bit dubious but it works great so far. Besides their offer is nothing to sneeze at either: 150GB storage and 150GB of monthly traffic for free. I have all my content saved on local drives too, so if everything goes wrong, I can migrate pretty easily.
I set up rclone on my machine which I use to keep the Storj bucket in sync with the content saved on my drive. This means that the optimizations (resizing, thumbnail generation, etc.) are run on my machine, which makes it a bit faster anyway, so I’m not too bothered about that. After everything was uploaded properly on their service, I used their guide to DNS share the bucket, which I then entered in the Cloudflare DNS settings for the content domain.
The rest
I mentioned at the beginning that I have some other services on the VPS, which while aren’t essential are still a convenience and I would like to keep them if possible. I thought about just downsizing the VPS to make it less costly, but then I remembered Oracles Free Tier. This service is amazing. I maxed out a VM with 4 Ampére ARM cores, 24GB of RAM and 200GB of block storage. Seriously, if you’ve never heard of them before, check out their offer, because this is only part of it. Essentially it replaced my paid VPS 12 times over. Sure, because it’s free they can take it back anytime they want, but I couldn’t find a precedence for that yet. Also, I’d consider paying for this if it comes to that.
Conclusion
We’ll see how this goes in the long term, but for now, the site feels snappier, photos load faster, videos buffer less, I’m very pleased. For a cost reduction of 100% I couldn’t be happier.