University of Virginia roomies and best buds Steve Huffman and Alexis Ohanian launched Reddit in 2005, graduates of Y Combinator's initial class. Their site, a collection of communities of everyone from cupcake lovers to perverts, made them wealthy and famous--Huffman the code-writing maestro and Ohanian, creator of Reddit's alien logo, its public face. Pressures over content and growth would split them from the company and each other. As told in We Are the Nerds, they reclaimed the helm when a series of escalating crises threatened Reddit's existence. But could they ever repair their relationship?

Steve Huffman had been seeing a therapist for a few years, and perhaps thanks to the rising tide of Silicon Valley, that individual, Cameron Yarbrough, had transitioned from mere "therapist" to "executive coach." At multiple sessions with Yarbrough, Huffman later recalled, he lamented his ailing relationship with Alexis Ohanian, and admitted that he had a litany of long-standing issues they'd been avoiding hashing out. Huffman knew that over their years of mild estrangement, each had grown even more different, but that didn't change the fact that he missed his old friend. With Yarbrough's encouragement, Huffman reached out to Ohanian.

Huffman tried to plan a dinner for them, but tracking down Ohanian and getting him to cement a plan was "a pain in the ass," he said. So Huffman saw it as a minor victory when Ohanian appeared at 5A5, a Japanese steakhouse in the Embarcadero that Huffman loved, at close to the appointed time one evening in early 2015. Once Ohanian was seated across from him, Huffman couldn't hide his frustrations. "Dude, I'm trying to make an effort and I can't get you to respond to my texts."

Ohanian, almost invariably considerate and charismatic in person, apologized. As steaks and cocktails arrived, the men began to hash out what had happened back at Reddit so many years ago when Ohanian hired contract programmers behind Huffman's back.

It'd been two years into their running Reddit within Condé Nast, which had acquired it in 2006, just a year and a half into Reddit's life. The new "corporate overlords," as the guys dubbed Condé Nast and its parent, Advance Publications, had in fact granted Reddit a great degree of autonomy. With Ohanian living in New York, drumming up press and managing the Reddit community, and Huffman in San Francisco with a meager programming staff, the site had grown nicely.

Within two years, Ohanian had moved to San Francisco, and in with Huffman, to a Mission District apartment. Though they'd lived together during college, in this new arrangement it became clear quickly that being around each other 24 hours a day wasn't healthy. They got along personally, for the most part, but their passions at work weren't in sync, and when they disagreed over whether to use their meager staff resources to bolster the site's technological back end (Huffman) or build new, splashy media components (Ohanian), Huffman's core team sided with him. Ohanian didn't accept losing well. "We'd have some blowup fights at the office," Huffman said. "I remember being pissed leaving work. I would drive us home and I remember not speaking to him in the car. That's when things were starting to deteriorate."

The pair weren't confrontational, so this and other long-standing disputes had festered--and then scarred over. In 2009, once their contracts allowed, they each left Condé Nast. But in just over a year, Huffman asked for Ohanian's help launching another brand. It would take on Kayak's travel search engine, and rank flights by the "agony" their itineraries induced. He called it Hipmunk. Ohanian mocked up a charming little chipmunk mascot in aviator goggles, and took a position doing marketing for Hipmunk. He engineered a successful press launch--one of the buzziest in Y Combinator's history. And then he was dismissed abruptly at a meeting in a Manhattan bar by Huffman's co-founder, Adam Goldstein. "When I left Hipmunk, I pretty much left my relationship with Steve," Ohanian said.

On September 6, 2011, Reddit's general manager, Erik Martin, posted on Reddit's blog that Reddit was no longer "a division of Condé Nast," and instead would stand on its own as Reddit Inc., under the greater umbrella of Advance Publications. The post explained that the new arrangement would set up "reddit so that it can better handle future growth and opportunities." He cited a statistic that when Reddit had been acquired in 2006, it received about 700,000 page views per day. As of the post, Reddit regularly got that much traffic every 15 minutes.

