Sauerkraut is lightly salted cabbage that has been fermented by naturally occurring lactic acid bacteria.
You shouldn't wash the cabbage too much so as to retain the bacteria attached to their leaves, which also means you should avoid pesticide-ridden produce - go organic! You should also avoid chlorinated water and salt which has been iodised or contains anti-caking agents (table salt), these can interfere with the microorganisms - use sea salt, pickling or kosher salt.

As enjoyed by Germans
fermented cabbage
veg vegan salad raw pickle
Sauerkraut really is the easiest thing in the world to make, though you have to wait a few weeks!
The cabbage also collapses a surprising amount so you'll end up with a great deal less than you hoped. Use about ½ tablespoon of salt per 1lb of cabbage, and use the non-iodised kind so as not to kill off the bacteria.
Apparently you can use all sorts of varieties of cabbage (red/Chinese/Savoy), but the smooth green kind is the most common.

Makes Surprisingly Little!

Wash your jars, bowls and hands thoroughly and be sure to rinse off any soap residue. Don't wash the cabbage.
Discard any wilted or damaged outer leaves of the cabbage, but save a couple of good ones to cover the sauerkraut later. Weigh your cabbage.
Quarter the cabbage and cut away the core, then half again lengthwise into eighths.
Slice them crosswise as thinly as you can manage.
Put the sliced cabbage into a large glass bowl and sprinkle over the salt (about 0.5 - 0.6 tablespoons per 1lb of cabbage). Using your hands, work the salt into the cabbage by enthusiastically massaging and squeezing. Gradually the cabbage will start to ooze and sweat - 5 or 10 minutes.
Now you can add your flavouring extras. Caraway seeds are traditional, grated apple is also popular, but I've read of people adding grated carrot, ginger, and garlic.
I added caraway seeds and a few crushed cardamom seeds to mine just for the lols! Turned out pretty nice too - just a hint of the aromatic cardamom.
Grab handfuls of the cabbage and pack it into a jar, tamping it down as you go with your fist. Add any liquid left in the bowl.
You now need to find a stone-filled smaller jar or weight which you can use to press down on the surface of the cabbage to hold it under water in the jar. Hopefully you thought about this earlier :)
It's a handy to cover the cabbage with the large outer leaves you reserved earlier to help keep the shredded cabbage submerged.
Cover the jar with a cloth secured with a rubber band to stop insects getting in and shitting in your nice sauerkraut and set the jar in a dark and warmish pantry (ideally 65°F-75°F).
You need to press the jar down and crush the sauerkraut into the liquid over the next 24 hours and make sure that the cabbage is completely covered. If not you need to add some brine to the jar (dissolve 1tsp salt in a cup of water) until it is.

Over the next days or weeks, occasionally check on progress - tasting to see if it's ready and pressing the jar down to keep the sauerkraut submerged.
You may see bubbles, foam or a white scum which are all good signs. You can skim off the scum before refrigerating. If you see any mould on the surface of the liquid (or from any cabbage which has escaped) scrape it away. The rest of the sauerkraut will be fine!

When the sauerkraut tastes good to you remove the weight, decant to a smaller jar if you like, screw on the cap and refrigerate. It will then keep in the fridge for months.
Very good!
Although texts give the impression your sauerkraut will be ready in a few days (3-10 if you're making small quantities) mine took about 3 weeks before I was happy with it.