i see lots of programs require docker, linux, or anything of that caliber in order to self-host. i want to get some thoughts and opinions from those who are more experienced in the field on whether it would be a good investment when it comes to that. a couple of programs on my laptop are self-hosted, but it would be interesting to try out more! so i inquire: would it be a good investment for that type of usage?
The only thing you truly need at minimum is an HTTP server such as NGINX or Apache, in addition to the operating system of your choice. Linux is certainly a preferred operating system as most website management services are tuned for Linux distributions and come in much more lean varieties which are more ideal for webhosting in the first place.
Docker is not required to self-host. It’s an additional program you add to your operating system to help with management since it helps keeps some thing separate from the OS, and it has it’s benefit, but you can self host without it. Also most things don’t require docker to be installed to use, but they’re just often easier to install with Docker. (as I understand it, anything that is set up to be installed through Docker means they install all components necessary for it to work in the container so you don’t have to worry about manually installing each component. The downside would be that this can take up space real fast if you plan on installing multiple things in their own containers.)
If you’re not worried about storage space, certainly doesn’t hurt to try it out. Seeing as it manages containers it would give you a lot of options to play with things without worrying too much about disrupting the OS.
(Personally I don’t use Docker or any other container management program. In some ways that’s easier and in some ways I wish some things were installed in containers. It really depends on what you want to do and what works best for you.)
If you just want to experiment with Linux on a laptop, a VM will work.
About space for containers: the largest one I’m running (nextcloud) is 1.45 GB and the smallest (thelounge) is 182 MB.
The Lounge is a good example because you can compare different installation methods and ways of running it. Docker (or podman) is probably among the easier ways of doing it.
You may find that that quite often the web apps you want to run don’t provide packages for use with apt or yay.
To answer your original question: a Raspberry Pi is a decent machine to learn how to self-host. They are inexpensive, draw relatively little power, are small, and have WiFi so you can stick it pretty much wherever you have a power outlet. As mentioned in the other replies, you are pretty much always going to use Linux to self host, mainly because it is free and distros have been compiled for the RPi. One thing to be careful of with the RPi and similar single-board PCs is that over time the SD card you put in it will degrade, so you probably want it to use a hard disk or SSD eventually (likely an external one connected with USB, though you could potentially install one onto the board itself).
Most software will offer docker container versions because it is generally easier to distribute and manage. Containers are functionally “lightweight” virtual machines (though technically speaking they are different from virtual machines) that give you a mini-Linux environment that belongs solely to the application running inside it. The benefit of doing this is that it gets around issues where software X requires one version of a package, but software Y requires a newer version, and the two versions cannot co-exist on the main OS. The downside is you’re now managing a bunch of mini Linux installs inside your real one, which can make it somewhat difficult to debug when something goes wrong.
If you can easily find an RPi, it’s a pretty low-risk way to get into self-hosting. I would say you should get one to play with and see if you like it.