A few years ago, after Andy Williams quit his job as an industrial engineer to become a marijuana entrepreneur, his nights were haunted by a recurring dream. “I would have nightmares about being in prison and never seeing my family again,” he says. “The same nightmare for weeks.”

These days Williams isn’t sleeping much at all, but the deprivation isn’t driven by fear. The debut of Colorado‘s market for retail pot sales has propelled a crush of new customers to Medicine Man, his cannabis dispensary in north Denver. Early on Monday morning, a line of buyers snaked through the shop, waiting to purchase one of 21 strains of pot from glass jars arrayed in display cases, or to sample the menu of THC-infused chocolates, tinctures, creams, lozenges and baked goods. Between extensive preparations for the Jan. 1 rollout of the world’s first legal marijuana market and the media attention that has attended it, Williams says he has been too busy to sleep much at all lately.

This week, sitting behind the desk in his office, next to a computer whose screen displays a purplish bud covered in crystals, Williams says his old fears of imprisonment have given way to far more enviable concern for a businessman: too much demand for his product. “It’s a real problem,” he says.

In the scheme of things, this is a good problem for a business to have. But store owners say supply shortages have been a nagging concern amid the successful rollout of Colorado’s retail cannabis industry. Businesses are already limiting sales in an attempt to avoid shutting down in the midst of a white-hot market. “We are going to run out,” Denver dispensary owner Toni Fox said amid the frenzied opening of the retail market. That was, in fact, the fate of Denver-based Clinic Colorado, which exhausted its supply of recreational pot on Monday.

To keep their doors open, most businesses are resorting to rationing. The new Colorado law allows customers to purchase up to an ounce for personal use, but some stores are limiting individuals to just an eighth of that to preserve supply; one store in the western part of the state is capping sales at a single gram. Most have already hiked prices, which have jumped to as much as $65 per eighth at some stores.

A marijuana garden at Medicine Man—Alex Altman

Tour the gardens at Medicine Man, and it’s hard to imagine Williams ever running out of weed. The 20,000 sq.-ft facility is a warren of rooms devoted to different stages in the growing process. There’s a space stacked with mother plants, and stations devoted to curing, watering and trimming. There’s a cavernous, 150 ft. long room where dozens of different strains stretch toward the ceiling, and a corridor lined with plants called the Green Mile. As customers queue up at the front of the store, laborers are busy at the back, building another 20,00 sq.-ft addition, full of blocky white modules designed to resemble an Apple store. “We want to be the Costco of marijuana,” Williams says. “We want to be a real showcase for the world and remove the stigma.”

Tags identifying types of marijuana at Medicine Man—Alex Altman

Even amid this bounty, Williams predicts it may take 18 months for supply and demand to even out. Part of that is simple math. Just 37 stores opened on Jan. 1, about 10% of the businesses awarded licenses. The market has expanded from the almost 110,000 people with state medical marijuana cards to many multiples of that. Over the next few months, as the novelty of being able to purchase pot legally wears off, more stores open and the crush of tourists drawn to Colorado’s Green Rush subsides, the market is likely to stabilize. For those reasons, industry experts say reports of dwindling supply, though real in the short-term, are somewhat overheated in the long run.

One of the ironies of Colorado’s pot shortage is that the problem is not a bug in the system but a feature of it. “We made a very conscious decision that undersupply was better than oversupply,” says Barbara Brohl, the state’s top marijuana regulator. A saturated market heightens the risk that sellers will journey elsewhere to peddle their product, including across state lines, where marijuana remains illegal. This threat, known as diversion, troubles legal pot businesses nearly as much as regulators and law enforcement officials. The surest way to invite an unwanted federal crackdown would be a spate of headlines about Colorado-grown cannabis cropping up in neighboring states.

To combat the threat of oversupply, the task force that built the world’s first legal pot market from scratch imposed caps on the amount of product growers can produce. In a market designed to be trackable from seed to sale, businesses are forced to grow 70% of what they sell, while purchasing up to 30%—a rule which requires extraordinary amounts of capital. Dispensary owners and pot lobbyists like to point out that liquor stores would never be asked to make 70% of the alcohol stocked on their shelves. But this kind of heavy regulation is the price that marijuana’s aspiring moguls are willing to pay for the chance to bring their businesses to the retail marketplace.

Colorado officials track cannabis from seed to sale.—Alex Altman

“The 70-30 rule is a challenge for most businesses, especially those on the scale that we operate,” Brooke Gehring, 33, the owner of a dispensary chain called Patients Choice, says as she stands inside her 30,000 sq. ft. marijuana warehouse in an industrial stretch of northeast Denver. While Gehring says the shop’s planning has ensured adequate supply, she says shortages are “a fair concern.” After all, store owners are being forced to calculate demand for a market that has never existed before.

“We’re making businesses decisions,” she says, “based on a total unknown.”