Gripping a lukewarm Heineken, Jim Gaffigan hunches his six-foot-one frame over a peeling table in the green room of the An Grianán Theatre in Letterkenny, Ireland. Summer nights are never terribly hot in these parts, but this one is warm enough to need some air conditioning, which the theater almost never uses. It’s hardly a glamorous moment. But then again, glamour isn’t really his thing.

“There’s nothing sexy about Jim Gaffigan,” he says, sweat dotting his brow. “I’m not young. I don’t have a full head of hair. I’m out of shape. I don’t talk about having dinner with Kanye.”

Fortunately for him, he is funny. Just ask the more than 300,000 people in 15 countries who’ve paid an average of $56 to see his latest routine. For the 53-year-old father of five, it’s been a grueling schedule: more than 75 cities in the past year, including whistle-stops like Letterkenny, a northern community of 20,000 that was once lauded as the Republic’s “tidiest town.”

They may not offer much sizzle, but places like this are the lifeblood of Gaffigan’s business. He has raked in $30 million this year, putting him at No. 3 on Forbes’ list of the highest-earning stand-up comedians. Half of that was earned by putting “butts in seats.” The rest comes from spreading his punch lines far and wide. And in this business, if those jokes are funny enough—and your reach wide enough—you can fill a lot of seats with a lot of butts. With the right distribution deal, those jokes can deliver exponential returns. But that’s where it gets a bit tricky.

“In the entertainment industry, every house is made of ice and it’s melting,” Gaffigan says. “So you’d better be building a new house.”  

Gaffigan’s been building. In 2016, he agreed to partner with Netflix, the industry’s dominant force and home to original specials from all but one of the comedians on Forbes’ ranking. Last year he cut loose from the kingmaker and placed a bigger bet on himself, pairing up with Comedy Dynamics, an independent producer, to release his next special everywhere but Netflix. 

Gaffigan will star in the first original stand-up special on Amazon, which is going after the streaming giant with a push into comedy. Quality Time goes live today, and it can be shopped on the open streaming market when its exclusive run with Amazon Prime Video is up in two years. And that market is only expanding.

Gaffigan has learned a bit about home building in the entertainment industry. He cut his teeth on the club circuit in the early 1990s, when HBO was the primary destination for stand-up specials and Comedy Central was a fledgling cable network. In 2000, he landed what was then the holy grail of comedy success—a broadcast sitcom—which was the source of the fortunes the creators of Seinfeld and Roseanne minted once they had enough seasons on the air and could sell the series into syndication.

Gaffigan’s shot proved to be short-lived, but six years later he scored a second chance and headlined a Comedy Central special called Beyond the Pale. This time it paid dividends, landing him his first theater show a month later. The butts were now coming to the seats, and while his rise was live, in person, with microphone in hand, his breakout was digital.

At the time, YouTube was changing the rules of the game, providing comedians a global platform with unprecedented distribution. Then Twitter emerged, giving comedy bookers a real-time assessment of who was attracting audiences. Then came the debut of streaming on Netflix, which latched onto comedy as a cheap and effective way to lure subscribers, while some, notably the now disgraced Louis C.K., used streaming to control their own distribution, making their shows available for fans to purchase directly.

“It was a technological wave that crashed over the stand-up world,” says Wayne Federman, a comedian and professor of the history of stand-up at the University of Southern California. “And we’re still all trying to figure out what’s going on.”

Gaffigan’s first original Netflix special aired in 2017, long after the company had reshaped the industry. It was a promising place to be: Aziz Ansari and Ali Wong were propelled into superstar status through their Netflix specials, while household names like Dave Chappelle and Jerry Seinfeld reportedly cashed in with $60 million (Chappelle) and $100 million (Seinfeld) paydays in exchange for long-term, multi-program deals. Gaffigan’s first special, Cinco, sold for a more modest seven-figure sum.

It was more than just a check; it was access to a potential audience of nearly 94 million. Although Netflix’s subscriber base has grown since then, so has its stand-up library. The platform now shops nearly four times the number of original stand-up specials than when Cinco debuted. That makes it harder to stand out in the scroll. Plus, the streamer often holds onto specials in perpetuity, including Cinco. The up-front money is nice, but there is no ability to earn on the back end. 

Gaffigan used his next special, 2018’s Noble Ape, which was directed and cowritten by his wife, Jeannie Gaffigan, to test the waters. Comedy Dynamics bought the rights and made it available everywhere Netflix wasn’t. It had a theatrical release and could be purchased and rented on multiple services, including  iTunes, YouTube and Walmart’s VUDU. Later, there were short streaming windows on Comedy Central and Amazon Prime. According to Comedy Dynamics CEO Brian Volk-Weiss, it was even syndicated to planes and cruise ships. The up-front payment to Gaffigan from Comedy Dynamics was lower than at Netflix, but the wide distribution allowed him to earn on the back end, bringing in a total of $10 million, according to Forbes estimates.

And new services are on the way from Apple, WarnerMedia, NBCUniversal and Disney, any one of which could choose to pursue cheap-to-produce and popular stand-up specials. 

Because of this widening field, stand-up specials may have more life (and revenue) in them, and that could be good for comedians looking to gamble on their success with deals that offer back-end participation. “We have titles in our library that are making more in year 12 than they made in year one,” says Volk-Weiss, whose company also owns specials by Bob Saget, Iliza Shlesinger and Janeane Garofalo.

Still, leaving Netflix means walking away from a partner that has now established itself as a formidable entertainment company. Netflix has some 180 original hour-long stand-up specials and is singularly focused on exploiting content around the world. Gaffigan, though, is content to keep the bet on himself.

“In the entertainment industry, every house is made of ice and it’s melting. So you’d better be building a new house."

In the stuffy backstage room in Letterkenny, Gaffigan reviews some of the new material he tried out on stage. A joke about Ireland’s nonsensical roads killed it. He stumbled with a bit about the English. The classics played well—“My dad never went to a parent-teacher conference; my dad didn’t know I went to school.”  

And he’s well aware that Amazon’s core mission is to sell stuff, even though it has won critical acclaim for shows like The Marvelous Mrs. Maisel and Transparent. With plans to deliver three more specials over the next five years, he’s got time to see just how good a partner the retailer might be. Along the way, he may decide it’s time to find a new neighborhood.

“The reason I went to Amazon is to expand my audience,” he says. “I don’t know what they’re gonna do and I don’t fully understand their marketing might. I might be pleasantly surprised. I mean, it’s a huge corporation. They could probably make more selling socks.”

Get Forbes’ daily top headlines straight to your inbox for news on the world’s most important entrepreneurs and superstars, expert career advice, and success secrets.