I built a server a few years ago in a Fractal Design Node (big square box) which has 4 6TB drives in raid 5 for 18TB of storage and a 6 core AMD cpu. It cost around £1200 and half of that was the hard drives.
It’s been really good, so if you’re looking to build one yourself I’d recommend having a look at the case and the price of drives.
Sometimes the sun doesn’t shine, sometimes the wind doesn’t blow. Renewables are great and cheap, but they aren’t a complete solution without grid level storage that doesn’t really exist yet.