SMITHS FALLS, Ontario — Millions of dollars worth of marijuana plants sat under lamps brighter than the noonday sun as employees of Canada’s largest cannabis business bustled about the 47 giant growing rooms of its factory, which once made Hershey bars.

Now it’s home to Tweed, whose parent company, Canopy Growth, was the first Canadian marijuana grower to debut on the New York Stock Exchange.

Valued at more than $10 billion, Canopy is worth even more than Bombardier, the Canadian manufacturer that is one of the world’s largest makers of planes and trains, offering a stark example of this nation’s new get-rich-quick hope — the marijuana industry.

On Oct. 17, Canada is set to become only the second country in the world and the first major economy to legalize marijuana for all uses. Companies are clamoring to join in what some are calling a green rush.

“It’s like Seagram’s back when Prohibition was in place and just about to end,” said Deborah Weinstein, a lawyer in Ottawa who handled Canopy’s move onto the Toronto Stock Exchange, with the stock symbol WEED. “But it’s more than that. This has never been an industry.”

On the same day that marijuana becomes legal, the government will announce a program to make it easier for Canadians convicted of possessing small amounts of marijuana to obtain a pardon, according to an official familiar with the plan.

The official, who spoke on the condition of anonymity, said that because several details must still be worked out, the program will not become active immediately. Pardons are to be available only for people convicted of possessing 30 grams of marijuana or less, the legal limit under the new system.

The law limits the products that can contain cannabis; edibles, for example, will not be legal until next year.

The legislation also heavily restricts advertising and is laden with bureaucratic rules, including licensing and inspection requirements for producers.

But companies are already lobbying for more permissive rules.

The fervor is a little reminiscent of the dot-com boom of the 1990s. The top 12 Canadian marijuana companies are now worth nearly 55 billion Canadian dollars, or $42 billion, and investors are snapping up the stock.

Profits, though, are a dream of the future. At Tweed, for example, sales last year from the medical marijuana business were just 77 million Canadian dollars. The company lost 70 million dollars.

Some investors may be sorry. Not every marijuana producer now taking stock markets by storm will profit and survive, many experts believe.

There are 120 businesses licensed to grow medical marijuana, which has been legal in Canada since 2001. They are now poised to serve people who simply want to get high. In provinces where the private sector will handle retail sales, companies are scrambling for licenses to open stores.

Shoppers Drug Mart, the country’s largest pharmacy chain, has taken out a medical cannabis producer license.

Most big alcohol players appear to be sitting back for now, except for some investments, but analysts expect they will eventually get more involved.

A notable exception is Jakob Ripshtein, who used to head the Canadian operations of Diageo, the British-based liquor giant that makes Guinness beer and owns several of Seagram’s brands.

In May, he became the chief operating officer of Aphria, which owns an expansive and expanding marijuana greenhouse complex near Leamington, Ontario.

“Do I believe there are going to be different players coming into the industry?” Mr. Ripshtein said. “I absolutely do.”

Only dried cannabis, oils and seeds will go on sale this month. But the industry is dreaming up a future that will include products like cannabis-laced candies. At a large lab at Tweed, for example, scientists are laboring away under fume hoods on marijuana drinks.

[For future coverage of marijuana legalization in Canada and other Canadian news, subscribe to our weekly Canada Letter newsletter.]

There is also an industry around the industry, already making money.

Businesses have sprung up to create the software that allows growers to track their plants and final products, as the government requires. Marijuana growers are also voracious consumers of supplies like fertilizers, as well as energy.

And greenhouse makers now have a customer base beyond tomato and green pepper farmers.

Beyond that, abandoned factories, like the one Tweed operates in, have suddenly become hot properties.

Even Canadian news organizations have joined in. In Toronto, The Globe and Mail has hired reporters and editors to produce “Cannabis Professional,” a daily newsletter that will cost 2,000 Canadian dollars a year for a subscription.

David Campbell is one of those profiting from the boom.

Mr. Campbell, 50, has a background in management at companies that make machines dauntingly known as “supercritical fluid botanical carbon dioxide extraction systems.” Typically they decaffeinate coffee.

But they are also ideal for squeezing the active ingredients out of marijuana plants to create oil.

So in 2015, when Justin Trudeau was campaigning for recreational legalization (Uruguay legalized the drug in 2013), Mr. Campbell set up Advanced Extraction Systems in Charlottetown, Prince Edward Island, just to serve the cannabis industry.

