Your YouTube channel is finally making bank. Your Etsy store orders are flowing in, and inventory is selling out. Your vegan baked goods are baked greats. You’re saving on office rent AND commute costs by working from home.

But is what you’re doing legal?

Depending on the industry, the work you do may have a laundry list of requirements, restrictions, and straight-out no-nos. Home-based food businesses have one set of rules, while a bed and breakfast has another.
For the most part, you can work from home, i.e., a residential location, “as long as you are not accommodating the public. You’re not allowed to meet clients or patients in your home,” says Michael Siegel, partner at Siegel and Siegel.

This means the masseuse who keeps a table in his guest bedroom isn’t just a wizard at smoothing out your knotted shoulders. He’s also in violation of city law.

The most common violators? “Social workers and psychologists,” says Siegel. While a ground-floor practice with a separate entrance may be legal (depending on zoning laws), your shrink’s actual home is not. “It’s common in Manhattan. People with psychology practices don’t need facilities. They just need a couch,” says Siegel.

There are other rules too: “You’re not allowed to retail out of your home. You can’t have a warehouse of items located in your home, even if you’re selling them online. But you can sell for personal use, as in Ebay,” says Siegal. In short, running an eBay business from home = good. Running a stevedore business = bad.

In addition to all this, the New York City Department of Buildings says “your home occupation (defined by Zoning Resolution §12-10) can’t occupy more than 25% of the residence – up to 500 square feet – and no employees may work on-site.”

But even if you’re working within the law within your apartment, you may not be completely in the clear: Some leases “prohibit income-producing businesses in your apartment,” says Siegel. Before you sign, make sure you’ve read the fine print. Tenants can be ordered “to cease the non-compliant use,” he says. Eviction is rare…but possible.

Siegel says that court cases concerning home-based business typically stem from irritated neighbors. Even if you’re running a perfectly legitimate sound-mixing company, remember to keep your neighbors sweet by keeping the noise down. (You might want to care of your doorman, too.)

However, you’re in luck if you’re a bona fide fine artist: You can apply for a certification that allows you to live—and work—in a loft. If you do acquire a loft, be mindful of the regulations. Just because you can display your paintings for potential clients, it doesn’t mean you can also throw for-profit parties in the same space.

If you want to be on the extra-careful safe side, NYC Small Business Service offers free legal advice in their walk-in clinic, held monthly. They also offer classes on starting and growing a small business. If all goes according to your best-laid plans, your bachelor/bachelorette pad may become your career launch pad.