Sauerkraut is made by a process of pickling called lacto-fermentation that is analogous to how traditional (not heat-treated) cucumber pickles are made.
Fully cured sauerkraut keeps for several months in an airtight container stored at or below 15°C. Neither refrigeration nor pasteurization are required, though these treatments can prolong storage life.
Traditionally, the container is a stoneware crock and the seal is created with a piece of wet linen cloth, a board, and a heavy stone. This arrangement is not fully airtight and will lead to spoiled sauerkraut unless the surface of the brine is skimmed daily to remove molds and other aerobic contaminants that grow on the surface where there is contact with air. An alternative that avoids this problem is a type of ceramic jar (made especially for home sauerkraut production) that has a trough around its lid. When this trough is filled with water the result is an airtight seal. Glass canning jars with clamped threadless lids can also be used. Whatever kind of container is used, it must allow the escape of fermentation gasses. Commercial-scale sauerkraut production typically employs large airtight plastic barrels.
No special culture of Lactobacillus is needed because Lactobacillus is already present on raw cabbage. Yeasts are also present, which cause soft sauerkraut of poor flavor when the fermentation temperature is too high.
Variations include sauerkraut prepared from whole cabbages instead of shredded strips. Sometimes other vegetables are added, such as carrots. Spices may be added; caraway and juniper berries are traditional. Sometimes wine is added. Red cabbage can be used to make sauerkraut, but this is rare and not traditional. When sauerkraut is made from turnips or rutabagas, the product is called sauerrüben.
For preparation at home, the USDA recommends a greater amount of salt than is traditional, making the sauerkraut unpalatably salty unless rinsed before eating. Such rinsing removes much of the nutrient content and flavor. When traditional amounts of salt are used, temperature control is critical, because spoilage leading to food poisoning can occur if the fermentation temperature is too high. However, once made, sauerkraut is a very safe food, because its high acidity prevents spoilage. USDA also recommends pasteurizing sauerkraut for storage, though this is not necessary if the raw sauerkraut has been properly made and stored. To be safe, do not eat any sauerkraut that has a slimy or excessively soft texture, or a discoloration or off-flavor, any of which can indicate spoilage.
Sauerkraut is a common and traditional ingredient in German cuisine, Alsatian French cuisine, and the Slavic cuisines of Central and Eastern Europe.
Sauerkraut can be eaten raw and unadorned; in this form it is often eaten as a relish with meat dishes, for example, as condiment on bratwurst or North American hot dogs. Raw sauerkraut dressed with oil and onions is served as a salad. However, sauerkraut is commonly cooked before it is eaten.
Cooked sauerkraut preparations include Central and Eastern European soups and stews, such as bigos, shchi or kapusniak (sauerkraut soup); filled dumplings (pierogi); and seasoned saukraut served as a hot vegetable side dish.
In Alsace (a region of France that belonged to Germany from 1870 until 1919), the traditional sauerkraut dish is choucroute garnie (garnished sauerkraut): a one-dish meal of sauerkraut, sausages, pieces of meat such as ham knuckle, and perhaps potatoes, all cooked together in goose fat. Typical accompaniment beverages are beer or white wine (Riesling).
Common ingredients in cooked sauerkraut dishes (besides those already mentioned) are bacon, caraway, and apples.
Kraut juice is a regional beverage in the USA that consists of the liquid in which sauerkraut is cured.