Should I go with docker containers or continue just using Arch for my home server? reddit / selfhosted ---------------------------------------------------------------------- Nightwish612 · 2023-11-12 02:16 I mean basically the title. Currently all my services are just running directly on my arch server and it has been working well enough for me and i am super comfortable working with it. A few months back I had a minor crash of the server where the system had become not functional. I was able to recover the server to the point that my services could run but i never got the graphical part of the server going again or nextcloud running. At this point I'm just considering wiping the os to a fresh one and starting clean to get everything working correctly again. What I'm wondering is, is it worth learning docker and deploying all my services that way or should I just continue with the way i have been doing it for years now? I will be running the various Arr apps, Emby, NextCloud, Qbit, Homepage?, and probably a few others that i can't recall off the top of my head. Some of the services are accessed of site if that matters at all. I did briefly explore docker in the past but got stuck and my friend pushed me towards straight arch. Now I'm considering giving it another shot but wanted to hear folks here input on the pros and cons of either way ---------------------------------------------------------------------- cr0wstuf · 2023-11-12 02:40 While I really like arch, I don't think it's a good distro to be running apps directly on due to the rolling release nature. It's better to run apps directly in a distro like Debian or alpine. Yes, running the apps in a container will bring more stability and reliability, but you're still risking botched updates to the host that could cause instability. That being said, your immediate best move would be to use docker. Your best move long term is to move to a distribution thats not rolling release. ---------------------------------------------------------------------- ddifdevsda · 2023-11-12 02:46 Definitely worth the effort. If you want the services you run to be stable, that is :) BTW; using Arch on your server is probably not the best idea! The reason why many people prefer release-based distros on their servers is because they are much less likely to have a dependency conflict. Also, while I love Arch — it's just not for servers that are required to stay stable and reliable. ​ So, let's get back to the question at hand: why Docker? It'll be WAY easier for you to control everything. Every image has its own environment with dependencies that don't interfere with other services' requirements. Also, updating your services will be much easier and without needing that much attention — you won't be risking breaking stuff that's already running on your server. ​ The downside will be that you won't have as much understanding of your system and everything that's running on it. But that could be solved with a separate PC for tinkering or a VM :) ​ Good luck! ---------------------------------------------------------------------- Nightwish612 · 2023-11-12 02:58 I think that will be how i end up deploying things at first is in a VM then migrating to the physical server because i don't want to take my current server down until i have a functioning replacement. Kinda sad to leave Arch as i prefer it for above any other distro I've used over the years but I do understand the rolling vs release and my friend does too, which is what strikes me as odd as to why we both moved to Arch for our home servers ---------------------------------------------------------------------- Reverent · 2023-11-12 03:01 Ironically the red hat OS specifically meant for production containers is a rolling OS. Never had it fail either, and if it did there is a built in rollback mechanism. ---------------------------------------------------------------------- ithilelda · 2023-11-12 03:03 short answer yes. I think you already come to the same conclusion but just being intimidated by a new technology stack that you must learn fresh. Well don't be! It isn't hard, and it is definitely worth the effort! ---------------------------------------------------------------------- JL_678 · 2023-11-12 03:04 I agree with others and have an alternative view. How about you install a hypervisor like Proxmox and then you get the flexibility of running Docker, LXC containers or even VMs. Personally, I run a mix of LXC containers and Docker. Why? I really like Docker but the all inclusive nature of the containers can make customization of settings difficult. In contrast, LXCs are heavier than Docker containers but they act like a full Linux machine and so you can use all of your past system admin knowledge and customize away. They are mich lighter than a VM and so they are a nice middle ground. Summary for simple self-contained apps, I use Docker and for more complex apps, I rely on LXC containers. With Proxmox you can easily use both and so it is the best of both worlds! ---------------------------------------------------------------------- Alfagun74 · 2023-11-12 03:23 Definitely. I cant imagine the pain of non-isolated services fucking each other up on my root os. damn. You should check out caprover. ---------------------------------------------------------------------- gioco_chess_al_cess · 2023-11-12 03:45 Use docker on arch. It is perfectly fine for one server. The need for release based distributions strictly comes only when managing many servers where updates should be unattended. ---------------------------------------------------------------------- kevdogger · 2023-11-12 03:48 I've ran arch for many years in many vms acting as servers. I've never had any more issues with arch than Ubuntu. With any system you can choose you need your keep backups or snap shots ---------------------------------------------------------------------- puppetjazz · 2023-11-12 03:59 Debian is all I use for servers. On a server you really can't beat stability. ---------------------------------------------------------------------- cr0wstuf · 2023-11-12 04:19 I used to use Debian. I'm on slackware now. So much manual labor but I'm a stability addict. ---------------------------------------------------------------------- AlternativeBasis · 2023-11-12 04:26 Another good reason to use Docker is its combined use with Docker- Composer and Portainer web UI. Portainer Stacks allow you to centralize MOST of applications configs in a single location, which facilitates replication and disaster recovery. Only the content of a single txt file copied and pasted into Portainer returns to the activity of several application servers. I am building a reverse proxy with every app server defined in the same stack, with each app public port "exposed" only to the applications of the same stack. Except the 80/443 in the proxy, of course. There are more sophisticated options: * store configuration files in git * separate common environment variables into dedicated .env files * create replicas and balancers * use orchestrators (one of them is Terraform, I believe) to automatically create replicas However, they all seem exaggerated to me, it's killing a fly with a cannon, given the needs, scale and complexity of a private domestic host. ---------------------------------------------------------------------- maximus459 · 2023-11-12 05:01 Make an Arch container with everything? ---------------------------------------------------------------------- ElevenNotes · 2023-11-12 05:07 There are many solutions for that. You use Debian, I use Alpine, both work. ---------------------------------------------------------------------- thekrautboy · 2023-11-12 06:46 wut? ---------------------------------------------------------------------- Frosty_Music_3800 · 2023-11-12 06:58 I use Arch, btw. ---------------------------------------------------------------------- elightcap · 2023-11-12 07:29 Arch is great on a my desktop. For my servers I use Debian. I recommend it highly. ---------------------------------------------------------------------- maximus459 · 2023-11-12 08:33 Whaat? Just want to see would it would go down if you spin up an Ubuntu (or arch) container, install all your stuff and publish that image.. ---------------------------------------------------------------------- Do_TheEvolution · 2023-11-12 08:40 >is it worth learning docker and deploying all my services that way or should I just continue with the way i have been doing it for years now? 100% worth! It is really amazing approach that eases so many aspects and makes you feel more in control. [This repository](https://github.com/DoTheEvo/selfhosted-apps-docker) should be helpful. Examples of bunch of popular services running in docker and some other stuff like backups with borg or kopia. >using Arch for my home server I too run Arch as my go-to linux server, usually docker host is being its main job. Reason being its a damn good OS and I am most comfortable with it since I am running it on my main desktop. But another thing is that I usually run under some hypervisor(hyper-v and esxi) as a virtual machine, not straight on metal. So taking snapshot of it is matter of second and reverting to that snapshot is a minute... so that is one aspect that lets me go with any linux I damn like without that much consideration for reputation of stability. That repo that I linked has even [notes on arch fresh install](https://github.com/DoTheEvo/selfhosted-apps- docker/tree/master/arch_linux_host_install), but arch started to include archinstall script on ISO, i decided to rather use that. I started to deploy Arch so much that I even have few [ansible playbooks](https://github.com/DoTheEvo/ansible-arch) to get arch the way I like. Which mostly means some basic services and packages and workflow being about nnn file manager and micro text editor. Also recommend you use lts kernel when installing arch, just for that extra stability. Also it seem you were running xorg too, which I recommend abandoning. So much extra packages, so much more that can go wrong on update compared to bare arch with terminal and ssh.. but if it really ease your workflow then fine. ---------------------------------------------------------------------- thekrautboy · 2023-11-12 08:42 Sorry, not drunk enough to understand that. ---------------------------------------------------------------------- Do_TheEvolution · 2023-11-12 10:15 Same here. Its my go-to. Except I had one issue relatively recently where [newest kernel had regresion](https://bbs.archlinux.org/viewtopic.php?id=288723) with virtual dvd under esxi hypervisor, causing higher cpu load than typical. So I took time and switched all my shit to lts kernel. But other than that, which was solved easily by removing dvd or switching kernel, I had zero issues, and even had some deployments where i was updating ~2 years old arch install and it went smoothly... ---------------------------------------------------------------------- KR_GAMING2005 · 2023-11-12 11:13 Arch for desktop and Debian for servers ---------------------------------------------------------------------- kevdogger · 2023-11-12 11:48 That's unfortunate. Most of time I just use lts kernel. I too am just using servers accessed via ssh and terminal. ---------------------------------------------------------------------- puppetjazz · 2023-11-12 12:24 I'm not trying to imply debian is the end all solution. ---------------------------------------------------------------------- ElevenNotes · 2023-11-12 12:25 The statement:"Can't beat stability", is an absolute and therefore says otherwise. Other systems are just as or even more stable than Debian, that does not mean Debian is bad, it's just one of many choices out there, and it's good to have choices. ---------------------------------------------------------------------- puppetjazz · 2023-11-12 12:27 Tbh I wrote that stoned last night and was just speaking from my personal experience. I've used Debian for over 17 years in my home and never had a problem. I'm not trying to say you can't achieve the same stability on another distro or bsd or whatever. ---------------------------------------------------------------------- ElevenNotes · 2023-11-12 12:28 That's great, thanks. ---------------------------------------------------------------------- Tiwenty · 2023-11-12 13:39 I just run Arch on my server and spin up whatever docker containers I need. ---------------------------------------------------------------------- hadrabap · 2023-11-12 13:45 Maybe I would go a small step further and go for rootless Podman. ---------------------------------------------------------------------- StewedAngelSkins · 2023-11-12 15:24 i ran an arch server for years. it's really not a big deal for home use. ---------------------------------------------------------------------- StewedAngelSkins · 2023-11-12 15:28 yeah docker is a pretty good option. worth trying out. just don't randomly deploy community images from dockerhub like a dumbass. tons of them were created by people who demonstrably dont know what the fuck they are doing. but if you stick to official images, and make your own when there aren't any official images, you'll be fine. ---------------------------------------------------------------------- dazchad · 2023-11-12 15:39 For me the main selling point of docker is spinning up a stable version of a container and it pulls all its dependencies which are also working. Installing things directly on the OS, at least for me, is a war of "run service; lib XX not found; apt install XX; run service; can't write to /foo/bar;" etc etc In your case, I'd have a docker compose with all my services, and would just say `docker compose up` and pronto. ---------------------------------------------------------------------- tech2but1 · 2023-11-12 16:58 I'm going to assume everyone here saying use docker is fully conversant with docker already. As someone who already happily has multiple services hosted on multiple (extremely light) VMs I would say just leave docker alone. I have spend most of today trying to get some containers in docker working (reliably, which is what a lot of people miss). Yes getting docker up and running and containers working is simple, but if it all goes sideways tomorrow what are you going to do? What's your backup plan? IME it's much harder to get a docker stack back up and running using your own data than simply restoring a backup to a VM host. There are a couple of things I want to use that are docker only and there is something to trip you up at every turn. It's another level of complexity you don't need. If you have a working environment now then why would you need to add docker? The only thing I would say would be to maybe use a different distro for hosting everything on, but overall "if it ain't broke don't fix it". ---------------------------------------------------------------------- ScratchinCommander · 2023-11-12 19:08 You probably didn't mean to, but you come across as condescending - probably why folks down voted you. ---------------------------------------------------------------------- ScratchinCommander · 2023-11-12 19:09 Slackware still coming out with stable releases? Dang. ---------------------------------------------------------------------- ElevenNotes · 2023-11-12 19:10 and I should care why? ---------------------------------------------------------------------- ScratchinCommander · 2023-11-12 19:11 You shouldn't - keep doing what you're doing! ---------------------------------------------------------------------- Spuxilet · 2023-11-13 06:52 I run arch on my home server too and i have all the services inside docker containers. Best of both worlds ;) Never had a crash for two years. Arch is pretty much stock i only installed docker and configured static ip on it, that's it. Of course without graphical interface. Why would i need graphics on a server LOL ---------------------------------------------------------------------- ddifdevsda · 2023-12-02 02:07 Sorry for the late reply; I’d happily recommend Devuan/Debian for their stability and age; if you’d like to take an easy approach (and I won’t blame you — I have a few servers with this distro, too!), take a look at Ubuntu Server. Fedora server is nice, too