(Courtesy of the Wilbur Theatre)

What’s the secret to Kumail Nanjiani’s standup comedy success? Well apart from the table stakes (being hilarious), he’s also had high-profile acting roles on “Silicon Valley”—as Pied Piper’s co-CTO—and on “Portlandia” (fans will remember him as the cell store guy and the burger waiter).

But people don’t always realize he’s also a comedian, or know his name because of his “Silicon Valley” stardom, Nanjiani told me this week. “They know me as Dinesh,” he said.

So here’s his real secret: In his spare time, he hosts a podcast about video games and another podcast about a ’90s cult sci-fi TV show. Obviously.

“With podcasts, [fans are] connecting with you directly, and with touring that really helps,” Nanjiani said. “You get an audience that is really synced up with your interests—you get people that are like-minded in a lot of ways.” And now, whenever he’s got a show coming up, “I can just mention it on a podcast, and that reaches a lot more targeted people” than traditional means.

Speaking of his standup act: I spoke with Nanjiani ahead of his show in Boston, slated for Sept. 11 at the Wilbur Theatre. It’s part of what he calls his first full-fledged tour of larger venues—an opportunity opened up by his “Silicon Valley” notoriety (though Boston will be one of the more intimate shows).

Podcasting has paid off in other ways for his career in show biz, too. We talked about that, a recent role that wigged him out a bit, and his thoughts on the real-life Silicon Valley. Here are the highlights.

Why he podcasts. Nanjiani hosts “The Indoor Kids” (with his wife, Emily V. Gordon), which has a video game theme, and “The X-Files Files,” an episode-by-episode rumination on his favorite show (with the help of show alumni), which he launched because he had a surprise summer off. “I just figured, there’s an audience for everything, and if there’s something that really interests you, chances are it’s really interesting to someone else as well,” he said.

His recent nerve-wracking role. Nanjiani was as surprised as anyone when, not too long after he launched the podcast, word came that “The X-Files” was getting a reboot with most of the key actors and writers on board (“I’m not saying the podcast brought it back,” he joked). And then the even bigger surprise: Nanjiani was given a role in one of the episodes.

A huge thrill, sure, but also “very, very nerve-wracking,” he said.

“I found out a couple months before it. I didn’t watch an episode (of “The X-Files”) for a couple months, because I didn’t want to start freaking out,” he said. “I’d done a good job of not freaking out, and then they gave me a ‘welcome folder,’ and it was Mulder’s ‘I Want to Believe’ poster and it had my name on it. I definitely freaked out then. I called my wife and got her to talk me down.”

Nanjiani was part of a three-day shoot for the show, and says it was surreal to work with stars David Duchovny and Gillian Anderson—“larger than life icons,” he said—and interact with them like normal people. “Then you leave, and now they’re slowly turning back into these larger-than-life figures again,” Nanjiani said. “It’s weird. But I’ve kept in touch with them a little bit.”

As for the episode: It’s got a were-monster theme, but “it’s a completely different take on the monster thing—one that I’ve never seen before … It’s so good.”

His thoughts on Silicon Valley (the place). While Nanjiani says he isn’t much more knowledgable about the tech industry than the average person, he’s made a few observations. One is a comparison between the Valley and LA, where he lives: “In Hollywood, the rich people, you know who they are. The rich people over there (in Silicon Valley), you don’t know who they are.”

“You don’t hear all the stories about the startups that don’t go anywhere.”

He’s also struck by the fact that when many people think of the tech world, they assume “you think of an idea and you become a billionaire. You don’t hear all the stories about the startups that don’t go anywhere.” In a lot of ways, “Silicon Valley” (the show) has showed how hard it is to build a startup, he noted.

Nanjiani said he’s now encountered a number of people who’ve had startups in his travels. “I’m like, ‘What happened to it?’ ‘It died.’ I haven’t met anyone that had a successful startup.”