Airbnb wants to begin charging taxes on some of its apartment and home rentals, as the company seeks to bring its service into compliance with the laws of the communities where it operates.

Under an initiative it is proposing in Portland, Ore., the company would give the city’s hosts the option of collecting an 11.5% tax each time they rent a space out to guests, the company said in an emailed statement. That includes a 6% tax that would go to the city of Portland and a 5.5% tax that would go to Multnomah County – the standard “transient lodging taxes” paid by hotels in the region.

Even as Airbnb nears a funding round that would value it at close to $10 billion, the six-year-old company is coming under attack by local regulators and hotel operators, who argue that the rentals unfairly skirt lodging taxes and aren’t held to the same fire codes and other regulations.

Chief Executive Brian Chesky worked with Portland Mayor Charlie Hales on ways Airbnb could help improve the city, a project Chesky calls the “Shared City.” In addition to taxes, the company also plans to solicit its hosts to give charitable donations to local causes, and is offering free smoke and carbon monoxide detectors for all of its listed homes.

The proposal to tax Airbnb users still must be approved by the Portland City Council, the company said.

Chesky hopes to bring his Shared City concept to more places. He detailed his vision for the project in a post on Medium today. Part of the challenge in adding taxes and other policies to Airbnb is that the local laws in each city and country are different.

At the opposite end of the country, Airbnb is fighting a high-profile battle with regulators in New York. Last October, New York Attorney General Eric Schneiderman subpoenaed Airbnb for information on its 15,000 hosts in the state, to determine if any are violating a 2010 state law that prohibits renters from subletting their homes for more than 30 days if they are not present. The company is contesting the order in court.

The company scored a victory abroad as the President of France signed into law new housing legislation which permits residents to rent out their homes without asking government officials for permission, according to a blog post today by David Hantman, Airbnb’s head of global policy.