Everyone now camping at the site must apply for a permit and can also request a renewal.
The protesters have been demonstrating at the complex at First Street and Santa Rosa Avenue since Oct. 15.
Some protesters pitched tents in violation of a city code on Oct. 29 after city officials said they would avoid a confrontation and not remove the tents pending a City Council discussion on Nov. 1.
The City Council discussed the issue again on Nov. 8. By then an estimated 60 tents went up on the lawn and complaints surfaced about unsanitary conditions, drug use, and harassment of city employees.
At the special meeting to consider the urgency ordinance Thursday night, Santa Rosa police Chief Tom Schwedhelm said there have been 154 "events" at the encampment since Oct. 15, and 21 people, half from outside Santa Rosa, were booked in the county jail.
There were reports up public urination, smoking, drug use, sexual assault and human feces on a roof at the complex.
A report that someone bit a police officer proved unfounded but the officer was spit on, Schwedhelm said.
City Manager Kathy Millison said City Hall employees are unhappy, stressed, fearful and angry and residents with business at City Hall are fearful and have been harassed.
"This is drawing all sorts of people who are not necessarily spending any time in the area," Millison said. She said she is considering hiring a private security company to patrol the complex.
"Occupy Santa Rosa" representatives Benjamin Browner and Arrow Flora gave a presentation of the efforts the encampment has made to alleviate city officials' concerns and the group's plans to address health and safety issues.
"A permit will give us the power to enforce our community agreement not to engage in criminal activity," Flora said.
Dozens of "Occupy Santa Rosa" members spoke during the three-and-half-hour public hearing. Some recognized the encampment was drawing people who were not there to decry what protesters cite as the concentration of wealth among 1 percent of the population at the expense of the 99 percent.
Others said they are providing community for the homeless and the mentally ill who are disenfranchised from society. Many said the international "Occupy" movement is an historic occasion and historic changes often are initially chaotic.
Council members praised "Occupy Santa Rosa" for correcting problems at the encampment over the past two days and praised the Occupy movement's egalitarian message.
Councilman Jack Ours elicited a standing ovation when he urged the local Occupy groups to take their encampments to Sacramento and Washington, D.C. He said the Occupy movement could set the tone for the 2012 presidential election campaigns.
"I'm told Occupy Santa Rosa has the highest turnout per capita. We're going to give you a shot. I hope we're right," Councilman Gary Wysocky said.
Councilwoman Susan Gorin said she still has public safety concerns but supported the camping permits.
"Help our police help make you safe," Gorin said.
But Mayor Ernesto Olivares and Councilman John Sawyer voted against the urgency ordinance.
Sawyer said City Hall is not the appropriate place for an encampment.
Olivares drew strong applause when he said he will consider presenting the council a resolution supporting the Occupy movement.
"We support the mission and intent. It's time to bring it to the next level," Olivares said.
But Olivares, a former police lieutenant, said he did not expect the unintended consequences of the City Hall encampment and that the City is responsible for the safety and welfare of all residents.
"This wouldn't be tolerated in any other neighborhood," he said.
The ordinance needed five votes to pass and the City Council chambers erupted in applause when Olivares announced it had five votes.
Millison and City Attorney Caroline Fowler said they hope to have the permit forms available as soon as possible.