GitLab was never intended to be an all-remote company. Things just worked out that way.

When it launched in 2012, the tech business comprised only CEO Sid Sijbrandij, working at home on his computer in the Netherlands. His first hire was in Serbia, and GitLab engineering fellow Dmitriy Zaporozhets, based in Ukraine, later joined as a co-founder. Soon everyone recognized the efficacy of eschewing a centralized workforce. "I hired a few people in the Netherlands, and they came to my house," Sijbrandij says. "But then they stopped, because why do the commute?"

Now, GitLab is well-known for its all-remote policy. While it's officially based in San Francisco, the company has 850 employees across more than 55 countries, all of whom work from home. Sijbrandij says access to such a huge talent pool has been instrumental to GitLab's dramatic business growth: The company, which offers tools for software developers, announced a $268 million funding round in September, raising its valuation to $2.75 billion. Its "freemium" model--free limited access for individual developers and paid full access for businesses--has led to revenue that's "more than doubling" year over year, Sijbrandij​ says.

Company culture, of course, can be difficult to maintain when everyone is remote. GitLab workers stay connected through daily team calls and watercooler chats on Zoom and Slack, where employees often gab about non-work activities. "Visiting grants" help cover costs when staffers travel to regions where other employees are located. Sijbrandij says his business has cracked the code, and his employees agree: In June, GitLab made its first appearance on Inc.'s annual Best Workplaces list, which is compiled from employee surveys.

GitLab's seasoned remote workers put a lot of thought into their home offices, from the placement of their webcams to their ergonomic chairs. Sijbrandij's workspace features a high-quality podcast microphone and green-screen backdrop, which he'll occasionally use to quietly swap backgrounds mid-meeting.

Still, GitLab nearly moved away from the all-remote setup four years ago, when investors insisted that operations like marketing and finance required an office. In April 2015, the company set up shop in San Francisco above a bicycle store. "People came in," Sijbrandij says. "We had all these desks. And then they kind of stopped showing up after a while." When the lease expired, the company chose not to renew it--and the investors relented.

Here are Sijbrandij's top three lessons for building a strong remote work culture at your own company:

1. Prioritize results over hours.

It's a classic argument against remote work: How can you guarantee that your workers are working? Sijbrandij responds with one of GitLab's core values: Measure results, not hours. "We can't measure how long you work," he says. "We don't want to measure it. We don't want your manager to even talk about it with you unless they think you work too much."

The results he refers to can take any form. Workers are encouraged to offer suggestions and critiques across departments, which they can do by submitting online "merge requests." The requests are quickly upvoted or downvoted by peers, and reviewed by the applicable department's personnel. They can be accepted or rejected without explanation, which Sijbrandij says increases accountability: You own your decisions, for better or for worse.

That's especially the case because those decisions are publicly viewable, thanks to GitLab's emphasis on transparency. Each employee has a profile page on the company's website, which features a list of every contribution that person has made to GitLab. Sijbrandij's profile, for example, shows time-stamped breakdowns of the daily actions he takes, from commenting on discussion threads to accepting merge requests and pushing new code.

"Most companies fear that level of transparency is just going to create complete chaos," says Darren Murph, a senior manager on GitLab's culture curation team. "But the truth of the matter is: With great power comes great responsibility. The people here recognize that it's a privilege."

2. Document everything.

Another classic argument against remote work: How do you coordinate and communicate effectively across time zones? GitLab's answer is to document everything.

Seriously, everything. In addition to the publicly viewable merge requests, meetings and presentations get uploaded to YouTube. When employees have questions, they're encouraged to search the company's massive online handbook--more than 1,000 pages long when printed--before waking up co-workers in different time zones. Still, "large, coordinated efforts do happen when there is no other alternative," Murph says. "These efforts are planned as far in advance as possible."

Documentation does have its limits--specifically, when it bumps up against employees' autonomy. Sijbrandij describes his fight against micromanaging with a metaphor: "If you're going to travel to Europe, you should tell a lot of people. If you're walking to the end of the hallway, you don't have to coordinate with anybody. Nobody cares. And if you're walking the wrong way, somebody will see it and tell you."

Murph notes that aggressive documentation is the kind of time-consuming activity many entrepreneurs avoid in a company's early days. But "it's just so vital to do it as it happens," he warns. "If you try to recapture everything a year in, you're going to miss everything."

3. Use challenges as learning opportunities.

Hiring only remote workers brings unexpected challenges. Some new employees, for example, join the company in spite of the all-remote policy rather than because of it. Murph says one recent hire kept talking about how much she missed the social aspect of offices--from workplace activities to happy hours--until she realized how much money she'd saved on new clothes, thanks to GitLab's nonexistent dress code.

Another surprising challenge: It doesn't make sense to invest time and resources incorporating your company in a country where you only have one employee; GitLab currently has that situation in 20 different countries, according to the company's website. Instead of keeping track of each locality's unique hiring laws and restrictions, GitLab works with local staffing firms that hire employees on the company's behalf. Yes, it costs money--how much depends on where you're trying to hire--but Murph says it's worth keeping the company's hiring pool as deep as possible.