4 ms·
Another cargo cult post about self hosting that makes it about 1000 times more complex than it needs to be via containerization. I get that it's what they're us
by superkuh 4y ago
Another cargo cult post about self hosting that makes it about 1000 times more complex than it needs to be via containerization. I get that it's what they're used to because of work but this isn't work and has entirely different requirements.
There are no "production deployments" at home. You just do what you want. If it's down for a day that's fine. Putting something in a transient docker container and then bending over backwards to enable file persistence is just... wrong. And it'll lead to lots of extra work for no reason.
- hatware 4y agoSpeak for yourself, some of us use our homelabs to serve ourselves as customers because we refuse to pay for nickel and dime services that exist for the sake of convenience. I realize that homelab goes a bit beyond localhost, but we all start somewhere.
- superkuh 4y agoAnd that's fine. But it is not at all required for self-hosting things. Maybe you do that to improve your skills for making money. Maybe you do it because you just enjoy all the complexity and learning the systems. All legit, but completely un-needed obstacles for people that just want to learn how to, or just accomplish, self-hosting. It's like writing a page on how to make bread at home but then spending most of the words on how to build an transient extra-oven outside with special parts instead of just using your oven and talking about the actual recipe steps.
- donmcronald 4y ago> And that's fine. But it is not at all required for self-hosting things. It's not required, but, once you have a handle on it, you get to save a lot of time and hassle. For example, I just checked my old docs for installing and updating Nextcloud. It's 17 printed pages. My new docs are: docker compose pull && docker compose up -d && docker logs -f nextcloud Personally, I run that nightly because, like someone said in another comment, "so what if your homelab is down for a day." For me having a day of downtime wouldn't be the end of the world, so everything's homogenous and auto-updated. I only touch it when I need to update to new major versions. In my experience I spend less time fixing issues related to containers than I used to maintaining everything by hand.
- mattmanser 4y agoYou've missed his point, he's just saying you don't need to use docker, just set it up normally. Or what was normal 10 years ago anyway.
- kixiQu 4y agoI mean, yes and no, right? We've all seen "over engineered" setups that really function to give someone a safe playground to try out those containerization technologies they may want for more sensible use elsewhere. However, it's also the case that once you get into the double digits of things you're running, walling off your versions of things from each other is valuable, and prespecified configuration is nice.
- donmcronald 4y ago> Putting something in a transient docker container and then bending over backwards to enable file persistence is just... wrong. Do you mean declaring the volumes? What's so hard about that? There's a massive benefit when everything is homogenous. I can look at a docker-compose.yml file and instantly know where all the important data is. I can also copy volumes to a new host with a one-liner: sudo docker run \ --rm \ --log-driver none \ --volume myservice_data:/data \ alpine \ tar -cf - -C /data . \ | ssh -o "StrictHostKeyChecking no" user@host.example.com \ 'sudo docker run --rm -i \ -v myservice_data:/data \ alpine tar -C /data -xpvf -' For development, I self host Portainer, Caddy, Authelia, Cloudflare Tunnel, Gitea, Drone, MinIO, Nexus, Bookstack, Nextcloud, and ArchiveBox. I barely think about any of them. I pin to a major version and schedule nightly updates using SystemD. Everything is templated, so after I set up a new container it's as simple as: systemctl enable --now update-container@gitea.timer It's a very pragmatic solution if your needs are satisfied with vertical scaling because everything can go into a single VM that's plugged in to a homogenous VM backup system. The only thing that's a little bit complex about mine is that I run MinIO in a separate VM that doesn't get backed up because I use it as cache storage for APT, Docker Hub, NPM, etc. proxies in Nexus. Docker can be frustrating while you're learning it, but everything's like that and once you get proficient with it you'll never want to go back to the old way of doing things. Docker is the packaging format that won (for servers) IMO.
- blooalien 4y agoI actually waited far too long to learn Docker. Turns out that in general it's been far easier to work with than the "traditional" self-hosting methods that I used to go with.
- dicknuckle 4y agoIt also forces you to keep a clean system, app logs are easy to find and consume nearly any way you want, and if a container from one developer isn't fitting your needs, it's usually super easy to drop in someone else's different container implementation of the same app with one config change (the repo name).
- r00t4ccess 4y agoI use to operate like this as well, but I bit the bullet and moved my apps to containers when upgraded my server hardware. Using portainer, mapping my container data to volumes on the file system. It was all incredibly easy to do and it gives me a web interface that I can manage my lab from my iPad. I rebuild my containers periodically through the gui by clicking the rebuild button and telling it to pull latest. It is so much easier to me at this point that installing a ton of packages that may or may not conflict into the operating system. Its all cleanly separated into isolated packages and management of versions and dependencies is much nicer as well. My setup is portainer for container management on top of docker-ce, running on debian.
- Kwpolska 4y agoIf you know how Docker works, it’s much easier than messing with all sorts of different services with different requirements. It’s just “add the thing to your docker-compose” and you don’t need to know how to set up PHP on a server or what a virtualenv is.
- vorpalhex 4y agoIt's a single line to do file persistance.. and then you can treat the rest of the app as totally ephemeral.
- Shorel 4y agoFWIW I refuse to use docker except to "experiment" with another distro dependencies or libraries. I see it as a waste of limited hardware resources, unless it is used for lightweight servers.
- Macha 4y agoI'll use an OS package over docker when one exists (with systemd you can get pretty much the same level of isolation anyway), but docker has its advantages for software that is too picky about its environment, even at home. Or who's install steps begin with "install these twenty packages, modify these 5 config files then compile this then copy it to these paths".
- whateveracct 4y agoThis is why I really like NixOS for home deployments. I already use it to configure my laptops and desktops. Works great for configuring a little server to run services & timers too. Updating & deploying is simple too. I can `git push` some changes from any of my computers, and then ssh (which is trivial to set up w/avahi using NixOS) into the server and `git pull && nixos-rebuild switch`.
- justsomehnguy 4y ago> 1000 times more complex than it needs to be via containerization It is, but as just any another tool it has it uses, as any other tool it has some footguns: https://news.ycombinator.com/item?id=31843839 https://news.ycombinator.com/item?id=31843839