When Martin Agaba realised his urban farm had run out of space, he decided the solution was not to expand outwards but upwards.

“We realised we had to use the roof,” he says. Of all the innovations that have galvanised people in his district in the Ugandan capital Kampala to grow their own food, these vertical box plantations remain his favourite.

Kwagala farm, located on half an acre of land, is the brainchild of Diana Nambatya, a professor in public health, who began growing vegetables to save money on food in 2010.

After receiving two cows as a dowry, she decided to use their dung to generate biogas for her home. Her burgeoning urban farm soon attracted the attention of the neighbours, and in 2012 she started training women at a small demonstration centre.

Facebook Twitter Pinterest Growth spurt: a child carries a tray of plants in eggshell flowerpots. Photograph: Nils Adler

The urban farm is just one of many springing up in and around Kampala, a city of more than 1.5 million people, as residents find creative solutions to the challenges of urbanisation. Between 2002 and 2010, Uganda’s urban population grew by 5.6%. This process, Martin Agaba believes, is eroding young people’s interest in Uganda’s agricultural sector, which employs approximately 69% of the population.

Agaba trains children that live around Kwagala farm in how to grow strawberries, yams and spring onions. “We are motivating children to not rely just on boda bodas (motorcycle taxis – a popular form of informal employment) or TV but to do something creative every day.”

Brian Ndyaguma, an entrepreneur and restaurant owner, says: “Somehow the young generation deserted the way our parents’ generation did things, so if you are going to convince young people to jump into agriculture, it has to be made sexy – it has to be made appealing to them”.

Quick guide What is the Upside? Show Hide Ever wondered why you feel so gloomy about the world - even at a time when humanity has never been this healthy and prosperous? Could it be because news is almost always grim, focusing on confrontation, disaster, antagonism and blame? This series is an antidote, an attempt to show that there is plenty of hope, as our journalists scour the planet looking for pioneers, trailblazers, best practice, unsung heroes, ideas that work, ideas that might and innovations whose time might have come. Readers can recommend other projects, people and progress that we should report on by contacting us at theupside@theguardian.com

Sign up here for a weekly roundup from this series emailed to your inbox every Friday

It was Kwagala farm’s creative reuse of old tyres that first attracted visitors. Then, as they began to experiment with using other materials, such as disused drainpipes and milk cartons, some of the local children began to create their own designs. “Now the children do not copy what we do,” says Agaba. “They do their own thing.”

Facebook Twitter Pinterest Harriet Nakabaale’s urban farm in the Kawaala district of Kampala is popular among locals who want to learn how to grow crops in their urban spaces. Photograph: Nils Adler

Harriet Nakabaale runs a small farm called Camp Green in the Kawaala area of Kampala. She collects the plastic bottles discarded by her neighbours. By cutting them, she can use them as flowerpots; by perforating them, they can become watering devices. Nothing goes to waste. Even the shells of the eggs produced by her chickens will be used to grow cress.

Kwagala farm has three cows which they feed with banana peel and corn, which is grown using hydroponics, a method of growing plants using a water-based solution instead of soil. Agaba and his colleagues collect the cow dung, which they use to produce fertiliser.

Despite the business potential, there are no plans to expand the farm. “We do not need more than three cows,” says Abaga. “We are teaching people to keep less but to do more with what they have.” An education programme at the farm has trained more than 700 women and young people in urban farming and how to make organic fertiliser and biofuel. Martin Agaba, who works at Kwagala urban farm, says: ‘We don’t keep more than three cows. We teach people to keep fewer and do more with what they have.’

Facebook Twitter Pinterest Photograph: Nils Adler

Brian Ndyaguma relies on urban farms in Kampala for a large proportion of his restaurants’ vegetables, herbs and fruits. He sees a business opportunity not just for urban dwellers but rural farmers as well. “We still have a big advantage here in Uganda because we have good soil, so food is largely available. The challenge is the distribution.”

Congestion, lack of refrigerated trucks and long hot days in the markets can make it difficult for the food grown outside of the city to stay fresh. “Urban farming gives rural farmers with more space the opportunity to concentrate on perennial crops, like corn or cereal,” he says.

Agaba is an engineer and, like most of the people working on the farm, he has a day job, choosing to work at the farm as a pastime. Though he doesn’t sell much of what he grows, he still recognises there are financial benefits to his hobby. “Growing your own food makes you money by saving you money.”

Facebook Twitter Pinterest Urban farms offer some respite from the hustle and bustle of Kampala. Photograph: Ivoha/Alamy

This article is part of a series on possible solutions to some of the world’s most stubborn problems. What else should we cover? Email us at theupside@theguardian.com