If you travel by train into Bristol from north of the city, there is a point two miles from the centre when you can catch sight of a tiny farmyard. Nestling at the bottom of a railway embankment between houses, builders yards and a car rental depot, it has sties, snoozing Gloucester Old Spot pigs, a paddock with caramel-coloured Dexter cattle grazing and vegetable plots in which you might see the farmer and her three young children at work.

It is not, as you might assume, a visitor attraction. Founded on the council-owned site of a former market garden, Purple Patch is a fully functioning four-acre smallholding that turns a profit from vegetable boxes, bagged salads and meat. Mary Conway, the 32-year-old who formerly worked for a veg-box scheme in Norwich, set it up five years ago and has become something of a local hero. Her salads – blends of unusual leaves, herbs and edible flowers – are popular in the nearby liberal enclave of St Werburghs. She lives in a converted shed on Purple Patch, with her kids and her husband, Jona, a carpenter, and finds any missing suburban comforts amply compensated for by the friendships she makes.

“It’s nice having a relationship with the animals,” says Conway, walking through the yard as the pigs glance up at a train whooshing past. “Especially the cows, because they’re so emotionally intelligent. But I also love it when you sell someone a bag of salad and later they tell you they thought it was amazing. The relationships you can have with people you’re supplying food for are really great.”

Conway is one of the stars of a food phenomenon that has been developing in Bristol since the early 2010s. Back in 2009, the city council and a sustainability group, Bristol Green Capital Partnership, commissioned a report on what might happen to the city if the world began to run out of oil. One of the most alarming revelations was that the food supply, utterly dependent on cheap oil and gas for growing and transportation, could be severely depleted, which in turn could lead to a breakdown of law and order. In response, the NHS commissioned a report exploring Bristol’s food system in more depth, and the council helped set up a food policy council to produce a plan based on its findings.

One aim of that plan was “to promote the use of good quality land in and around Bristol for food production”. A number of support organisations – horticulturalists, conservationists and a Bristol chapter of the Incredible Edible “guerilla gardening” movement – worked with the policy council on this. At first, the focus was on straightforward ideas such as reviving allotments or encouraging container farms that used hydroponics and artificial lighting. But after a couple of years, the leaders of the initiative began to notice something else happening. More people than they had expected were contacting the organisations with ideas that combined social good and an interest in nature with growing, and these people seemed to have few problems finding volunteers to help with the schemes.

It isn’t just about food. It’s about what we want cities to be and the part food can play in that

In 2016, a group of residents approached Incredible Edibles to ask if it could help them plant a food and flower garden in the St James Barton roundabout. Commonly known as the Bearpit, it is a blighted, below-street-level crossroads in the city centre where various subways intersect, and problems of rough sleeping, drug use and petty crime are rife. Sara Venn, a horticulturalist who runs Incredible Edibles as well as sitting on the policy council and chairing the Bristol Food Producers network, knew this would be a serious challenge and was worried it might be vandalised, but agreed to support it with advice and her network of volunteers. They planted flowers, herbs, soft fruit and vegetables, with all the food free to anyone who wanted to pick it; three years later, it continues to flourish.

“Incredible Edibles has supported 90 gardens, but the Bearpit had a great impact,” says Venn. “People in the city liked it and it got international attention – I remember getting emails about it from people in Norway, Ireland and Japan. It was a pivotal moment, one that made us all think that a food-growing movement could really happen here. In fact, it could just go mad.” Three years later, the Bristol Food Producers network has 36 producers within 10 miles of the city, and several eateries, including Poco, an award-winning restaurant specialising in local ingredients. “We’re creating networks so people can access land more easily, become upskilled and find markets for their food,” says Venn. “We’re helping Bristol to become as self-sufficient as it can be, but it isn’t just about food. It’s about what we want cities to be and the part food can play in that.”

Three miles north of the Bearpit, next to the M32 motorway, sits perhaps the most fully realised example of Bristol’s urban farming. Feed Bristol is a six-acre jumble of gardens, vegetable plots, polytunnels, offices and sheds, which has been run as a conservation project by the Avon Wildlife Trust since it leased the site – then a derelict former market garden – from the city council in 2012. As well as running programmes for volunteers and community groups to grow herbs, wild flowers and vegetables, Feed Bristol also operates a commercial wildflower nursery and works as an incubator hub for small food-producing businesses; there are currently seven on the site, including veg-box schemes, a mushroom grower and a medicinal herb producer, employing 15 people.

Facebook Twitter Pinterest James Koch (left) and James Smailes at their vegan cafe, Suncraft, where they grow salad leaves hydroponically. Photograph: Murdo MacLeod/The Observer

One wet summer morning, Matt Cracknell, the project’s madly enthusiastic manager (“Look, bird’s-foot trefoil – that flower attracts 150 pollinators!”), yomps me round to explain. The ambition, he says, is to create “not just a passive nature reserve, but also a place where plants and wildlife exist in a way that is sustainable because people are making a livelihood from the land. We try to encourage producers to take on wildlife management and help them sell into the local food market in Bristol. That means we’re using local food to help restore the natural environment.