From his perch at Hipmunk, Huffman read Martin's post and seethed. He realized almost immediately that Ohanian had likely been involved in the spinout. He knew his former co-founder, his former best friend, had been there, having somehow inserted himself into the Condé Nast bureaucracy they'd once together bemoaned. As Condé Nast had made these plans, Huffman hadn't been asked for advice. After reading the post, he felt waves of anger and embarrassment hit him: He'd been intentionally kept in the dark for, what, months? Years? There were pangs of jealousy at the fact that Ohanian would be returning to serve on Reddit's new board. Over days and weeks, Huffman dwelled on the situation, and came to the realization that Ohanian must have received shares of Reddit in an agreement to lock in his board position. That fact didn't just sting; it burned.

"You didn't even tell me you were going back," Huffman said to Ohanian, at the steakhouse years later. "Meanwhile, I wanted to be back, and then I almost felt like you were keeping me out." As the men talked, a central, unspoken question hovered above all else: Could they even trust each other? That's how distant Ohanian and Huffman had grown. They agreed to meet again for dinner.

As the pair swapped stories and spoke about specific points of tension during that second dinner--at a place Ohanian chose that specialized in seafood, which Huffman hated-- Huffman began to remember why they'd become friends in the first place. They shared a worldview, and, beyond the alienating scaffolding each had erected around the other in supposition and years of relative silence, they still liked each other. Even 10 years later. Huffman and Ohanian gingerly began circling around another massive question: Could they ever work together again?

On Friday, July 10, 2015, Ellen Pao posted her letter resigning from her position as interim chief executive of Reddit. Hired first as a consultant, and later brought on as an executive, she'd been at the company's helm for eight months, ever since her friend Yishan Wong had abruptly bailed from the CEO position after the company had been battered by controversy after controversy, under a set of circumstances he'd later call "unbelievable because it is so weird."

Huffman and Ohanian met for an early lunch at Super Duper Burgers on San Francisco's Market Street. It was going to be a hell of a day, so they each inhaled a locally sourced, organic burger. They were to meet Sam Altman, a Reddit board member and the 30-year-old president of Y Combinator, outside the front door of 101 New Montgomery at noon. Altman was to usher Huffman, Reddit's original creator, up into HQ to meet his new employees. As of this day, he was chief executive of Reddit.

Huffman, upon agreeing to step in after a botched dismissal of a beloved employee had caused the site's volunteer moderators to mutiny, had been given the decision by the board over the past week about what role Ohanian would play in the future of Reddit. "If you want to work with Alexis, that's awesome. I'm perfectly comfortable if you say no," Keith Rabois, a board member, recalled to Wired that he'd told Huffman. Once in front of the Reddit office, the three men shook hands, and Ohanian and Altman accompanied Huffman past the doorman and into an elevator to the fifth floor, where the three went straight to a small conference room and shut the door. Pao was already inside. She had a list of journalists' names and numbers they were to call.

Within minutes, a handful of reporters fired questions at the incoming and former CEOs of Reddit. Altman did a lot of the talking. It was easy for him to hype Huffman to the journalists on the phone, since he had long respected him both as a programmer and a leader. Plus, the potential magic of the comeback story was not lost on Altman. "He actually built Reddit. He wrote the code," Altman said into the speaker at the center of the table. "The chance to get that back was so special."

