3 ms·
> Start by reading about docker and docker compose. You will have almost everything in docker containers. The case for Docker if you don't care about container
by yamtaddle 4y ago
> Start by reading about docker and docker compose. You will have almost everything in docker containers.
The case for Docker if you don't care about containerization or any of that per se is:
1) It's basically a very-up-to-date cross-distro package & service manager for Linux servers. You can ignore a ton of stuff about your underlying distro if you use Docker, and can use a very stable LTS Ubuntu or stable Debian or whatever and still have recent versions of the services you care about, more easily than you can without it. Anything you learn about managing Docker will transfer to any other distro.
2) It makes backups and recovery of the exact same services (including same versions) easy by default. Most packages are forced by its nature to make important data directories explicit, you can map those wherever you like on your host system's filesystem, and it's very easy to test whether you're backing up all the stuff you need for recovery from scratch (destroy and recreate the container—if you've mapped all the directories you ought to, it'll look exactly the same, nothing missing or broken, when it comes back up). Back up your mapped directories from various containers (since you can define where these live, this may be as simple as backing up a single directory), backup the docker-compose.yml or shell scripts or whatever you're using to define and start up your services, and that's just about everything.
- BrandoElFollito 4y agoThanks for the update, it is very relevant to my comment. I would add one more thing: despite being discouraged, you can use an image (say, vaultwarden/server) with the tag :latest (vaultwarden/server:latest) and automatically update images to the latest version (with for instance watchtower, which is also a docker image). This may break things. From my personal experience (5+ years of self-hosting with docker), I had a problem twice. Once was with Home Assistant and the issue was documented on their site. 5 minutes later I was good to go. The other time was with Nextcloud which failed miserably, I had to revert back to the previous container AND use a backup. So backup! :) If the image allows it (it is usually documented with the image), you can limit the upgrades to major/monor/patch versions. Say your product is today at 3.2.5. If you use image:3, it will be updated up to the major version (3). You will not get version 4. You can also use lower versions (:3.2 in this example) and just get the patches. It is a decision between security, new features and availability. My personal opinion, of someone who works 30 years in IT and information security is that newer is better - you won't be alone if things break (because a lot of people use :latest and do not read teh changelogs when upgrading) Docker is a life saver for self-hosting.