“If you want to restore the environment,” he continues, “you have to be able to pay for it somehow, even if that’s just through good land stewardship.”

Cracknell says a cheery hello to a group of cagouled volunteers getting training in a covered-over area. The gardens are open to visitors and the trust’s training and volunteer growing programmes are as important as the business incubation, he says. There is a strong belief here that spending time in the natural environment benefits not only individual wellbeing, but also the planet.

One of the staff later mentions the influence of Miles Richardson, a professor of human factors and nature connectedness at the University of Derby. Richardson has recently shown that people who feel an emotional and physical connection to nature are 30 times more likely to do something to help the natural environment than those who have just read, or been taught, about it.

For Cracknell’s team, that means people learning how to grow vegetables might help to save the world, or at least part of Bristol, which is a good start.

Facebook Twitter Pinterest Humphrey Lloyd, of Edible Futures who also helps run the Landworker’s Alliance. Photograph: Murdo MacLeod/The Observer

“The city is using food-growing as a holistic solution,” Cracknell says, as we pause to smell a fragrant wildflower meadow abloom with ox-eye daisies and the helpful trefoil. “We’re reconnecting people with the environment, nature and local food systems. That helps restore nature, and it also helps people.”

If you’re the sort of cynical urban person who finds such talk a bit Fotherington-Thomas, you might like to know that many of Bristol’s new pastoralists do have a harder, more political vision of what they’re doing. In the shelter of a large shed stuffed with boxes and tools, 33-year-old Humphrey Lloyd explains that he founded Edible Futures, his Feed-Bristol-based salad and vegetable growing business, “because I was interested in climate change and food sovereignty rather than being into gardening as a kid, or enjoying the outdoors. You might have powerful political ideals, but you have to find a way of making a living that fulfils political and ecological roles as well.

“This feels practical, it earns me an income, and it contributes to a different food and political system as well,” he adds.

As his sweatshirt logo gives away, he also works for the Landworkers’ Alliance, a small union-cum-campaigning group for farmers and growers who don’t feel the National Farmers’ Union is right for them. He lets people work for him only if he can pay them the minimum wage; Lloyd himself will make £10,000 in 2109 from working roughly half the year on the business, supplementing that with what he earns from a part-time music career.

Sometimes you sense an older, countercultural spirit resurfacing in a new guise

It’s hard growing crops, he says. It’s more technical than he had imagined and requires a substantial knowledge of plant and soil science, as well as the ability to run the back end of a business. On the whole, answers to problems you encounter tend not to be Googleable. A few weeks ago he was having trouble with his peas; they were yellow, which meant they were lacking in nitrogen, but why would that be when there was plenty of nitrogen in the soil? Eventually he discovered that nitrogen provided in the form of horse manure, as this was, couldn’t be accessed by the peas. He had to save them by mixing compost and manure in water, and adding the solution to the plants. How did he work it out? “I asked a mate,” he says, demonstrating the value of those networks and support organisations.

Mutual support, finding ways to help each other, adapting old ways of doing things to work in a new world: these ideas crop up time and time again in these food producers’ conversations, providing ample proof that building a food system creates relationships between people. Sometimes you sense an older, countercultural spirit resurfacing in a new guise. Carol Laslett helps run Street Goat, an organisation that allows communities to work together to run a small herd of milking goats, and hires its billies out to people who need robust grazing on their land (one is currently clearing shrubs at Feed Bristol).

Laslett, a veteran of the grow-your-own, self-sufficiency movement of the 1960s and 70s, has a knack of subtly adapting old ways of organising. Street Goat is a cooperative, but that decision was driven not so much by a desire to share the rewards equitably as a recognition that lots of time-starved people could have the contact with animals they craved if they found a way of pooling their scraps of free time.

Laslett sees Bristol’s new food movement as a kind of successor, though she’s “not sure of the scale. Sometimes I think a lot more young people are aware of the issues because of climate change, but then I walk through [Bristol shopping centre] Broadmead and think nothing’s changed.”

Facebook Twitter Pinterest Carol and David Laslett help run Street Goat, a small milking herd. Its billies are hired out for grazing. Photograph: Murdo MacLeod/The Observer

The quantity of food that Bristol’s farmers could produce is open to question. Certainly, they can’t hope to make the city self-sufficient. To produce all the food that one average meat-eating British adult consumes in a year, you would need about half a hectare of land – roughly three-quarters of a large football pitch. Bristol covers 11,000 hectares, so even if you could grass down the entire city, it would feed only 14,700 of the 534,000 residents. The area of publicly accessible green space would feed 1,320, and just 3,300 even if they only ate grains. Having said that, self-sufficiency in specific crops might be just about conceivable. The real output of container farms is contested, but using conservative figures of a 38m2 container farm producing a tenth of a hectare’s worth of salad leaves a year, you could meet Bristol’s lettuce needs (6.9m heads a year, using UK average consumption figures) with about 1,000 containers, which, with no space between them, would occupy only about 3.7 hectares.

