Batteries and renewables
Any data centres will have battery storage, which normally is just enough to run the systems until backup generators are up to speed, or in some cases, where all data is replicated offsite, long enough to shut down or migrate processes to another site.
Increase the size of those batteries, get the local renewables to charge those batteries. Use the batteries as a buffer, and any surplus generation (or battery state of charge greater than required for generator failover) can go straight into the data centre power, reducing the draw on the grid.
By all means, have on-site generator backup running on some heat source or other, because the bigger the data centre, the more there is to lose if any power source goes down.
Net result is data centre has cheaper than normal grid power, is more self-sufficient. Choice of fuels for the on-site backup generator is down to economics and local availabilty of the fuel.