DAEJEON, South Korea — It had been more than a decade since Choi Kun last set foot in a nightclub.

There are things you don’t do as a married man with children, the 42-year-old said — and going to a nightclub, which in South Korea often entails waiters bringing over female patrons to tables of men, is most certainly one. But on a recent night, his friend had dragged him to a club in Daejeon, a city an hour south of Seoul.

When they arrived at Nightclub Seven, though, they were in for a surprise. To enter, bouncers explained, they would have to scan a QR code — a “quick response” code of dots and squares on smartphones — containing the patrons’ personal information.

How do you safely resume nights of dancing, drinking or karaoke at a time when the threat of a deadly, highly contagious virus still lingers? South Korea, which saw a possible end to its coronavirus outbreak derailed when an uptick in infections last month was blamed on clubbing, is trying out a mandatory high-tech registry for nightlife establishments.

Beginning Wednesday, everyone visiting high-risk places including clubs and noraebang, as popular private-room karaokes are known, will be required to scan a QR code that will log their information into government databases. The measure is also being rolled out for certain gyms, concert spaces and restaurants. In all, more than 80,000 businesses across the country were being mandated to implement QR code scans.

Other governments around the world, including Singapore and New Zealand, have also turned to QR codes as part of their coronavirus control efforts. In the U.S., Apple and Google joined forces to create an anonymous, voluntary notification app allowing health authorities to alert those who may have been exposed to the virus.

In South Korea, the data — visitor’s name, phone number, the establishment visited and time of entry — will be encrypted and stored on two separate servers, only to be combined and accessed in the event of an outbreak, authorities said. The information will be deleted after four weeks.

Choi, who had happened upon a club that had implemented the QR code system a week early on a trial basis, had his misgivings.

“I’m not so sure it’s a good thing. What if the information gets out?” he said. “If you’re of a certain age and with a family, you’re not exactly proud coming to a place like this.”

He and his friend nonetheless stumbled through the process of loading the QR code on their phones and scanned them on tablets installed at the entrance before entering the club. They had, after all, taken a 40-minute cab ride to get there.

The rollout comes after a cluster of cases emerged in bars and clubs in Itaewon, a nightlife district in Seoul. Chains of infections radiated throughout the capital’s metropolitan area of 25 million people. The clubs had kept written logs of customer information, but when health officials looked through them to track down potential infections, they discovered much of the information was inaccurate or incomplete.

Detailed contact tracing, based on cell tower information, credit card data and CCTV video, has been at the center of South Korea’s coronavirus response, which has been held up as a successful model around the world. But in the case of the club outbreak, of the nearly 5,000 who’d written down their names and phone numbers, authorities were able to track down only about 40%.

In recent days, South Korea has reported 30 to 60 new cases daily, mostly in Seoul and surrounding areas, keeping the country vigilant as it struggles to track and stamp out new clusters. As of Wednesday, about 1,000 people were still actively battling the virus, of about 12,000 total reported cases.

Choi and most of the dozens of others who arrived at the Daejeon club on Friday night, the first weekend the QR code scans were being used, were unaware of the new requirement. Most were confused about downloading the app and signing into it.

“Can I do it next time?” a woman asked before begrudgingly complying. “It’s taking too long,” her friend complained. The two plodded through the process for about five minutes before making it into the club.

Still, most customers appeared willing to subject themselves to the scan for a night of fun. A pair of men — co-workers who said were in town on a construction project — headed elsewhere, because one of them had forgotten to bring his phone.

Inside, a few customers wearing masks bopped around in the glow of disco lights on a largely empty dance floor. Fewer than one-tenth of the club’s couple of hundred tables were occupied. The DJ, nodding along to the beat, occasionally bellowed into the mic reminding revelers they were required to keep their masks on.

The club’s manager, who gave only his last name, Kim, said that over the first few days, 30 to 40 customers left at the door rather than comply with the scan. The measures, he said, were adding to the business’ woes. The club lost about $100,000 in revenue in May, and some of its 80 or so employees were having to pick up work at nearby construction sites to make ends meet.

Business was similarly scant at Ahn Jong-suk’s karaoke in Seoul, another of the establishments on an early trial of the QR code system.

About 10 p.m. on a Thursday night — usually the peak time for his noraebang, when office workers come stumbling in, buzzed, after a few drinks over dinner — only one of his dozen or so rooms was occupied. Ahn had invested his own money in a $1,100 thermal imaging camera and a $600 disinfecting fog machine, hoping that would assuage customers’ virus fears, but few were showing up to sing.

As for the QR code scans, older patrons less versed in using their smartphone struggled, and some turned around and left, he said. Even so, he said he believed it was a necessary step to return to something like normal city life.

“It’s for you and for me and for everybody,” he said. “It’s a good thing,”