In a Christmas Day gesture of gratitude, President Barack Obama told U.S. troops that "we never take for granted" what they do to keep Americans safe and free.

Obama spoke a few days after six American service members were killed this week in a suicide attack at Bagram Airfield in Afghanistan, the largest U.S. facility in the country.

"As we know, when you're deployed overseas, it's tough," Obama said. He said that although his administration has been bringing home troops from Iraq and Afghanistan, "there are still folks over there every single day and it's still dangerous, as we saw this past week where we had some outstanding, brave men and women who were killed."

"So we never take for granted what all of you do for the American people," Obama said. "You help keep us free. You help keep us strong. Whatever service you're in, whatever branch, we are extraordinarily grateful for everything you do every single day."

The Christmas visit to Marine Corps Base Hawaii in Kaneohe Bay has become an annual tradition for Obama and his wife, Michelle, during the family's yearly vacation in his native Hawaii. The first lady and Jill Biden, the wife of Vice President Joe Biden, head a nationwide initiative to rally public support for active-duty and retired service members and their families.

Military families gather for a Christmas reception with U.S. President Barack Obama (not pictured) at Marine Corps Base Hawaii in Kaneohe Bay, Hawaii December 25, 2015. JONATHAN ERNST / Reuters

Obama said the visit is one of his and Michelle's favorite things to do "because not only are we in Hawaii for Christmas, but we're also able to say thank you on behalf of the American people." He said it isn't just the people in uniform who serve, but also the spouses and children.

Before visiting the base on Friday afternoon, Obama opened Christmas gifts and sang carols with his family at their vacation rental in nearby Kailua, about a half hour from downtown Honolulu, the White House said.

Obama also spent part of Christmas Eve placing telephone calls to U.S. service members from each branch of the military who are stationed around the world, the White House said. He thanked them and their families for serving and sacrificing for the country.

The president's quiet holiday morning followed a busy Christmas Eve in which he also exercised at the Marine Corps Base gym, took his daughters Malia and Sasha on a hike on a hike and to the beach. He capped the evening with a three-hour dinner with family and friends.

The White House provided no details on what gifts were exchanged, but Mrs. Obama spilled a few details before the family arrived on Oahu.

Mrs. Obama said during her annual holiday visit with hospitalized children that the president was getting "workout stuff." Her daughters were getting money.

U.S. President Barack Obama, with first lady Michelle Obama, delivers remarks at a Christmas reception with service members at Marine Corps Base Hawaii in Kaneohe Bay, Hawaii December 25, 2015. JONATHAN ERNST / Reuters

"They don't want me to waste my energy picking out stuff they don't want," she said. "So they'd rather just have the money."

Meanwhile, Obama, who works out at the Marine Corps Base's gym just about every morning during vacation here, acknowledged feeling a tad inadequate exercising alongside Marines.

"I generally feel like your commander in chief is in pretty good shape, and then I get next to some guy, you know, curling 100 pounds and it makes me feel small," Obama said before wrapping up his remarks and posing for photographs with the service members. "But that's OK. It gives me some inspiration. I'm going to work harder so I can keep up with you next year."