Sauté onion and garlic in butter until golden, add minced meat and fry, turning. Sprinkle with paprika and sauté briefly. Add sour cream, mix well, season with salt, pepper and thyme.
Butter the gratin dish, add sauerkraut and minced meat in layers.
Bake in the oven heated to 200 degrees for about 25 minutes.