For those seeking mild, year-round temperatures and affordable plots of land, Boston, with its long winters and dense population, isn’t the first city that comes to mind.

But graduates of the city’s nearly 35 colleges and universities are contributing to the area’s growing reputation as a haven for startups challenging and transforming age-old industries, from furniture to political fundraising. The city’s strong entrepreneurial spirit, combined with progressive legislation like the passing of Article 89, has also turned Boston into one of the nation’s hubs for urban agriculture.

The inspiration for Freight Farms, an urban farming business headquartered in South Boston, was launched after co-founders and friends Jon Friedman and Brad McNamara realized that New England currently gets almost 90% of its food from outside the region, yet 10-15% of households still report that they don’t have enough to eat. The over reliance on imported produce drove Friedman and McNamara to launch a Kickstarter campaign in 2011 for their farming business, which sells freight containers to would-be farmers, many of whom aren’t necessarily farmers by trade, but are interested in contributing to sustainable living. A Freight Farms container is designed to be largely self sustained, and uses solar energy to provide the majority of electricity required to grow the crops. Julia Pope, who works in farmer education and support at the organization, says people can find the freight containers squeezed between two buildings, in a parking lot, under an overpass, or virtually anywhere in the modern urban terrain.

Freight Farms has spread north from Boston to Canada, and Pope says there are just over 100 of the company’s container farms operating in the US alone. The company outfits each 40ft container with the equipment for the entire farming cycle, from germination to harvest. This equipment, which the company calls Leafy Green Machine (LGM), creates a hydroponic system, a soil-free growing method that uses recirculated water with higher nutrient levels to help plants grow. Vertical growing towers line the inside of the shipping container, with LED lights optimized for each stage of the growing cycle. Farmers can manage conditions remotely using a smartphone app called Farmhand, which connects to live cameras inside the container.

Freight Farms has spread north from Boston to Canada, and Pope says there are over just over 100 of the company’s container farms operating in the US alone. Photograph: Freight Farms

Pope says that of customers who have purchased the LGM, more than 50 have started small businesses, each consistently producing two acres worth of food year-round. One of these businesses is Corner Stalk Farm, which sells locally grown leafy greens – including kale, mint and arugula, as well as more than varieties of lettuce, to cater to demand at various farmers markets in Boston and Somerville, the city’s landmark Boston Public Market, and through orders from produce delivery services (such as Amazon Fresh) that are increasingly popular in cities. It’s no small feat to own and operate the LGM: purchasing one of the containers will run an aspiring business $85,000, with operating costs adding up to another estimated $13,000 per year.

Luckily, steady consumer demand, evidenced by more than 139 farmers markets across the state of Massachusetts alone, help to offset the high costs to starting and running an urban farm. Hannah Brown, a resident of Boston’s North End, regularly shops at the Boston Public Market, which sells locally sourced goods from more than 30 small businesses. “There aren’t many stores with really fresh produce in the immediate area, so it’s definitely filled a need for me,” she says. Brown also finds the small business owners who sell their produce at the market to be an invaluable resource: “It’s great to be able to talk with the people working the produce stands, because they can recommend what’s freshest and how to prepare it.” As a result, she says she’s taken to only buying produce that’s in season and adjusting her habits to align with what’s available to her locally.

The growing popularity of urban farming owes much to a former mayor, Thomas Menino, and one of his final acts while in office. He signed into law Article 89, expanded zoning laws to permit farming in freight containers, on rooftops, and in larger ground-level farms. Article 89 made it possible for those practitioners to sell their locally grown food within city limits.

One business that has taken advantage of Article 89 is Green City Growers, which runs Fenway Farms, is a 5,000-sq ft rooftop farm above Fenway Park. The rooftop is lined with plants grown in stackable milk crate containers, which are equipped with a weather sensitive drip irrigation system that monitors the moisture of the soil in the crates to make sure plants get just the right amount of water. Although the farm isn’t open to the general public, it is visible to fans from the baseball park, and a stop on the Fenway Park tour.

In late 2013, the landscape for urban agriculture in Boston got a lot greener with the passing of Article 89, which made it possible for those practitioners to sell their locally grown food within city limits. Photograph: Freight Farms

Boston is far from alone in passing legislation that makes farming a possibility for city-dwellers. In Sacramento, there are even tax incentives for property owners who agree to put their vacant plots of land to active agricultural use for at least five years, while the city council of San Antonio voted just last year to pass legislation that makes urban farming legal throughout city limits. And while Boston boasts home to various agricultural startups and nonprofits, entrepreneurs in other parts of the country are contributing to a national farming movement in their own ways: Kimbal Musk, brother of Tesla and SpaceX CEO Elon Musk, recently set up a container farm in an old Pfizer factory in Brooklyn, while Local Roots Farms is turning shipping containers into urban farms (using the same hydroponic method that the LGM uses) across the Los Angeles area.

As Bostonians now find themselves with a slew of new options to grow and profit from fresh produce on rooftops and in alleyways, some nonprofit organizations are looking to use urban farming as an educational asset. CitySprouts was born in Cambridge in 2001 after executive director Jane Hirschi identified what she calls “an immense need for children to understand where their food was coming from”. CitySprouts teams up with educators to set aside class time for students to cultivate gardens on school property that they can grow their own food in. There are now more than 20 public schools using CitySprouts gardens in the Boston area, and more than 300 public school teachers participating in the fresh food program.

Caitlin O’Donnell, who teaches first grade at Fletcher Maynard Academy in nearby Cambridge, says the program does a great job of giving urban kids the opportunity to interact with their environment in ways they wouldn’t have otherwise, she adds. “Whether students are digging for worms, sketching roots structures, crushing apples for cider, or sampling chives and basil, their hands are busy and their senses are engaged ...what makes City Sprouts most effective (and exceptional) is that it is collaborative and flexible by design.”

Boston’s rise in the national urban farming movement also has helped to make locally grown produce more available to low-income residents. Leah Shafer recalls that she was able to use food stamps at a farmer’s market to receive half-off of her purchases of kale, blueberries, and more.

“It made it possible for me to buy organic, local produce that I otherwise just wouldn’t have been able to afford. I don’t think I would have been able to support local farmers without that discount,” she says.