Selfhosted
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
view the rest of the comments
I spent some time last week learning both Ansible and Podman Quadlets. They are a powerful duo, especially for self hosting.
Ansible is a desired state system for Linux. Letting you define a list of servers and what their configuration should be, like "have podman installed" and "have this file at this location with this content".
Podman quadlets is a system for defining podman containers as a service. You define the container, volumes, and networks all in essentially Systemd unit files.
Mixing the two together, I can have my entire podman setup in a format that can be pushed to any server in seconds.
And of course everything is text files that git well.
I did the same last week (and am still in the process of setting up more services for my new server). I have a few VMs (running Fedora CoreOS, with podman preinstalled), and I use ansible to push my quadlets, podman secrets, and static configuration files. Persistent data volumes get mounted using virtiofs from the host system, and the VMs are not supposed to contain any state themselves. The VMs are also provisioned using using ansible.
Do you use ansible to automatically restart changed containers after pushing your changes? So far, I just trigger a
systemctl daemon-reload
, but trigger restarts manually (which I guess is fine for development).I haven't gotten too far, but right now I've got persistent volumes being pushed by NFS from my NAS. I'm using rocky Linux VMs as my target, but for this use case, Fedora CoreOS should be the same.
I haven't yet tried using Ansible to create the VMs, but that would be cool. I know teraform is designed for that sort of thing, but if Ansible can do it, all the better. I'd love to get to a point where my entire stack as Ansible.
I don't yet have Ansible restarting the service, but that should be a simple as adding a few new tasks after the daemon-reload task. What I don't know how to do is tell it to only restart if there is change to any of the config files uploaded. That would be nice to minimize service restarts.
I was thinking about this for some time now, can you link me to some good tutorials about quadlets in particular? Ansible will have to wait for now.
Unfortunately not. I found documentation largely lacking. I mostly read the docs and searched specific questions that came up(which often just took me back to the docs). I did as a local LLM for help, but found it's knowledge base lacking. Sometimes it would work for a hint, but it more often than not made up parameters and features.
Which docs did you read in particular? If you mind to share? And so nice, that you setup a local LLM. I sadly don't have the horsepower for that.
Here is a redhat blog about it: https://www.redhat.com/en/blog/quadlet-podman
This docs page has more details: https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/10/html/building_running_and_managing_containers/porting-containers-to-systemd-using-podman
And last, this page shows most of the options you'd expect to find: https://docs.podman.io/en/latest/markdown/podman-systemd.unit.5.html
Oh that's smart! I just got started with podman and quadlets. Loving how simple it is to setup a systemd service and even organize multi-pod apps