Conventional agricultural analysts tend to dismiss new ideas involving small-scale, local food production, citing population growth rates that, they say, mean the world will need 70% more food by 2050, and pointing out that only large-scale intensive farming could hope to get anywhere near that. They have a point, but their figures overlook, among other things, the vast wastage in the current system, which in 2008 was estimated to be as high as 50%. There could well be a role for more small-scale local production, particularly if the oil supply went awry but, as Venn points out, it isn’t just about the food supply.

When looking at cities in this context, she says you start to wonder why we do things the way we do. “Why are city centres so dominated by concrete, with no community involvement? Why is nature so unwelcome in them? Our cities would be so much more vibrant if we looked at the spaces between buildings in a more meaningful way; those spaces are always the last thing anyone thinks about and we could reverse that, looking at what we need and how we could achieve it by using them. Cities can’t continue to be just about economic growth. They have to be about our health and wellbeing as well.”

Of course, the idea of producing food in cities isn’t new and in some ways Bristol could be said to be merely reviving a system of allotments and market gardens that has declined in the past 30 years or so. Nor is it confined to Bristol. There are initiatives in cities across the UK, many adapted to local needs. For example, Bentley Urban Farm near Doncaster has, since it was founded in 2016, worked closely with teenagers who have been excluded from schools, achieving significant improvements in behaviour. The site, Doncaster council’s former horticultural training centre, used to be permanently vandalised, but the excluded children now come to repair it.

So could urban farming change the way we live in cities? Or is it destined to be a set of pleasing stories, scraps of bucolic fantasy glimpsed from train windows, or purchased now and again in the form of unusual salads? Sceptics will lean towards the last of these, but it might just be worth reflecting on the origins of our current system.

Facebook Twitter Pinterest Flower seeds being collected at Feed Bristol, a six-acre wildlife gardening hub. Photograph: Murdo MacLeod/The Observer

In the 17th and 18th centuries, a number of British farmers such as Jethro Tull of Berkshire and Norfolk’s Charles Townshend, began experimenting with newfangled equipment and techniques such as seed drills, fertiliser use and crop rotations. These were often mocked by their peers, and some caught on while others didn’t. At the same time, successive governments were making it easy for the wealthy to enclose common land. Once you owned or farmed a lot of land, you had an interest in maximising the return from it, which gave you a motivation for trying out those new ideas and using the ones that produced more crops. And thus the form of farming we now know came about, founded on what amounted to massive government intervention, plus ideas developed on little plots of land, by people who some considered impractical if not barmy.

Of course, no one knew at the time that Tull, Townshend and the government were inventing modern agriculture, and no one can know now whether some aspect of our food’s future might be being invented at Purple Patch or on an old horticultural training centre in Doncaster.

If you walk north from the Bearpit along Gloucester Road, the street at the heart of Bristol’s alternative community, you come to a cafe that would sit nicely in the kind of future people such as Venn and Cracknell are hoping to build. Suncraft, all pared-back and recycled wood, is a vegan cafe run by restaurateur duo James Koch and James Smailes. It’s particularly notable for the glass tank in which 140 salad greens and microherbs are grown hydroponically for use by the chefs – a consumer-friendly example of the much-heralded climate-controlled container farming, that is also now being taken up by supermarket salad sections. Sitting in Suncraft one morning, Koch looks at the tank and says, “It’s not so much about what we harvest at the moment, it’s more that it is interesting for us to start thinking about food in this way. Our customers are also fascinated to look at it and to get into a conversation about urban farming.”

It’s an interesting take on how all this might play out for customers. Tesco may be stocking an urban mix salad, using leaves from a London hydroponic farm, Waitrose may be planning to put tanks in its salad aisles, but no one’s pretending that there’s huge consumer demand for food grown in cities. Dermot O’Regan, founder of the Grow Bristol urban farming consultancy that installed and manages Suncraft’s tanks, believes urban food will be as important as an educational debate starter as it will a source of food. Having set up, and then sold, one of the country’s first container farms in Bristol in 2015, he’s sceptical about claims that that kind of small-scale production can make money; he just about made money on the quick-growing microgreens, but had he wanted to grow lettuce, he would have had to charge about £20 a head. However, as an entertaining, conversation-starting feature in shops and restaurants, it could be invaluable.

“It gets people to think about where their food is from,” he says. “What does natural mean when rural fields might be near roads and all the work in them is done by machinery using oil? Should we be thinking about eating more algae, seaweed and insects? Can people be persuaded to pay for more sustainable food? How can we distribute it to make it as accessible as supermarket food? It opens up all sort of issues, and that’s important. Because whatever you think about urban farming, you can’t really look at the current food system and says that it’s working, can you?”

Read more about the future of cities at theguardian.com/cities