At the office of Monterey County’s Treasurer-Tax Collector, gun-toting guards now stand sentry over the parking lot and entry door.

A newly renovated front office now serves as a secure drop-off point for taxpayers carrying duffel bags full of cash (payments made by appointment only). A fleet of state-of-the-art currency counters stand ready to speedily tally unprecedented sums of paper bills. And the regularly scheduled armored truck pickups are now passing through at a quicker clip.

Monterey County is among the many California cities and counties discovering a hard truth as they angle for a cut of the state’s newly legalized marijuana proceeds: Tax collecting in cannabis country comes with its share of obstacles. And there’s no “how to” guide.

“It’s been a challenge just to craft all of this from scratch,” county Treasurer-Tax Collector Mary Zeeb said from her office in Salinas. As of the first of this year, all licensed medical pot growers in unincorporated Monterey County owe Zeeb’s office $2 for every square foot they farm. That’s thanks to a measure passed by an overwhelming 74 percent of the county’s voters last November, who decided that if cannabis is going to be a mostly-legal local industry, the county treasury might as well get in on the action.

Among the list of questions that city fiscal analysts and county councilmembers are now puzzling over:

• What is the “sweet spot” tax rate that will keep local budgets in the black without chasing growers and vendors back into the black market?

• Who exactly are the officially licensed weed dealers in their jurisdiction?

• When taxing an industry that is effectively barred from the traditional banking sector, what do you do with all their cash?

• And just how do you audit a pot farm anyway?

“We set up our processes, and we hoped that they were going to work. So far, I’ve been pleasantly surprised that they mostly have,” says Zeeb, now processing the first quarter of collections.

Monterey County reports taking in roughly $700,000 from 60 growers (with 15 more still in arrears as of earlier this month). Those tax bills were based on self-report yield data from the growers themselves, but once all the permits are finalized, Zeeb says each grower will be taxed based on his or her permitted acreage.

“This is kind of the startup period,” she says. “We had a very steep learning curve.”

Monterey County isn’t the only local government learning on the fly. Last election, 32 cities and nine counties put marijuana tax measures on the ballot. All but two were approved—and more measures have been scheduled during special elections since. These taxes largely apply to medical cannabis, but were designed to encompass recreational pot once the state begins issuing permits no sooner than the beginning of next year.

“This certainly was by far the biggest year — last November — for these sorts of measures,” says Michael Coleman, fiscal policy advisor to the League of California Cities.

Coleman attributes the green wave at the local level as a response to Proposition 64, by which state voters in November legalized the cultivation, sale, and use of marijuana by adults for recreational purposes. Though the initiative gives local governments the right to restrict marijuana business activity within its borders, it requires them to do so proactively.

The proposition “begged the question for everyone,” he says. “If you say nothing, you’re making the decision to allow a bunch of stuff to happen in your community.”

Instead, many local governments have opted to allow the marijuana industry to set up shop but to tax them for the right to do so.

Alongside the cultivation tax, for example, Monterey County applies a 5 percent gross-receipts tax on all operations in the business of distributing, manufacturing, and testing cannabis. That’s on top of the 15 percent excise tax and $9.25 per ounce cultivation tax the state will impose on both medical and recreational marijuana under Prop. 64 (though card-carrying medical marijuana patients will be exempt from the state’s 7.25 percent sales tax) — as well as the property, business license, and corporate taxes that all companies pay.

Cannabis entrepreneurs complain about the heavy tab.

But these tax initiatives aren’t solely a cash grab by locals, said David McPherson, the cannabis compliance director at HdL Companies, which advises local governments on cannabis regulatory and tax issues.

Some cities and counties are simply trying to recoup the expenses of setting up a new regulatory system and pay for the expected cost of cracking down on the non-compliant. Other communities want to hammer out rules and regulations early to send a message to the industry that they are legally (and maybe philosophically) open to a well-regulated, professional weed industry.

But the potential growth of commercial cannabis represents an undeniable fiscal opportunity.

“Cities and counties have been struggling for the last 20 years,” McPherson said, who used to be the head tax collector for the City of Oakland, the first municipality to tax and regulate the industry. “They’re just figuring out how to keep out bankruptcy.” He points to Proposition 13 and other constitutional restrictions on local taxes, and the escalating costs of public pension contributions. In constrained times, cannabis represents that rare opportunity for local government: a fresh source of untapped tax revenue.

How to tap that source is a work in progress.

