I run my homeserver in a Lenovo m920q I bought for about 300USD (but it's a 32GB, 1TB NVMe 9th gen i5 model, there are models from like 100USD up).
These 1-liter PC's are amazing, almost completely silent, idles at like 4W, but has enough grunt to transcode for plex and other stuff like that.
Another alternative is a laptop with a failed display, from ebay or your local thrift store. Plug in an old monitor from the same place when you need to, or ssh in.