Gunpowder that was of vital to the success of the American soldiers in the American Revolution. Bunker Hill was lost not because of overwhelming British superiority but rather because the militia entrenched on Breeds Hill ran out of ammunition.
In all of England, including the colonies, making black powder was legally a Crown monopoly. While there were a few manufacturers in America, it must be understood that these were, strictly speaking, illegal. Despite this, the Non-Importation Agreements coupled with the vast distances between England and the colonies led to the creation of a robust though illicit cottage industry making gunpowder.
There are three distinct processes involved in the manufacture of black powder. First is the production of saltpeter or potassium nitrate (KNO3). Legal powder mills had the option of importing saltpeter and much of it came from India. Local mills producing powder without express permission from the Crown would not have this option. Second is the production of the charcoal which was easily produced in plentiful quantities in Colonies and actually exported to powder mills in England. Finally, there is the mining of sulfur which is governed by geology. There are some sulfur producing mines and springs in America but most sulfur was imported from Italy.
Saltpeter comprises about three-quarters of black powder and making it is a particularly disagreeable process. The best sources of nitrate are manure and the cave soils with decomposing animal droppings (mostly bat guano). Because the Crown had a monopoly on gunpowder manufacturing and because feces was critical to the production of that gunpowder, by law, all barnyard soil and the contents of outhouses belonged to the government[1]. Of course, even though there were Colonial acts making the same reservations for the Crown, because shipping a ship full of feces to England would be cost prohibitive as well as revolting[2] with few exceptions the Crown did not exercise its option on all American barnyard and outhouse contents. Cave soil, on the other hand was routinely mined in the Caribbean.

Refining saltpeter is a slow process and this usually limits the production of black powder. Nitrate-bearing soil is collected and mixed ash which contains potassium. Hot water is then passed through the mixture and collected. This resulting liquor has potassium nitrate, water soluble salts, and other impurities. This is then boiled down leaving a crystalline mass consisting saltpeter along with some other salts and dirt. Refining this salt exploits the higher solubility of saltpeter than the salts and dirt. By sequentially boiling the solution with water in large kettles, concentrating the solution by evaporation, the dirt and some other impurities rise to the top and can be skimmed off. By then carefully decanting the hot solution, other unwanted salts, which settle to the bottom, are left behind or filtered out. As the remaining liquid is finally cooled, pure saltpeter crystals form. Since the power of the final gunpowder is a result of the purity of the saltpeter, the refining cycle was often performed multiple times.

Charcoal was a common export in colonial America. Charcoal, was used in many industries, most notably blacksmithing, and is made from carefully controlled burning of wood. It was a dangerous and unpleasant craft.
A large pile of cut timber is carefully stacked into a mound. This is then covered with earth, leaving only a vent hole in the top. Live coals into the vent hole initiating a fire which must be carefully monitored for several days. By burning the wood in a limited supply of air, charcoal or which is nearly pure carbon is formed and this carbon is an almost perfect fuel for creating fast burning hot fires like you want in a blacksmith’s forge or in the barrel of your gun.
There are significant and productive sulfur springs in Virginia, or sulfur can be extracted from the ash of high sulfur fuels like lignite or from burning pyrites in a kiln. The major eighteenth-century source was the Island of Sicily which was controlled by France so American powder makers ironically only had access to it only after Independence was declared.
Once you have the ingredients, the actually making of black powder formulas is very straightforward. Although recipes vary slightly, black powder is 75% (w/w) saltpeter, 12.5% (w/w) charcoal, and 12.5% (w/w). All that is really needed is to grind the components into a fine powder and mix. In order to reduce the explosion risk, however, water was added. The amount of water varies according to the weather conditions but water was about 6% of the total weight of the final mixed ingredients. Water also helps ensure that the ingredients don’t separate in storage.
Once mixed, it is critical that the final powder be of reasonable and uniform grain size. The smaller the grain, the more rapidly, and hotter, the powder burns. Put powder that is too fine in your gun and it will burst the breech: put in powder that is too course and your shot will lack enough force to reach its target. So, while the gunpowder is reasonably moist, it is ground in a mortar into grains with a pestle, often driven by a waterwheel.

Finally, the graining process will produce not a single size if powder grains but rather a mix. Some grains will be large, suitable for cannon and large bore muskets, some will be small, suitable for smaller bore rifles or as priming powder. The next step is to separate the grains by size with a set of graining screens. The graining screen was a set of perforated parchments stretched across wooden frames. The largest mesh is on top and the finest is at the bottom. The powder is then forced through the screens with a stone roller or by rocking the powder back and forth, allowing the powder to pass through the screen.
The final step in powder making was to remove the excess water which was added to prevent explosion during manufacture. The powder is spread over tables and laid out in the sun. It must be turned over periodically until it was uniformly dry. Once dry the powder is ready to package.

There were
Colonial regulations regarding how powder was to be received into the public
magazines. This included barrel construction, capacity, and markings. Gunpowder
was packaged powder in several variations of container. The 50-pound wooden keg
was the most common container. These
kept the powder dry and were easy to move and store. Powder kegs very well made and sturdy as
leaks were extremely dangerous. Powder was also sold in 25- and 100-pound
barrels. The term “keg” originally designated the 100-pound size.
while the 50-pound size was designated a half keg and the 25-pound keg a
quarter keg. Black powder was also sold in papers. A sheet of plain paper was
laid out and an amount of powder, usually between one fourth pound and one
pound, was weighed out on it. The paper was then folded and sealed.
[1] And you though the Trump Administration was a full of shit…😊
[2] A true “shit load”