Since 850 CE, when coffee might have first been consumed, the little fruit of the coffee plant has traversed all seven continents.
It's even travelled as far as outer space.
"When the first Italian crew was sent up to the International Space Station, one of the things they took with them was a specially designed espresso machine," Jonathan Morris, professor of modern history at the University of Hertfordshire, tells ABC RN's Late Night Live.
How did coffee spread so far, and how did the globe develop such an avid taste for it?
The eureka moment
There's no written evidence of the first time someone discovered that coffee beans could be consumed, but folklore suggests that it began with a goat herder named Kaldi in Ethiopia in the 9th century.
According to this folklore, as Dr Morris explains, Kaldi noticed his goats getting excitable and jumping up and down after eating what looked like red berries from a bush — so he decided to try some for himself.
It had the same effect on him too.
It's thought that Kaldi showed the coffee berries to local religious figures to try, but they found their taste unpalatable, so they spat them out into a nearby fire.
But something changed their minds as the berries started to roast: the beautiful smell that arose.
They are thought to have retrieved the charred seeds of berries, poured boiling water on them and created coffee.
"But I'm afraid we have absolutely no proof that Kaldi existed," says Dr Morris, the author of Coffee: A Global History.
Folklore certainly points to Ethiopia as being the seedbed of coffee, but the first written evidence of coffee consumption dates back to the 15th century in Yemen, he says.
Islamic religious figures, now on board with coffee, were driving the market.
"Around that time, there was the beginning of a trade in coffee from … the Horn of Africa over into Yemen to meet this demand from the religious figures," Dr Morris explains.
Around the 1450s Sufis would consume coffee as part of their religious ceremonies, which was beneficial because they were held at night.
"You use a psychoactive stimulus to keep you going through the ceremonies, and to enable you to enter this meditative state," he says.
Demand for coffee was also fuelled by a shortage of a local stimulant, khat, which had previously been used in night ceremonies to stay alert.
Soon after, coffee developed into a drink that grew in popularity among Islamic groups in Yemen, not only for religious purposes, but also for socialising. Yemen was also the first place that coffee was cultivated as a commercial crop in the 1540s.
Dark colonial history
Coffee arrived in Europe via Indian trade, Dr Morris says.
"The Dutch actually found some coffee growing in Malabar in India … that must have been smuggled by probably some ... Islamic pilgrims."
As early as the 1570s, coffee was used by Europeans for medicinal purposes in apothecaries, in potions that were prescribed for disorders of the digestive system, Dr Morris explains.
Europeans didn't start drinking coffee socially until the 1650s.
Then, after coffee was planted in Suriname in a Dutch plantation colony in the 1760s, the Caribbean then became the global centre of coffee production.
"This is coffee's darkest period, without a doubt," Dr Morris says.
The expansion of coffee in the Caribbean and beyond has a deeply problematic past.
"All of this production is undertaken by enslaved people under really brutal conditions," Dr Morris says.
"We know that 12 million people, roughly speaking, were moved as enslaved people from Africa to the New World, primarily into the Caribbean.
"How many of them went into sugar, how many went into coffee, we don't have a strict balance on that."
But it's clear that the proliferation of coffee across the world at one point relied upon the labour of enslaved workers.
Rise of coffee in Australia
Not long after the influx of coffee farms in the Caribbean, coffee seeds and plants were also transported to Australia with the arrival of the First Fleet in 1788.
The fleet had picked them up in Rio De Janeiro, Brazil, but, given the unfavourable climate, the plants failed to thrive in Sydney.
In 1901, coffee consumption in Australia was only one tenth that of tea, but following WWII that began to change.
From 1942, the influx of about a million US servicemen and women sparked a demand for caffeine. The Americans had began drinking coffee, in part for stamina, during their civil war in 1861, Dr Morris says.
When US servicemen were welcomed into Australian homes during their stay, their hosts quickly learned how to make it for them.
The popularity of coffee in Australia flourished with the arrival of immigrants from Italy and Greece in the 1950s.
At this point the Italian population, notably in Melbourne, imported a machine that would revolutionise coffee in Australia, Dr Morris says.
"They brought in the first espresso machines. As these were an Italian technology this established the sense that Italy had a different and more sophisticated coffee culture," he says.
But perhaps Australia's biggest contribution to recent coffee culture is the flat white, he says.
"It seems to date back to the 1980s and the inability to froth milk in the usual way due to a change in the diet of the cows leading to cafes posting signs that read 'No Cappuccinos only Flat Whites'," Dr Morris says.
Aaron Cunningham, a Sydney-based wholesale manager and a coffee roaster, says today Australia is well known not just for the flat white, but also for embracing some of the best specialty coffee in the world.
"Hospitality is just so vibrant in Australia. It's very multicultural — coffee obviously plays a part in that," Cunningham says.
His favourite type of coffee is from Ethiopia, where the origins of the bean might lie.
"Ethiopian coffee has all those things that I really loved and fell in love with about specialty coffee: florals, nice citric acidity, complex acid [and] beautiful fruity sweetness," he says.
And despite the recent hike in coffee prices across the country, partly attributed to inflation, he says before you recoil at a coffee's price tag, it's important to remember how much goes into making a good cup, starting from its place of origin.
It's imperative that the workers on the ground producing the coffee get fairly compensated, Cunningham says.
"So that's where we try to focus our sourcing on, making sure that the farmers are getting paid correctly, and we're charging the right money for the coffee."
Cunningham says increased transparency across the industry about where coffee is sourced from and how it is priced will benefit the coffee farmers, labourers, and communities in different regions around the world into the future.
RN in your inbox
Get more stories that go beyond the news cycle with our weekly newsletter.