Dice the onion. Whisk the eggs and season with salt. Slice or roughly grate the potatoes into sticks. Fold in the onion.
Heat the oil in a pan and fry the ham briefly. Add the potatoes, fry for 1 - 2 minutes while turning, season with pepper and shape into a hash brown. Spread the cheese first, then the eggs. Cover and cook over low heat for 5 - 6 minutes. When the underside is browned and the egg has set, turn the hash brown using a flat lid and fry for another 4 - 5 minutes.
Cut the chives into fine rolls and sprinkle them on the rösti. A spicy sour cream dip tastes good with it.
The vegetarian version: The ham is left out, but tomato slices are then spread over the rösti.