In Humboldt County, where a world-renowned cannabis industry has long operated off the grid and off the books, voters approved a $1 to $3 per-square-foot cultivation tax on growers by a greater than 2-to-1 margin. But of the nearly 10,000 grow operations that local officials estimate lie scattered across the lightly populated, densely forested county, fewer than 2,500 have registered, according to Treasurer-Tax Collector John Bartholomew. And since the ordinance only allows the county to collect taxes from fully permitted growers, Bartholomew’s office has only sent out 13 tax bills.

“It’s just too bad that we couldn’t levy the taxes on any grower we knew that was operating,” he said. “If they don’t have the permit, we can’t bill them. I think that there was probably influence from the industry in how that measure was written.”

In the meantime, Bartholomew is concerned that transient operators—so-called “trimmigrants” who arrive for the season, harvest a plot, and then leave the county — may be able to skip town without paying their share. Bartholomew has lobbied Sacramento for a change to state law that would allow his department to seize the property of those who allow their land to be used for cultivation but don’t pay their taxes. So far, not a single legislator has agreed to carry such a bill.

But even in more urbanized areas, where the regulatory authority of local government is less contested, authorities are still puzzling over some basic questions when it comes to taxing marijuana.

For example, what exactly is the “right” tax rate for the cannabis industry? Absent much economic literature on the subject, many cities and counties have established a maximum levy, while giving themselves a flexible range of rates to charge in the future. The Goldilocks-like task of finding that “just right” tax burden—the rate that funds local regulatory requirements without pushing growers and vendors out of business — is something that cities and counties will be experimenting with in the years to come.

What these county-by-county and city-by-city rates and policies will mean for the development of the industry is unclear.

Last March, Sonoma voters passed a gross receipts tax with a maximum rate of 10 percent for all marijuana businesses in unincorporated sections of the county. This came over the objections of the local growers alliance. But this June, Santa Rosa, the Sonoma County seat, will be voting on its own local gross receipts tax that will undercut the county rate, setting its ceiling at 8 percent. (The starting rates will range from 1 to 3 percent, depending on the type of business.)

With Santa Rosa positioning itself as the more business friendly alternative in the area, the city has seen marijuana investment money pour in as the vacancy rate for industrial space plummets.

“There’s an enormous amount of speculation going on,” says David Guhin, director of the city’s planning and economic development department. “We’re hearing stories of other smaller industrial users—like butcher shops and other things—that can’t expand now because they can’t compete with the money that cannabis is bringing to the table.”

According to Cara Martinson with the California State Association of Counties, cities and counties will need to coordinate to avoid creating a “patchwork” of tax rates that drives the cannabis industry in one direction or another. But she says coordination is tricky because state policy itself remains fluid.

The state has until the end of 2017 to craft regulations under Prop. 64 and to square them with existing rules that apply to medical marijuana, which are also in flux. Earlier this month the state released draft regulations for medical weed.

At the same time, lawmakers and regulators in Sacramento are struggling with some of the same logistical issues that beguile local tax authorities. Chief among them is the question of how to collect an expected $1 billion in annual tax revenue in cash—a question that remains unresolved. The State Treasurer’s Office has put together a group to figure out how to get otherwise “unbankable” cannabis businesses their own checking accounts. Likewise, state lawmakers have introduced bills that would set up additional tax payment centers and allow cannabis distributors to collect tax payments from their farmers. Some state officials have even floated a proposal to establish a state-run bank—though it is unclear whether such a bank would have an easier time than the private sector skirting federal banking regulations.

But for now, these are simply proposals. As state lawmakers puzzle over these questions, local governments are forging ahead.

“The fact that there’s a moving target at the state level makes it way more challenging for folks to develop thoughtful, comprehensive, local ordinances,” says Martinson.

Even so, David Guhin in Santa Rosa says he’s optimistic about the prospects of the local measure. That is in part because the city began offering interim permits to cannabis manufacturers and vendors as early as late 2015 while the regulations were still being hammered out. That gave city officials a year and half of lead time to figure out how big the local industry actually is, how much they can be taxed, and how much the new regulations will cost the city.

If the city weed tax passes in June, Guhin says Santa Rosa will have an advantage over cities and counties that only began enacting their policies after a tax was approved. Still there is more learning ahead.

“We get a new question every day — one that we haven’t thought of,” he says. “But we’re trying to figure it out with everyone else.”

CALmatters.org is a nonprofit, nonpartisan media venture explaining California policies and politics.