All Matt Malloy wanted was a place to charge his car. How hard could it be?

His first thought was to run an extension cable from his house in Dorchester and charge his car on the street. But the city nixed that idea, threatening to fine him.

It turns out that “you can’t drape a 50-amp line across the sidewalk and expect there to be no issues,” Malloy said.

So he pivoted to the idea of building a driveway. “For someone who has a driveway it’s relatively easy” to own an electric car, he said. “You buy a Level 2 charging station and you pay an electrician to come out and install it.”

Malloy, chief executive of Dorchester Brewing Co. and a former Zipcar executive, just had to persuade the city to let him cut the curb in front of his house and pave a small portion of his yard.

In the end, it took 2½ years, 37 letters of support, the services of an architect, and the endorsement of four city councilors. Then, finally, on March 14, the city’s Zoning Board of Appeals authorized him to place 200 square feet of brick pavers in his front yard.

Malloy’s long campaign for a miniature driveway illustrates how the practical challenges of electric car ownership bump up against the state’s and the city’s ambitions to help residents trade in gas-powered cars for EVs.

“For city dwellers, the number one concern is, ‘Where am I going to charge?’ ” said Kyle Murray, the Massachusetts program director for the clean energy advocacy group Acadia Center.

Read the full article from the Boston Globe here.