this post was submitted on 07 Apr 2025
34 points (92.5% liked)

Selfhosted

45545 readers
1203 users here now

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:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. 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.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

I've been slowly moving along in this self-hosting journey and now have a number of services that I regularly use and depend on. Of course I'm backing things up, but I also still worry about screwing up my server and having to rollback/rebuild/fix whatever got messed up.

I'm just curious, for those of you with home labs, do you use a testing environment of some kind or do you just push whatever your working on straight to "production

  • edit: grammar
you are viewing a single comment's thread
view the rest of the comments
[–] lorentz@feddit.it 1 points 1 day ago

I don't have a testing environment, but essentially all my services are on docker saving their data in a directory mounted on the local filesystem. The dockerfile reads the sha version of the image from an env file. I have a shell script which:

  1. Triggers a new btrfs snapshot of the volume containing everyithing
  2. Pulls the new docker images and stores their hashes in the env file
  3. Restarts all the containers.

if a new Docker version is broken rolling back is as simple as copying the old version in the env file and recreating the container. If data gets corrupted I can just copy the last working status from an old snaphot.

The whole os is on a btrfs volume which is snapshotted regularly, so ideally if an update fucks it up beyond recovery I can always boot from a rescue image and restore an old snapshot. But I honestly feel this is extra precaution: in years that I run debian on all my computers, it never reached the point of being not bootable.