The greenest/cheapest way is to recycle an old laptop. They're pretty efficient and unless you're transcribing video anything in the past 10 years will be plenty powerful. Also the built-in battery is great in case of a power outage.
Then, just get one of those multi-disk USB HDD enclosure and pop some drives in.
For an OS, I like CasaOS which runs on top of Debain. It is a single-line install, and makes running docker apps very easy, for the services you mentioned and many others it can be set up entirely using the GUI.