General idea for managing a self hosted server with Infrastructure as Code and/or a UI

I had an idea I wanted to share after using the tool/service SST to deploy our AWS servers and configure Cloudflare DNS all in a single config file then watching a recent video on LTT about HexOS.

This got me thinking whether self hosting could be managed and deployed by a configuration file. The basic idea behind it would be:

A file (or even UI) in some format, would create:

  • Virtual machines
  • Containers
  • Mounts
    • to drives and other servers via SMB/NFS etc.
  • Shares
    • via SMB/NFS etc.
  • Automatic network tunnelling
    • via cloudflared or similar using, extending how products like SST can create DNS records, adding access policy rules and tunnels)

The main idea here is so many people have issues with their own hardware, and if a OSS solution could do this via a thin OS layer.

Its very much a finger in the air idea, I’m not exactly sure how the OS side of things could even be implemented.

I’m probably more expeienced on the integration side, so looking at the cloudflare api to setup tunnelling and dns records would be something I would think possilble, if CF expose the endpoints.

I’ve not looked into this too much but if anyone has experience of any existing open source tools that can accomplish (or are capable of) this to extend from, would be great.

Some of these ideas might be applicable for HAOS, mounting drives and creating shares are probably the only real things making my NAS HA instances VMs and not bare metal.

I guess GPU acceleration is also something I’m not considering but I dont do this anyway due to complexity GPU passthrough is for using them with Plex etc.

At some point, you’re going to end up reinventing Ansible. You would be better off deploying a well known base server OS (Fedora, Ubuntu, Nix, etc…) and then applying a set of Ansible configurations against it to get to where you want it to be. It’s less user friendly for sure but an extremely mature product, idempotent, and distro agnostic (mostly). Very heavily used in enterprise already. See if it meets your needs!

1 Like

I’ve seen ansible a lot but never really had the time to make a config of my own. If it can manage all of the above and the bain of my life, networking, I’m in