Mr. Campbell hasn’t looked back. The company has sold 12 systems this year, including one to a medical marijuana company in Germany. Advanced has gone from one employee, Mr. Campbell, to 14, most of them engineers.

“We feel this is just the beginning,” Mr. Campbell said. “We’re targeting California hard now.”

Even seemingly minor announcements about the industry can create paper fortunes overnight.

In September, Tilray, a producer with headquarters in Nanaimo, British Columbia, said the Food and Drug Administration in the United States had given it permission to export a cannabis compound to the University of California, San Diego, for medical research.

The value of the sale is so small that the company declined to disclose it. But the news still sent Tilray’s stock price up by 78 percent, adding billions to its value. The excitement soon faded and its shares have dropped back toward their previous value.

[Where will cannabis be sold? What will happen at the Canada-U.S. border? Here’s what you need to know as Canada legalizes marijuana.]

Meanwhile, the size of the industry is anyone’s guess.

Statistics Canada, the census agency, estimated that last year Canadians handed over 5.7 billion Canadian dollars for marijuana, with 90 percent of that going to a vast black market of dealers and underground websites.

No one knows what will happen now to the illegal trade, with its greater selection and lower prices, although the government has vowed to stamp it out.

The biggest players in Canadian marijuana, including Canopy, came out of the medical marijuana system, which was greatly expanded about five years ago.

Bruce Linton, Canopy’s chief executive, acknowledged that from the first days of legal medical marijuana his mind was on the day that the much larger recreational market would open for legitimate business.

But he, like most in the cannabis business, sees the government’s tight limits on advertising and marketing as an obstacle to future profits.

The government requires that marijuana be sold in plain packages that feature large health warnings and tiny logos. Advertising is limited to what Health Canada, the federal department that regulates cannabis, calls “information-type promotion” and “brand-preference promotion” all of which must be kept away from the eyes of children.

No ads are supposed to appear until Oct. 17, but several companies have jumped the gun and run advertisements that bend — or possibly break — the upcoming rules.

Health Canada said in a statement that it has cautioned several of the companies.

At the same time, a steady stream of lobbyists to Ottawa has been pushing for looser marketing rules, among other things.

Federal lobbying records show that public servants, political staff members and cabinet ministers have received 583 visits or phone calls from marijuana industry lobbyists since Mr. Trudeau was sworn in as prime minister in November 2015. That includes 92 lobbying visits alone by Brendan Kennedy, the president and chief executive of Tilray.

In the Tweed factory in eastern Ontario, where children used to buy broken candy bars from Hershey, Tweed has a carefully appointed visitors’ center, museum, cafe and gift shop offering clothing and marijuana paraphernalia.

Visitors can learn that Louis Hébert sowed the first cannabis seeds in what would become Canada in 1606, and sniff the scents of the company’s various strains of marijuana.

The atmosphere is a more successful tech start-up than Cheech and Chong, with employees in white lab coats, disposable jumpsuits or black T-shirts, all bearing the company’s retro script logo.

One recent day in the visitors’ center, two of Tweed’s 2,000 global employees talked over social media strategies at a long table of artfully distressed wood.

Mr. Linton was there, too, preparing to meet the civic leadership of Smiths Falls to discuss a mural for an outer factory wall that would depict the history of the town and imagine its future.

He recalled when cannabis was hardly a sure bet.

For much of his career Mr. Linton was involved in several tech start-ups in Ottawa.

When he decided just over five years ago to leave tech behind to start a marijuana business, his associates and family members had a unanimous view that it was a “very, very bad idea.” They were almost proved right.

In its early days, the company twice ran out of money, Mr. Linton said, and narrowly avoided bankruptcy only because of a last-minute infusion of cash from hard-to-find investors.

Now investors have bet billions of dollars on his vision. And Mr. Linton declared that Oct. 17 will be a unique moment in Canada’s history.

“The epicenter of the public policy is here, and everybody’s coming to Canada from all the other countries to see how we do it,” he said. Actually having home field for the first time ever in anything — this is amazing.”

Follow Ian Austen on Twitter: @ianrausten

Catherine Porter and Lindsey Wiebe contributed reporting from Toronto. Kirsten Smith provided research.

A version of this article appears in print on , on Page A8 of the New York edition with the headline: As Canada Legalizes Pot, Green Rush Means Money, Too. Order Reprints | Today’s Paper | Subscribe

Article originally found at https://www.nytimes.com/2018/10/16/world/canada/cannabis-legalization-industry.html