The term viceroy could apply to a variety of governing positions, often in place of a monarch or in control of a large jurisdiction.
During the Golden Age of the Sith, the title of viceroy was held by certain individuals in the old Sith Empire who ruled as the presiding Sith Lords of their respective fief worlds. Prior to the Great Hyperspace War of 5000 BBY, Naga Sadow ruled as viceroy of Khar Shian, the sole moon of the Sith sacred world of Khar Delba.
The leader of the Trade Federation of Planets held the title of Trade Federation Viceroy, such as the Neimoidian Nute Gunray during the Naboo Crisis up until his death alongside other members of the Separatise Council on Mustafar at the end of the Clone Wars in 19 BBY.
Viceroy was also one of the titles, the other being First Chairman, held by Bail Prestor Organa of the Alderaanian royal house of Organa during the Clone Wars and the Imperial Period until Alderaan's destruction in 0 BBY.