Peach Jam With Lemon Basil. (Deb Lindsey/For the Washington Post)

Anybody who has made jam with farmers market produce knows: It can be an expensive proposition. The best farmers market fruit, at least where I tend to shop, can cost upward of $3 or more a pound, meaning that a batch of jam that starts with, say, 6 or 7 pounds of fruit to make, say, 8 or so half-pints results in a product that costs — well, you can do the math.

Of course, I think it’s worth it for the chance to open up a jar of peak-season produce in the winter and take yourself right back to those sunny days of August. But it is easy to be reminded of the fact that putting up has historically been connected to growing your own. That is, locavorism aside for a minute, it makes more economic sense to can produce that you have in abundance, paying little more than sweat equity for the prospect.

Last year, when I worked on my sister and brother-in-law’s Maine homestead, we spent weeks preserving what came right out of the garden: tomato sauces, chutneys, jams. But we didn’t have the best fruit year. The apple and most of the pear trees flowered early and froze late, a combination that knocked those buds to the ground before they transformed. The strawberries suffered a similar fate. The lone fig tree never gets big enough in the short season to do more than look pretty. Blueberries and Concord grapes came on like gangbusters, but the former mostly get frozen whole, and the latter end up largely as juice and wine.

My favorite fruits to put up — cherries and peaches — aren’t grown on the homestead, but as my brother-in-law, Peter, often reminds me, the path to self-sufficiency should intersect with community. When our friend Julie called and, in her inimitable British lilt, said, “The peaches are falling off the trees,” we didn’t hesitate to hop in the car. “Come get as many as you want,” she added, and we did.

Soon enough the homestead’s entryway, a combination mudroom, coatroom and food-prep area that’s cooler than the rest of the house, was overflowing with peaches. They nestled in shallow baskets and on newspapers, divided into ripeness/rottenness categories of too-late, must-use-now, need-to-get-to-soon, and we’ve-got-a-few-days. Some of them, oddly, were rock hard in spots and rotten in others. So we got to work, roasting some in the wood-fired oven to make sauces and making jam with the best specimens.

I’m always looking for twists for my jam, flavor combinations that might make for a unique product, and I had acquired just the ticket for this go-round. It was another gift: a big bunch of lemon basil given to me by a farmer when I helped her pack up at the end of the town’s farmers market, which my sister founded.

I used Rachel Saunders’ stunning guide, “The Blue Chair Jam Cookbook,” and took liberties with her late-summer peach jam recipe. Out went the use of the peach pits and the peach branches. (We didn’t have the branches, and I was too lazy to deal with the pits.) In went the lemon basil. At the risk of overstating the connections, peaches go well with lemons, peaches go well with basil, lemons go well with basil, lemon basil tastes like lemon and basil, and . . . what more do I need to say? Given the lemon basil’s slightly sharp, herbal-tart counterpoint to the jam’s sweetness, I knew I’d be as likely to pair this with goat cheese on crostini (and other savory applications) as I would to stir it into homemade yogurt or spread on toast.

There was one more big-batch jam I made last year that I plan on repeating this season: pear walnut, using fruit from the seckel pear tree that survived last year’s weather and walnuts from the discount Middle Eastern markets we visited in Watertown, Mass. This year, I’ve started gathering fruit that’s falling from a huge pear tree in my urban building’s courtyard and need to get the copper pot going soon. I have to act fast, because finally, after years of inaction, other residents seem to have caught on to the bounty.

I spent plenty of money to make sour cherry jam from the farmers market this year, with no regrets. When I spoon into it next February, all will seem right with the world. But this year’s pear jam, as with last year’s peach, stands to cost me little more than my time. Oh, and the cost of those walnuts, of course. What last year I got in Watertown, this year I’ll get in Foggy Bottom at Trader Joe’s.