There are many posts all over the internet on 'canning butter' for long term storage. The use of the word 'canning' is not appropriate in all these posts because it isn't really canning. The true process of canning involves placing the jarred items in a high heat environment like a water bath or a pressure canner for a period of time to kill any bacteria spores, with the jars sealing as they cool.
The National Center for Home Food Preservation is the best source for current research-based recommendations for most methods of home food preservation. The Center was established with funding from the Cooperative State Research, Education and Extension Service, U.S. Department of Agriculture (CSREES-USDA) to address food safety concerns for those who practice and teach home food preservation and processing methods.
The Center answered the questions about the safety of those directions for 'canning butter' here. They state: "In conclusion, with no testing having been conducted to validate these methods, we would NOT recommend or endorse them as a safe home-canning process, let alone for storing butter at room temperature for an extended period."
What I understand from those posted directions on canning butter is that that those methods have not fully eliminated all the water in the butter, which is about 18% or more in purchased butter (isn't it fun to pay $3-$4 a pound for that much incorporated water?) ... nor have they strained out all the milk solids (proteins, sugars and salts) which make up about 2% of packaged butter.
Ghee, on the other hand, is a much safer choice for canning and storing, although the government safe canning recommendations do not cover ghee at all. Unlike butter, ghee can be stored for extended periods without refrigeration, provided it is kept in an airtight container to prevent oxidation, and remains moisture-free.
Ghee, for those unfamiliar with the term, is the Sanscrit word for clarified butter. Clarified butter has had everything removed but the golden-yellow butterfat. Ghee still contains all the fat-soluble vitamins like A and D but has had the lactose and casein removed. It has a higher smoke-point than butter because it no longer contains the protein and milk sugars, and I love using ghee to sauté because it has such a clean taste. Ghee can be used in any recipe that calls for butter, except it doesn't make good pie crusts (real lard is better than butter anyway), and cookies have a slightly oily texture.
The color, texture and taste of ghee depends on the source of the milk from which the butter was made, and the cooking temps to clarify it. Traditionally unsalted butter is used for ghee, and I recommend using organic butter from grass-fed cows so the nutritional content is higher, plus you are assured there are no herbicides, pesticides or antibiotics in the butter. Commercial unsalted butter is more delicate and has a shorter shelf life than salted butter, so manufacturers have to use fresher cream... which results in a better tasting butter.
One pound of butter will yield about one pint. I prefer to use half-pint jars (I generally cook just for myself) so I have a smaller amount opened when using it, although I have never had any become rancid like table butter sometimes does.
Melt butter over low heat in a saucepan, and slowly increase heat to medium as the butter begins to melt. When the water begins to cook off, the liquid will begin to foam. Reduce the heat again to the lowest setting, and stir occasionally. It may take 20-30 minutes or more to reduce the butter to a clear top layer and a layer of sediment on the bottom, depending on temperature. Too much heat and you will scorch the butter. When there is no longer any fizzle or foam when stirred, you can assume all the water has evaporated. This step is critical because any remaining moisture may reduce the storage time by attracting bacteria. If you cook it a bit longer, the bits in the bottom turn a darker brown and the ghee will take on a nutty flavor, preferred in some baking recipes. Overcooking will result in a bitter taste.
Put 2-3 layers of fine cheesecloth or butter muslin over a sieve or metal strainer and strain the contents of the saucepan into a warmed or heatproof container. I use a warmed 4-cup pyrex measuring cup to make pouring into canning jars easier. Depending on the fineness of the cloth, you may need to strain it twice to remove all the solids (caramelized sugars and proteins). I save the solids and add to pet food for extra protein.
The liquid will be very hot, so handle carefully!
Unless I am going to use this ghee right away, I put it back into a clean saucepan and re-heat on low. Meanwhile I have sterilized canning jars simmering in hot water, and lids simmering in a small pot of water. Remove a hot jar from the water with a jar lifter, be sure there is no water inside the jar, and carefully fill with hot ghee to within 1" of the top. Use a funnel to keep hot ghee off the rim; if you do get some on the rim it won't seal. Use a paper towel dampened with vinegar or lemon juice to clean the rim. Place the lid on top and screw the ring down tightly.
At this point, you could place the filled jars in a water bath canner and process for 10 minutes (or more, depending on elevation), as a safety factor. Be sure the jars are covered by at least 2" of water before boiling.
I do not water bath ghee, as the pure fat (if I have cooked all the solids and water out) is a type that keeps well without oxidizing, just as rendered lard or tallow will keep in a cool, dry place. The lids will seal as the ghee cools. Ghee, once opened, will keep for months refrigerated. I live in a relatively cool climate and keep some butter in a butter bowl in a cupboard in the kitchen in all but the hottest weather. I also keep opened ghee the same way, in a tightly closed jar on the shelf. Use your own judgment on canning and storing.
I make it a practice to wash all thoroughly cooled jars of anything I have canned before storing. Remove the rings, and wash in hot soapy water. Label the jars with contents and date, before storing. I never store any canned foods with the rings still on. That's because if any seal has broken in storage, it becomes clearly evident.
Earlier this year I bought some pastured butter on sale, and froze it. My experience is that frozen butter does not keep as well, or as long, as it does once converted to ghee. The ghee I have made is stored in a dry, cool pantry room, along with lard and tallow, on a bottom shelf.