I’m in the midwest, so we get cold winters and warm-to-hot summers. We also have basements with the ground temps being an even 55F year round. So, in my climate, I would avoid an attic as much as possible, in that the attic, even in the far north, is going to have times of the year with hot weather and super hot attics which are difficult to cool. On the other hand, a basement is easier to hold at a consistent temperature year round. The issue with basements, if there is an issue, is usually humidity.
Another thing to consider, is any kind of climate control first needs a climate that can be controlled. This means the structure must be air sealed and insulated. Different regions of the country will have different environmental factors/codes to consider.
If you choose to use a basement and it’s a relatively dry basement, you may get away with just putting the server in that space and being done with it. A more humid space may need either A/C for humidity control, or a dehumidifier. But also be aware that too much cooling can create condensation, which is bad for servers.
Where do you live? What are the conditions you face?