As the photographer snapped the shutter, the man drinking a pint of Guinness in the front booth of John Kavanagh “The Gravediggers” pub held a newspaper up over his face, annoyed.

“Oh no,” said Anne Kavanagh, the front-of-house manager. “Don’t take pictures of the locals. They don’t like it.”

There are many quirks about Gravediggers, as it’s locally known, that make it unique. In order to keep the bar as close to its original appeal as possible, there’s no singing or dancing allowed, and there’s never been a telephone or a TV. It has its own myths and ghost stories, as well as tales of friendships and family strife, all passed down through the eight generations of the Kavanagh family who’ve run the pub since it opened in north Dublin in 1833.

Today, four of the seventh-generation Kavanagh siblings – Anne, Ciaran, Anthony and Niall – and their mother, Kathleen, manage the business. The pub got its nickname because it’s built into the wall of Glasnevin Cemetery – famous for being Ireland’s first cemetery where people of all faiths could be lain to rest – and gravediggers frequented the spot after a long nightshift.

The original section of the pub, situated on Prospect Square at the eastern edge of the graveyard, is dark and compact. It still has the original countertops, now moved back a couple of feet to accommodate more drinkers. The flooring is so caked over with Guinness and tobacco stains that the wood has bubbled in places.

“Three years ago, Lonely Planet put us at number 47 out of 50 hidden treasures of Europe,” Anne told me. “That was a huge thing for the business. People were curious to see why.”

Anthony Bourdain was curious too, as was Bizarre Foods’ Andrew Zimmern. But long before John Kavanagh’s – as the pub was originally named, after its proprietor – attracted the world of famous foodies, it was a drop-in spot for anyone attending a funeral at Glasnevin Cemetery next door, or their gravediggers after the coffins were covered.

The pub did occasionally attract a celebrity or two, however. In 1984, the lead singer of Irish folk band The Dubliners, Luke Kelly, died. He was to be buried at Glasnevin with all the pomp and circumstance awarded a well-known musician. Ciaran was 14 at the time, the youngest worker at the pub, and was washing glasses when everyone started rolling in – U2, The Chieftains, the rest of The Dubliners – and they came bearing instruments.

“They started to clear their throats and began playing music,” he remembered. “My dad, Eugene Kavanagh, went out there and told everybody that they couldn’t have any music or singing. ‘We don't allow it,’ he said. It would have been the best session ever, and especially in the pub that didn't have any music, it would have gone down in legend. But that was the rule – it’s a place to just drink, it’s always been about the drinking.”

Perhaps it’s this dedication to tradition that’s kept the local, no-frills watering hole in business for 183 years.

In 1831, the property was purchased by hotelier John O'Neill who later sectioned off the house, selling the main frontage to the cemetery and making the ground floor a public house and the first floor a family home.

In 1833, when John Kavanagh married O’Neill’s daughter, Suzanne, O’Neill gave the pub to them as a wedding gift. The tavern thrived. Coffins and hearses sat outside while bereaved family and friends drank away their sorrows, sometimes forgetting to get to the actual graveyard. In fact, according to Glasnevin’s resident historian Conor Dodd, Dublin’s cemeteries committee brought in their own bylaw that restricted burials to occur only before noon (now moved to 3 pm), which hoped to eliminate the number of people who were showing up drunk to funerals – or not at all.

Eventually, Joseph Kavanagh – John’s son – threatened to take the City Council to court because of lost earnings, but it was for nought, because Glasnevin closed the east gate into the cemetery in 1878.

“That was our main revenue,” said Ciaran, who is now the head chef. “So in 1870, we started losing a lot.”

Joseph, then a young man, eager to keep his father’s legacy going, put a skittles and shooting range in the back alley to try to lure back customers. He handed out flyers at the cemetery’s new main gate, and business began to pick up again. And it’s this creative thinking that’s allowed the Kavanaghs to keep their pub open for almost two centuries.

By 1920, Josephine “Josie” McKenna Kavanagh – who ran the pub for an astonishing 23 years – introduced a grocery to the bar. In the 1980s, Eugene Kavanagh built a lounge onto the pub, the first on the north side of the city. And in the early 2000s, Ciaran introduced food into the establishment, starting with a lunch menu and moving into evening tapas.

“As soon as you could stand on a box, you could pour pints and wash glasses,” Ciaran recalled, reminiscing about growing up at Gravediggers. “We all did it.”

Sadly, Eugene passed away last year from lung cancer, leaving his wife, children and grandchildren to keep Gravediggers afloat. But the love and respect for him was still palpable as I sat, feasting on Ciaran’s famous Irish spring rolls and observing the latest generation to run the locally adored establishment. Eugene’s portrait hung over the lounge back bar where Niall served a pint, and Anne, close by, chatted with the regulars while soothing her sister’s week-old daughter, Charlotte, in her arms – the latest generation of Kavanagh’s.

If you liked this story, sign up for the weekly bbc.com features newsletter, called “If You Only Read 6 Things This Week”. A handpicked selection of stories from BBC Future, Earth, Culture, Capital, Travel and Autos, delivered to your inbox every Friday.