Introduction to ElfHosted
I've consulted on the building and operation of an "appbox" platform over the past 2 year, and my client/partner has made the difficult decision to shut the platform down, partly due to increased datacenter power costs, and capital constraints.
So I've got two year's worth of hard-earned lessons and ideas re how to build a GitOps-powered app hosting platform, and a generous and loyal userbase - I don't want to lose either, and I've enjoyed the process of building out the platform, so I thought I'd document the process by setting up another platform, on a smaller scale (*but able to accommodate growth).
What is ElfHosted?
ElfHosted is "self-hosting as a service" (SHAAS? ) - Using our Kubernetes / GitOps designs, we've build infrastructure and automation to run popular self-hosted apps (think "Plex, Radarr, Mattermost..") and attach your own cloud storage ("bring-your-own-storage").
You get $10 free credit when you sign up, so you can play around without commitment!
We're building "in public", so follow the progress in the open-source repos, the blog or in Discord.
TL;DR? Here's a guide to getting started, and another to migrating from another provider.
The Big Picture
Infrastructure
We'll use Kubernetes. Obviously.
But where to get the infrastructure? The appbox hardware was all owned, which was big capital outlay, and while it was fun to drive a big, grunty compute and ceph cluster with redundant 40Gbps network (for the Ceph nodes), 10Gbps local and internet connectivity, the power / physical management of the infrascture turned out to be our undoing.
My first thought was to pursue managed Kubernetes clusters, but I was quickly priced out. Next I considered bare-metal managed Kubernetes providers (servers.com, for example), but couldn't find something appropriately customizable, resilent, and affordable.
I was directed towards Hetzner's Server Auction, and I found my groove... Hetzner sell older servers at a discount, and based on RAM/CPU, they're simply the most affordable option. The downside is that Hetzner's dedicated server products are very much a "hands-off" arrangement - no magic cloud infrastructure, no elastic block storage, and no managed Kubernetes.
Since managing bare-metal Kubernetes platforms is literally my day job, I decided to commit, and ordered a small 64GB 4-core machine as a controller, and a slightly gruntier 12-core, 128GB machine as an initial worker.
1 x Dedicated Root Server "Server Auction"
* Intel Core i7-7700
* 2x SSD M.2 NVMe 512 GB
* 4x RAM 16384 MB DDR4
* NIC 1 Gbit Intel I219-LM
* Location: Germany, FSN1
1 x Dedicated Root Server "Server Auction"
* Intel Core i9-9900K
* 2x SSD M.2 NVMe 1 TB
* 4x RAM 32768 MB DDR4
* NIC 1 Gbit Intel I219-LM
* Location: Germany, FSN1
Billing System
Our original appbox platform invested in a custom user dashboard, which handled:
- Account setup and payment
- App install/uninstall/restart
This ended up being a big investment, and an ongoing source of frustration1. Since we want to iterate ElfHosted quickly, we need an "off-the-shelf" billing system which will "just work". I looked into Shopify, Woocommerce, and several other open-source billing systems.
My philosophy here is that I want as little as possible to do with billing - it's soul-sucking, anti-fun to debug why customer X was charged $Y instead of $Z !
I settled on the pragmatic approach of using Woocommerce on Wordpress. It's extensible enough for the customization I'll need for service provision, but it's polished / supported enough to handle all the weird edge cases a billing system needs. I paid for the Subscriptions and Bundles addons, after doing some rudimentary testing to confirm that I could get a webhook sent on a user creation / subscription event.
Single Sign On (SSO)
One of the killer features of the appbox service was our ability to secure otherwise-insecure applications (Gatus, for example) behind a layer of authentication, in this case driven by Traefik Forward Auth and Auth0. I needed to replace the Auth0 integration with something, and in the spirit of quick iteration, I discovered two Wordpress plugins which will allow Wordpress to act as a OIDC authentication server (sign in with Wordpress):
- This one, which is highly polished but the free version is intended to upsell you to an expensive paid version
- This other one, which is very bare-bones, and requires editing Wordpress's config to get it going.
Again, in the interests of expediency, I'm starting with the polished-but-naggy extension!
Summary
What is ElfHosted?
ElfHosted is "self-hosting as a service" (SHAAS? ) - Using our Kubernetes / GitOps designs, we've build infrastructure and automation to run popular self-hosted apps (think "Plex, Radarr, Mattermost..") and attach your own cloud storage ("bring-your-own-storage").
You get $10 free credit when you sign up, so you can play around without commitment!
We're building "in public", so follow the progress in the open-source repos, the blog or in Discord.
TL;DR? Here's a guide to getting started, and another to migrating from another provider.
There are lots more ideas to explore, and problems to solve, but solving billing, infrastructure, and SSO means that the idea "has legs", so let's keep building and testing!
Chef's notes 📓
-
Adding products was laborious, and it'd do weird things like cancel subscriptions when an auto-renewal was cancelled, intsead of at the end of the subscription period! ↩
Tip your waiter (sponsor) 👏
Did you receive excellent service? Want to compliment the chef? (..and support development of current and future recipes!) Sponsor me on Github / Ko-Fi / Patreon, or see the contribute page for more (free or paid) ways to say thank you! 👏
Employ your chef (engage) 🤝
Is this too much of a geeky PITA? Do you just want results, stat? I do this for a living - I'm a full-time Kubernetes contractor, providing consulting and engineering expertise to businesses needing short-term, short-notice support in the cloud-native space, including AWS/Azure/GKE, Kubernetes, CI/CD and automation.
Learn more about working with me here.
Flirt with waiter (subscribe) 💌
Want to be alerted to new posts / recipes? Subscribe to the RSS feed, or leave your email address below, and we'll keep you updated.