The partners behind Boba Guys, a chain of bubble-tea cafes, already made their own infusions and syrups to go with the tea leaves they imported from China, Taiwan and Japan. A few years ago, they got to thinking, why not make the pleasingly chewy tapioca pearls from scratch, too?

It turned out that the industrial machinery used by factories in Taiwan, which produce most of the tapioca pearls for bubble tea, also known as boba, was expensive. And the two Boba founders, Andrew Chau and Bin Chen, didn’t have a large enough demand for the product to justify the investment.

But now the company, which started as a Bay Area pop-up in 2011, has 12 locations all over the country and plans to add three more by the end of 2018. This year , Mr. Chau and Mr. Chen finally opened their dream factory, US Boba Company, in Hayward, Calif. The 18,000-square-foot tapioca-pearl plant, a former pasta factory, is a joint business venture with David Fan of Fanale Drinks, a bubble-tea supplier.