u/switchback-tech

(More) self-hosting best practices for devs

(More) self-hosting best practices for devs

Last week I asked this subreddit for advice on self-hosting best practices for developers. Ya'll gave me some great suggestions, including:

  • Distributing with Docker, along with a compose file
  • Using a non-root user
  • Tagging the image with semantic versioning (v1.5.1)
  • Using YAML instead of ENV, and documenting all the values
  • Adding a health-check endpoint
  • Providing an installer script (install.sh)
  • Making the DB configurable rather than hard-coding the instance names
  • Allowing maintainers to handle backups, but documenting the restore process

I implemented all those and added a few more things that I hope will help:

  • A doc site that syncs with my main repo's /docs dir, so the self-hosted instructions don't get stale.
  • A selfhosted CD pipeline. A GitHub Action deploys to a VPS that mimics a homelabber's setup and runs automated tests after every PR. If it fails, a webhook sends a note to our support channel. This helps us not break things for selfhosters during normal development.
  • Documenting how to set up the firewall & reverse proxy. Probably overkill for this group, but I always forget so I figured why not.
  • Showing the version in the cmd palette, allowing the user to always know which version they're on.

If anyone is feeling generous and wants to give any specific feedback, here is the full selfhosting guide.

My takeaway from all this as a dev who is new to selfhosting was to get better at Docker and stick to the conventions. I'm glad I asked and am excited to keep simplifying even further. Thanks!

u/switchback-tech — 1 day ago

Which self-hosting software do you happily pay for (and which do you hate)?

It's been technically feasible to self-host my app for a few years. Recently, I've been trying to make the process easier for others in reality.

After lurking here, I realized I underestimated how much ya'll have to manage:
- backups
- config
- alerting
- observability
- security updates

And that's not even including the hardware, of course.

I see tons of tools with premium tiers recommended in the threads, but I'm curious which ones have actual superfans who will gladly stick with them long-term (vs the ones that ppl hate and can't wait to ditch).

For context, I'm trying to figure out the viability of supporting self-hosting. I don't want to waive my hand and say, "You can self-host, good luck figuring out backups" anymore. But I also don't want to go too far and create a ton of solutions that I can't afford to maintain over the long-term.

reddit.com
u/switchback-tech — 13 days ago