Like most founders of fast-growing startups, Manny Medina spends a lot of time worrying about office space. It started when his then-20-person Seattle sales software company, Outreach, moved into a large office with what seemed like plenty of room to grow. Business boomed, and he started hiring--until his landlord refused to issue key cards for his new employees.

It turned out Medina had signed a lease with a certified green building that imposed strict limitations on the number of occupants per square foot. So he rented a floor in a building across the street--on the opposite side of a busy intersection. "People would literally not walk across the street for a meeting," he recalls.

Outreach ultimately moved four times in three years as its headquarters swelled to 250-plus staffers. Along the way, CEO Medina and his co-founders had to deal with everything from unforgiving subleases to employee commute concerns--which are just some of the logistical, financial, and even legal challenges that startups can face as they outgrow co-working spaces (or founders' basements). According to design firm Knoll, startups experience the greatest amount of office-space friction when they're between 30 and 74 employees. It's common to move several times during these years, as you try to anticipate your company's long-term staffing needs--and avoid getting locked into expensive or restrictive long-term leases.

So, while your head count is still in double digits, look for one- to two-year leases, advises Justin Agans, a startup lawyer in Charlotte, North Carolina. "You can kind of deal with anything for a year," he says. If you can't find an agreement for less than three to 10 years, ask for language that requires a landlord to allow you to find a subletter in case your company has to break the lease--for good or bad reasons. "Whether you experience explosive growth or things just don't work out with the business, it's important to understand how you can get out of the space if you need to," says Tricia Meyer, a Chicago-based business attorney and founder of Meyer Law.

Landlords tend to be more willing to negotiate in up-and-coming areas committed to economic development. Phone2Action, which makes advocacy software, found a five-year tenant-favorable lease by moving to Arlington County, near Washington, D.C., where Amazon plans to open its headquarters. The company received funding to train employees and a $50,000 grant from the Arlington Economic Development bureau, which it used to help build out a new office, says co-founder and CEO Jeb Ory.

A good relationship with your city can also make it easier to learn which federal, state, and city workplace laws apply to your office. Ory, for instance, is in the process of improving Phone2Action's "mothers' room" (as of 2010, the federal Fair Labor Standards Act requires most businesses to provide a place other than a bathroom for nursing moms to express breast milk). Your state's department of labor should provide information online about what your business must do to comply with its laws, but these requirements are often onerous enough to justify legal counsel. If you can't hire a full-time lawyer, consider paying one to put together a checklist, so you can make the necessary office updates on your own, suggests Doug Bend, a San Francisco-based business attorney.

Finally, talk to employees to get ahead of less obvious issues, from coffee complaints to office decor. Ryan Matzner, co-founder of app design company Fueled, built an employee feedback program after relocating offices in New York City last April. The program was designed to give staff some say over their workspace. ("You spend more time in your office than you do in your living room," Matzner notes.) But Fueled also deferred making many decisions--like where plants should go--before actually spending time in the office.

"Seek more advice and outside expertise" around the functions of the space for you and your team, Matzner suggests. A lot of the smaller stuff "can be undone or changed later."