Meanwhile, finely dice the ham, half an onion and half a clove of garlic and sweat in 1 tablespoon of olive oil. As soon as the onions are translucent, add the sauerkraut and pour in the water. After 5 minutes, put everything in a baking dish and place in the preheated oven.
In a hot pan with the remaining oil, fry the sausages on both sides until they are dark. Then place these on the cabbage in the oven.
Sauté the remaining diced onion, garlic and chilli in the sausage fat, then deglaze with the beef stock. Simmer everything over a low heat for about 5 minutes. Then add the sausages for about 2 minutes.
Serve the sauerkraut hot with sausages and chilli onion sauce.