KUALA LUMPUR, Malaysia — The setup of the two friends’ agricultural venture was unusual. Their farm sat next to a gas station, inside a shipping container where the plants grew in vertically stacked shelves. And the timing of their first sales — during the early days of Malaysia’s coronavirus outbreak — seemed less than ideal.
“We were a nascent product in an uncertain market,” said Shawn Ng, 28, a co-founder of the vertical farm, the Vegetable Co. “We weren’t too sure if it would take off.”
“But somehow,” he added, “the market kind of played in our favor.”
As in-person shopping wanes during the pandemic, Mr. Ng’s Malaysia-based operation is one of many small farms around the world that are selling fresh produce directly to consumers in ways that bypass brick-and-mortar grocery stores.
Some farms sell on e-commerce platforms like Amazon or Lazada, Alibaba’s online emporium for Southeast Asia, or through smaller ones like Harvie, a Pennsylvania-based website that connects consumers with individual farms across the United States and Canada.
Others, like the Vegetable Co., sell directly to customers.
“I was very ‘kan cheong’ during the lockdown period,” said one of Mr. Ng’s regular customers, Ayu Samsudin, using a Cantonese word for anxious. “Having fresh vegetables delivered to your doorstep was such a relief.”
The Vegetable Co. consists of a 320-square-foot shipping container on the edge of a parking lot in Kuala Lumpur, Malaysia’s largest city. It opened for business, with just a handful of customers, about a month before the country’s restrictive lockdown took effect in mid-March.
Revenue grew by 300 percent in the first few weeks, and the shipping container is now approaching production capacity because of high demand, said Mr. Ng’s business partner, Sha G.P.
Apart from the gas station, the shipping container’s other neighbors are a driving range and an oil palm plantation. Inside, tightly packed shelves with hydroponic lettuce, sprouts and other vegetables grow under LED lights.
The wallpaper outside the growing chamber shows blue sky and clouds, evoking the view from an old-fashioned farm. But employees pace the chamber’s narrow corridor wearing rubber gloves, surgical masks and white lab coats, as if it were a hospital ward.
The founders have scant experience with traditional farming, and they speak about their work with Silicon Valley-like jargon.
Mr. Sha said he first became interested in vertical farming after watching “The Martian,” the 2015 film in which an American astronaut played by Matt Damon is stranded on Mars and learns to grow his own food.
“I was lost in awe about the degree of precision in the technology along with the elegance of the solution to grow vegetables in a zero-gravity environment,” he said. “Since then, I have gone down the rabbit hole of independent research.”
The coronavirus took off in Malaysia in March, after an Islamic revivalist group’s gathering there became one of the pandemic’s biggest vectors in Southeast Asia. Since then, the country of about 32 million has weathered the outbreak relatively well, at least compared with some of its neighbors. As of Thursday, it had reported fewer than 10,000 confirmed cases since the pandemic began, according to a New York Times database.
Malaysia’s initial lockdown allowed only one person per household to go outside for essential errands, and the police enforced local travel restrictions with roadblocks.
But even though the rules were gradually loosened to let most businesses reopen, many urban Malaysians have maintained the online shopping habits they developed during the initial lockdown, said Audrey Goo, the founder of MyFishman, an e-commerce platform that connects fishermen from villages along the country’s west coast with consumers in Kuala Lumpur.
“Not many end users are willing to go back to the wet market,” said Ms. Goo, adding that her company’s sales had roughly doubled during the pandemic. “So I think the whole business model will continue to change.”
Mr. Ng said the Vegetable Co.’s parent company, Future Farms, was now seeking seed capital to finance an expansion into a larger facility. He recently hired an architect and a software developer to design it.
For now, though, the operation remains modest.
On a recent afternoon, Mr. Ng climbed into his car for a delivery run that snaked through low-rise residential neighborhoods, as the sun sank below Kuala Lumpur’s hazy downtown skyline.
One of the customers on the 40-plus-mile route, Gudrun Olafsdottir, said that along with yoga and meditation, greens from the Vegetable Co. were part of a routine that helped her keep physically and mentally fit during the pandemic.
Ms. Olafsdottir, who is from Iceland and works in retail, found the farm on Facebook through a local chef who specializes in raw and vegan cooking. She said it was one of several local businesses that she was supporting these days with a “financial hug.”
“I think that we could do so many things to support those in need if we just consciously choose how we spend our time and money,” she has written on her blog. “A hug and a squeeze.”
Ian Teh reported from Kuala Lumpur and Mike Ives from Hong Kong.