A new sound wafts through the open windows at night in this town near the front line: children hollering at each other down the block, even long after dark.

The markets are full. Sales are surging at the local bike shop. Red tulips, planted by hand, are bursting open everywhere.

It is remarkable — “Unrecognizable,” one city official said — how different this small town in eastern Ukraine feels from a year ago. Last summer, Pokrovsk was a spooky landscape of boarded up houses and bushy yards. No one was around. Now it’s hard to take a few steps without passing someone on the sidewalk.

Nothing has changed outside Pokrovsk. The front line is still 30 miles away. Ukrainians are still dying in droves. One of the biggest armies in the world, that of the Russian Federation, is still bombing cities while they sleep and trying to take as much territory as it can, at a terrifying cost.

But what has changed — and it reflects something broader happening in small towns across this vast country — are people’s calculations. How much danger are they willing to accept? What is the best for them and their families? How should they accommodate the war on a daily basis? The answers to these questions seem different this year, and without consulting each other, many people have reached the same decision.

It is resilience, yes, but perhaps also something a little less shiny: resignation.

“The war is here. There is no safe place in Ukraine. So you might as well get on with it,” said Dr. Natalia Medvedieva, a family doctor who tried living in a safer place in western Ukraine with her son but came back here a few months later.

And home is home.

“It’s hard to describe what is so special about home,” said Pavel Rudiev, an engineer at Pokrovsk’s small train station. “It’s where everything is familiar, where you know people, where you have friends.”

When Russia invaded Ukraine in February 2022, this principle didn’t hold. More than 13 million Ukrainians — a third of the country — fled from their homes. But as time went on, it became harder to stay away.

“I was running out of money,” said Iryna Ilina, a fitness instructor and beautician, sharing a common struggle of the displaced. She recently returned to Kramatorsk, another city not far from the front line where she owns an apartment. She was having trouble covering her rent in Pavlohrad, the safer city where she had been staying.

Many people said that when they were displaced, it was hard finding work. “And I need to work,” Dr. Medvedieva said. “I have my life.”

Since last summer, at a pretty steady rate, Ukrainians have been returning. More than 5.5 million have gone home, according to the International Organization for Migration, and not just to large cities like Kyiv, the capital, or Dnipro, but to small places as well, even those right behind the front line.

Of course there’s concern. Dr. Medvedieva keeps a bag packed with her documents, money and some clothes. Viktoriia Perederii, a veterinarian, who returned to Pokrovsk last year after trying to live in central Ukraine, said that many families bring her their pets to get clean health certificates for international travel in case they need to leave in a hurry.

“It’s difficult to evaluate the risks,” she said. “There is no safe place in Ukraine. Look at Uman,” she added, referring to the recent missile strike that killed 25 people in a city that, until that moment, many Ukrainians had considered perfectly safe.

At this time of year, Pokrovsk is basking in spring. White cherry blossom petals delicately flutter through the air and pile up along the curb in handsome drifts. The long side streets, lined by modest one-story homes with peaked roofs, smell of freshly turned earth. In the gardens out front, women in aprons and headscarves plant flowers — not something you do if you’re about to pack up and flee.

“Business is good,” said Larysa Titorenko, a seed vendor at Pokrovsk’s busy central market. Her racks of happily decorated packets were moving fast — marigolds, melons, radishes, carrots and about eight varieties of cucumber.

Then tears flashed in her eyes. Her daughter’s house had recently been destroyed in a frontline town not far away. “I’m OK, really,” she insisted, wiping her eyes with her sleeve.

This duality is everywhere. People in war do something that most in the world don’t have to — they keep two big thoughts running in their heads at all times: live life as fully and richly as possible and, at the same time, plan for it to be turned upside down.

Since last summer, the Russians have sliced away at Bakhmut, pushed closer to Avdiivka and leveled Marinka — all towns about an hour’s drive away. The front line is inching closer. You constantly hear dull thuds, almost like doors closing.

But people carry on as if it’s a faraway thunderstorm. At a pond-side park near the town center, teenage girls make halos out of dandelions, as they have for eons, and TikTok dance videos.

Nearby, men pump iron at an immaculate outdoor gym with rows of high-quality weight machines, exercise bars and even padded arm-wrestling tables. With wide stances, they strut around, cheeks red, chests puffed out. If you Photoshopped out the occasional tank getting towed past on a car carrier, it might look like California.

Pokrovsk is a miner’s town; many men here dig coal for a living. Before the war, the population was about 50,000. It dipped to around 30,000 last spring, when so many people across the country fled west. Now it’s back up — to 57,000, actually, said Serhiy Dobriak, the head of Pokrovsk’s military administration. Beyond the residents who have returned, others from surrounding hot spots, Avdiivka or even Mariupol, have flocked in.

Before the war, Pokrovsk had big plans. A billboard rising from a muddy intersection shows a schematic drawing of new office towers and lots of lights. “But we got to be realistic,” Mr. Dobriak said. “We will most likely be a militarized zone.”

No one here expects the war to end soon. “Years” is the reigning prediction. Some worry that the acceptance of it, this notion that life should go on regardless of it, means there will be less pressure to end it.

A military convoy chugged past an intersection, leaving behind a wake of diesel haze. Not far behind, a boy pedaled furiously on his bike, determined to catch up to his friends.

It was evening, warm, and the air was crisp, feeling wonderful on exposed skin. It is such a magnificent time of year that no one wanted to go inside, even with curfew approaching.

Olha Kotiuzhanska contributed reporting.