If you can create the optimal conditions you can grow anything anywhere.
That is a big if though.
As you mentioned, outside of it's normal range coffee is usually grown in greenhouses. Just a quick internet search came up with this:
https://www.growingreenhouse.com/can-i-grow-coffee-in-a-greenhouse-is-coffee-worth-it/
They mention not needing full sun, rather preferring filtered sunlight, which is an interesting point for
permaculture gardening. That means even in a
greenhouse you could potentially layer coffee under another tree. You'd need a reasonably tall
greenhouse though.
The optimal conditions for coffee (from
another site):
Arabica being tropical in nature, requires that the plant receives 1,200-2,200 mm of rainfall per year and grown at an ambient temperature of 15°-24°C. Depending on the species, coffee plants can grown to a height of 2.5-4.5 meters, though shrubs are typically pruned to 2-2.5m for easier harvesting.
Robusta on the other hand requires slightly more rainfall (2200-3000 mm/yr) and can grow up between 4.5-6.5m in height.