It was professional, clean, and cool. Somehow, everyone managed to keep their answers to the questions about Pao's departure positive. "She did an incredible job," breezed Altman. "She stepped into a really messy situation." When Kara Swisher of Recode cut in and asked Pao directly whether she was fired, Pao managed to force out a laugh. "Thanks for getting right to the point," she said, reiterating that she had resigned because of the board's aggressive growth goals. She said that her departure was a "mutual decision" between herself and the board. (She'd later allege in her own book that a board member had threatened her that if she didn't resign, they'd "go to Plan B.") Across the table, Huffman's skin was crawling. "I was just thinking, god, this is very awkward," he recalled later. "It's kind of like being in a room with your ex and your new girlfriend or something."

His heart was racing. The panic wasn't just a response to the reporters on the phone, or simply to being in the same room as Pao. Rather, it was in anticipation of the moments that would come once the phone was hung up, once the four of them took the elevator one floor down. In just moments, he'd need to stand in front of nearly the entire staff of Reddit, only a tiny handful of whom he'd ever met, and address them en masse. He'd need to begin to build these individuals' trust. He'd need to inspire them.

He felt moisture begin to accumulate on the surface of his skin as he stood in the elevator with Altman, Ohanian, and Pao. When the doors opened on the fourth floor, he was a deer in headlights: The entire staff was already gathered. He stood and breathed deeply for a couple minutes as Pao spoke first, delivering prepared remarks. Her words were a shock to many junior staffers, who'd heard her repeat over and over in the past 10 days that she would not resign. To Huffman, her words were a blur. "This is almost over," he told himself in order to cope. "Someday, this will just be a memory."

Huffman panned the crowd of unsmiling faces and realized that each of these people had been through a week of hell, too. Heck, a year of purgatory for some. He'd be their third CEO in nine months. He'd prepared a speech but didn't want to read from a piece of paper. So he ad-libbed, introducing himself, detailing his history, and explaining what he wanted to see out of Reddit. It was not a slam dunk. He came across as enthusiastic--if a little terrified.

Some employees were unimpressed by his words, which included multiple notes on issues that needed immediate fixing. To others, they felt critical, arrogant: the Ultimate Creator of this thing telling everyone in the room they were screwing it up. "It just rubbed a lot of people the wrong way," a former staffer said. "They were like, fuck this guy."

To Huffman, the crossed arms and dour expressions were a shock. He'd just left Hipmunk, where his longtime employees offered up encouragement and hugs. "That was not what I got at Reddit," he said.

Other employees saw in Huffman's words and tone a laser focus on product, a specific set of goals in mind. "You could tell there was motivation, you could tell he was very intent on being back, and he had the confidence that he was ready to do it," said Stephen Greenwood, a video producer.

Huffman took a few questions from the gathered staffers, including one about Pao's ban of hard alcohol in the office and moratorium on work events whose sole activity or focus was drinking: "So, are we allowed to drink now?" Sure, Huffman said. His philosophy was: "I'm not gonna work at a company where we're gonna treat you like children. We're gonna treat you like adults, and in exchange, I want you to act like adults and look out for one another."

By the time Huffman was done introducing himself and making his attempt to rally the team, Pao had already left the building. Despite having announced that she'd stay on as an adviser, she would not be seen at 101 New Montgomery again.

Huffman grabbed his laptop and logged in to Reddit as u/spez, his longtime primary account. Already, questions were waiting for him. He typed a greeting into the comment box and then answered Redditors' questions for the next 15 minutes. Huffman realized he wanted to immediately make good on his goals, to meet the team, to make all that was wrong right. He swiveled his chair around and introduced himself to the first staffer he saw. "Hey, I'm Steve." The employee looked at him and grunted, "Hmm." Huffman stared for a moment, then turned back around to his computer. It took every ounce of restraint he could muster not to fire the guy on the spot. Instead, he tried again. He turned to the person at the next computer. "Hey, I'm Steve." It worked. "I'm Jack," said an engineering team leader, Jack Lawson. They struck up a friendly conversation. That afternoon, Huffman shook hands with and introduced himself to about half of the 65 staffers. Turnover was high in the months following Huffman's return: About 50 staffers left. But Reddit also began a significant hiring tear, and it had more than 150 employees by the end of 2016.

Ohanian's new job's best description might have been "salesman emeritus." His title was just "co-founder." In flashy sneakers and T-shirts, Ohanian had begun serving as a jet-setting hype man. "He likes to travel, he likes to speak, he likes to talk about Reddit. I think 70 percent of the population just really falls for his charms, and many of them are CMOs," Huffman joked, with a little grin. "That works out great."

Zubair Jandali, Reddit's dynamic chief of sales, had informally dubbed Ohanian "chief bullhorn." One of Ohanian's big successes was working with the producers of the sci-fi tech dystopia show Mr. Robot. During its third season, which aired in 2017, they pulled off an elaborate integration in which there were nods to Reddit on the show and, simultaneously, clues from the show unfolded in subreddits online.

Months later, in mid-2017, Ohanian would visit South Korean consumer electronics giant Samsung in New York City to try to establish the framework for a $10 million partnership deal, the very morning after his pregnant fiancée was featured wearing only a thong and a silver belly chain on the cover of Vanity Fair.

"Oh, that," Ohanian said when the cover was mentioned in the Samsung lobby. It was a long and glowing story focusing on his courtship and pregnancy with Serena Williams. The pregnancy had come to light the past April, when Williams made public what appeared to be intended as a private Snapchat pic of herself in a swimsuit with a tiny midsection bulge labeled "20 weeks." Ohanian has said he'd been reluctant to participate in big, splashy, overtly personal press, but was game to do whatever Williams wanted--and she had already decided to participate in the story.

"You'll always be her assistant," joked Ohanian's longtime assistant, Elisabeth Garvin. Ohanian threw Garvin an almost undetectable side-eye, and joked about the magazine photographs: "It killed a couple birds with one stone. I'd been meaning to schedule both engagement and maternity photo shoots for Serena. Now we have both--taken by Annie Leibovitz."

Two years after those awkward dinners, each of the men said he had finally accepted the other for the person he had become. Ohanian deferred to Huffman on business matters--gone was his mandate of "let Alexis be Alexis." Ohanian grew to appreciate his new position: Making money and converting traffic to money were clear goals, something he'd never had before at Reddit. Huffman had come to accept Ohanian's wild, jet-setting lifestyle, and had even become prone to smile at his appearances on magazine covers and talk shows, which had accelerated thanks to his extraordinarily famous fiancée.

Perhaps most encouraging for their relationship, the pair had again begun to banter like brothers. They were not together in the office a lot, but when Huffman was asked how working side by side was going, he was so comfortable that he went straight for a joke: "Smells so good, I can't concentrate." Ohanian laughed, too: "People have given me really great feedback on that." They're not best friends, and they are perfectly fine with that. They had, after all, lived together on and off for eight years. They had their finances intertwined for years. Their legacies were still tied together, in Reddit.

In the future, making decisions that are good for business is perhaps the biggest change Reddit faces--though Huffman was poised to walk into that wind. Reddit had improbably survived a decade of management lax enough that its communities spiraled out of control--and now everything, down to specific content, was under the microscopes of multiple teams at Reddit: the friendly, interactive community team; the secretive, ban-enacting trust and safety team; its engineering counterpart, dubbed "anti-evil"; and the policy and legal groups.

In the summer of 2017 came a moment of epic relief for Steve Huffman. Finally, he had completed a new funding round. The process of putting together the round--setting terms that could shape the future of Reddit and its value to both existing shareholders and employees--had been a slog. At least once during the yearlong process, he'd grown so frustrated that he'd come close to calling off the effort. Now it was done, which meant time for a victory lap.

On July 31, dozens of articles appeared in the tech press under headlines reading some variation of "Reddit raised $200 million in funding and is now valued at $1.8 billion." Just like that, six years after Advance Publications bestowed upon its little acquisition the power to raise outside funding and grow like a startup, Reddit joined a new echelon of Silicon Valley elite. It was now a unicorn, a private company valued at $1 billion or more, like Palantir or Pinterest. There were only about 200 of these companies in the world, and a hundred in the United States.

Something else miraculous happened over the summer of 2017: Reddit's traffic grew to such an extent that Amazon's web analytics arm, Alexa, the primary site-ranking service, considered it the fourth most popular website in the U.S., behind only Google, YouTube, and Facebook.

August and September 2017 went by without a single major community flare-up--the first time a late summer and autumn had passed in five years without Reddit nearly strangling itself out of existence. Huffman's past cycles of self-doubt seemed to have lifted. There was joy for him in experiencing the daily rhythm of Reddit's new home at 420 Taylor Street, the flow of staff pausing to chat on their way to their workstations. He could often be found with his laptop on a couch in front of the elevators on the third floor, his feet in scruffy Adidas soccer shoes, propped up, greeting anyone who walked by.

Excerpted from the book We Are the Nerds: The Birth and Tumultuous Life of Reddit, the Internet's Culture Laboratory by Christine Lagorio-Chafkin, to be published on October 2, 2018, by Hachette Books, a division of Hachette Book Group. Copyright 2018 Christine Lagorio-Chafkin.

From the October 2018 issue of Inc. Magazine