At the offices of Yelp, Vice, and WeWork--and surely many other Millennial-centric startups--employees don't need to meet down the street at a local happy hour joint. Happy hour starts down the hall at the in-office bar.

Thinking of building your own fancy new bar or simply bringing in some booze for the occasional festive evening? Know this: You're going to need some policies in place--or things could get out of hand. Keep these tips in mind before you invite employees to raise a glass together in the office.

1. Don't mix work with play (if it doesn't make sense to).

A bar in the workplace isn't right for every profession. Drinking on the job is an obvious no-no if you work in construction, health care, transportation, and just about anything else involving dangerous instruments or machinery--and federal laws often prohibit it. For other fields of work, the Occupational Safety and Health Act of 1970 requires employers to ensure the safety and welfare of their workers to a reasonable degree. If someone gets drunk on company booze and gets hurt at work, your business could be liable.

Encourage employees to be wise. TDA Boulder, a Colorado-based marketing agency, has local craft beers on tap. Partner and creative director Jonathan Schoenberg is always on the lookout. "The first agency I worked for had Guinness and Harp on tap," he says. "I was very excited and not very smart. After a week of me drinking many beers during the afternoon an account person explained, 'Just because you can drink the beer at 2 in the afternoon, it doesn't mean you have to.' Fortunately, our employees are more mature than I was at 25, and we've never had to have that conversation here."

2. Make sure only staff 21 and older are imbibing.

Being behind closed doors doesn't give you a free pass--so if your office has underage interns or employees, keep them clear of the bar. Laws vary from state to state, but in many states, an employer, like any other "social host," can be found liable for any accidents or injuries sustained or caused by a minor they served, according to the Society for Human Resource Management.

3. Don't let employees drink and drive.

Different states have different laws on this as well, with some states ruling that those over 21 are accountable for their own actions and thus a social host can't be held responsible. In other states, social hosts can be found liable if someone drinks at the office, then causes harm to himself or anyone else. A good rule of thumb: Nobody should be drinking and driving. "We don't put limits on how much people drink," Schoenberg says, "but when we have parties, employees know they can Uber or Lyft home and we will gladly pay for it."

4. Beware of unwanted advances.

Reported incidents of sexual harassment are more frequent at workplaces where employees drink heavily. A 2004 Cornell study found that incidents of harassment toward women more than doubled with each drink ingested by their male coworkers. Your company has a moral and legal obligation to prevent any kind of harassment in your workplace, so keep your eyes and ears open and make sure everyone drinks in moderation.

5. Adjust your office's drinking policy as necessary.

Not everybody drinks, and not everybody wants to be around people who drink. For those struggling with alcoholism, for example, simply being around the smell of alcohol can be painful. If you're thinking of installing an office bar, understand the impact that it will have on your current employees. If you already have one, be sensitive to your workers' needs. An example from the sports world: After the Texas Rangers won a playoff series in 2010, instead of subjecting outfielder and recovering alcoholic Josh Hamilton to the traditional champagne-soaked celebration, players doused each other in ginger ale.

"We have people at the agency who don't drink, but they will still gather at the bar at the end of the day," Schoenberg says. "We have beer, but we also have nitro cold brew coffee and kombucha on tap, and tons of non-alcoholic options."