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 firmly am of the mindset of containerizing everything. It may be harder to set up for services that you write yourself or ones that don't already have containers, but as you said, it's so much easier to migrate in the future.
I actually use podman for my services and systemd to manage their lifecycle. For each service, I have a folder that contains the systemd service file (doesn't really work in btrfs systems. You need the service files in the same subvolume as etc or else they won't start at boot) any config files or anything else that needs to be mounted as a volume into my container. I back up the folder that contains all those folder with my nightly backup. If my server craps out, I can restore that directory from my backup, systemctl link and enable all of my service files, and I'm back up to 100%.
I considering containerizing everything, except the OS (I'm not ready for immutable OSes yet). I mentioned Docker because it is what I keep finding guides for and which I think is simpler. How is it compared with Podman (for a beginner in containerizing)
Edit: I will mostly use BTRFS and snapshots, and I would definitely put my containers in a separate subvolume to avoid data loss when rolling back.
From a user point of view, podman is mostly identical to docker. Like 98% of the time you can just replace 'docker' with 'podman' and it works. How they work under the hood is very different, though. Podman is designed around running rootless and daemonless. But if you don't care about those things, use docker. Docker supports rootless as well now anyway, but you need to set it up manually. The biggest difference I have found is that podman doesn't support docker-compose, which is extremely popular. Lemmy uses it, for example. There's an additional couple of packages you can install that add support for docker-compose, but then podman uses a daemon, which defeats one of the purposes of using podman in the first place.
My workaround that I use for btrfs and systemd files is to have a folder in /etc with all my service files, then I soft link them to my service's directory. This is just for organization purposes, as a backup wouldn't include the data of the systemd file, just the link to it.
Thanks foe explaining, I know podman is rootless. My service where running their own non-login users (qbituser for qbitorrent, emby for emby and so own) and I needed to sudo if I want to change anything. It's not a big deal for me so Docker seems easier to use.
If you do ever want to script the system but don't want to go full immutable OS, Ansible is very useful. I use it for things like tweaking sysctls, installing common packages like
htop
andborgbackup
, etc. across all my servers.