In 1085, when Alexios recovered the strategically important Adriatic port city of Dyrrhachium from the Italo-Normans who had occupied it, John Doukas was installed as the military governor ("doux") of the local province. John remained there until 1092, when he was replaced by John Komnenos, the son of the emperor's brother, the "sebastokrator" Isaac. His tenure was apparently very successful. John repelled the Serbian incursions from Duklja and inner Serbia, and even, according to Anna Komnene, captured the Dukljan king Constantine Bodin (), before restoring him to power as a client of the Byzantine Empire. Thus John managed to restore order in the region of Albania and Dalmatia, which had suffered greatly during the Byzantine–Norman wars of the previous years. Surviving correspondence from the archbishop Theophylact of Ohrid is a testimony to his success; after John's departure from the post, Theophylact expressed nostalgia for the time of his governorship and asked for his advice.