POLYANYTSYA, Ukraine — Children in puffy snowsuits waited patiently to board the ski lift, clutching their poles. Some families rode to the top just to breathe in the crisp mountain air and walk between the tall pines that framed the valley below.

Ski instructors in red onesies guided students down bunny slopes coated with snow churned out by machines, as the real stuff has been in short supply throughout Europe this winter. Teenagers let out delighted yelps as they slipped on the ice of a nearby skating rink.

It was almost easy to forget that this idyllic scene — at the Bukovel ski resort in the Carpathian Mountains in western Ukraine — was unfolding in a country at war, with pitched fighting between Ukrainian and Russian forces playing out on front lines a few hundred miles away.

Some of the Ukrainians on the crowded slopes were trying to escape the stresses of life under siege. Some were simply trying to find a place to work with somewhat reliable electricity.

“It’s a way to get normal life back,” almost an act of defiance, said Yana Chernetska, 30, who came to the mountain from Odesa for a few days with her 4-year-old daughter and her husband. “No missiles should stifle a normal childhood for my child.”

But for others, the battlefield was never far from their minds.

Taras Bihus — mentally and physically battered from his months as a soldier in the east — was hoping to rest and recuperate at the resort.

Before the war, he said, the mountains were like home for him. He spent winters learning to snowboard here, eventually competing professionally. Then he became a snowboarding instructor at Bukovel, in the village of Polyanytsya. But when the war began, he volunteered for the military.

After a few months of training, he was sent to the county’s southeastern front. He struggled to describe what he saw.

“You may seem ready,” he said, “but you see a very different reality when you get there.”

He was discharged from active duty this past fall when an old snowboarding injury flared up and left him barely able to walk. After some physical therapy, he returned here in December to resume work as an instructor.

“It’s everything a person needs to stay sane,” Mr. Bihus, 29, said of working at the resort. “Here, it’s like paradise. When you go up the mountain, you see the clouds rolled out right in front of you.”

Many who visited Bukovel in mid-January reflected on the complexity of being here as the country remained under siege.

Last year, near the start of the war in February, she fled to Italy, where she has been living with her two children apart from her husband, who like most Ukrainian men of fighting age is unable to leave the country.

“I was here two years ago and it was completely different,” she said. “Everybody was happy, people drank mulled wine. Now, a lot of people have moved out of the country.”

While Bukovel is the flashiest of Ukraine’s ski resorts, the more rustic alternative is the nearby ski resort of Dragobrat. It is accessible only by an unpaved road whose successive hairpin turns climb steeply toward the mountaintop, but with the snow at last falling heavily at the start of January, families were flocking to its slopes.

Artem Mitin, 35, who owns a ski shop on the mountain, said the clientele had changed. Eastern Europeans were not coming. Neither were large groups. And there were many newcomers.

“It’s not just about skiing,” he said, adding, “I think they come here to forget.”

One recent afternoon, a husband and wife, both soldiers, were snowboarding on the last day of a short vacation with their twin sons. They said it was a way to relieve some tension but added it would be difficult to leave the mountain, given the uncertainty about when they would all be together again.

At the start of the war, many Ukrainians fled frontline areas for the relative safety and stability of the Carpathians, far from the constant threat of strikes.

In the autumn, Russian attacks on civilian infrastructure throughout the country crippled the national power grid and left residents grappling with near-constant air-raid alerts. The threat of aerial attacks forced many to flee regularly to bomb shelters, making remote work difficult. That brought a new wave of people to the mountains.

The ski resorts in the area combated the rolling power outages by using powerful generators that allow them to make snow, operate the lifts and light the runs — and allow people to work.

At the Baza Smart Hotel in Bukovel, dozens of young creative types and I.T. professionals gather daily in a restaurant that has become a makeshift co-working space. Electricity is powered by generators, and even when it goes out, a backup satellite internet connection allows them to stay online. Sirens rarely blare.

“It’s really like an island of stability in all of this,” said Lera Diachuk, a graphic designer who has been working from the hotel for weeks. “We are trying to live our lives and do our best to work.”

Ms. Diachuk, 23, works for Headway, an education technology start-up that moved staff members this past fall from its office in Kyiv, Ukraine’s capital. Each employee was allowed to bring a plus-one, so Ms. Diachuk brought her 14-year-old brother, who had fled their family home in an occupied area of the Kherson region. Their parents remain behind.

Mr. Bihus, the soldier, is renting a room for the winter in one of the peaked wooden cabins that dot the mountainside, living with other snowboarders.

But after his battlefield experience, he finds it hard to identify with his old friends. They see him as a hero, but he feels uncomfortable with that notion.

“There is a gap between us,” he said.

He does not feel like a hero, he explained, as he rubbed the wooden beads of his bracelet between his finger and thumb, until they rested on a small cross. Before the war, he said, he had not prayed since he was a child, but he started again on the front line.

Mr. Bihus is now in the army reserves, so if there is a full-scale Russian offensive in the spring, as many have predicted, he may be called back into service.

But he tries not to think about that. For now, he is focusing on simpler things: hiking the mountain trails, swimming in cold mountain streams and reading more.

On the afternoon of the Orthodox Epiphany celebrations, he walked to a lake on the edge of the village to take part in the annual tradition to mark the baptism of Christ.

He crossed himself as he walked slowly into the frigid water, drawing in a sharp breath before he submerged himself fully. He burst back through the surface with a heavy exhale, slapping his arms and legs.

As he emerged, Mr. Bihus said with a laugh, “It’s healing for the body and healing for the mind.”

Oleksandra Mykolyshyn contributed reporting.