- You may be looking for Cygnus Alpha (episode).
The Federation did not have a permanent outpost on Cygnus Alpha, only a landing pad which prison ships put down out. The crews of prison ships never set foot on the planet, staying only long enough to disembark their prisoners.
According to Vargas, the colony on Cygnus Alpha had been in existence for five generations. The initial group of prisoners had built a society from nothing but it was destroyed when the next wave of convicts were deposited there. Vargas' great-great-grandfather hit upon the idea of founding a new religion to control the inhabitants of the planet, and this was successful. Vargas himself was ruler and High Priest of Cygnus Alpha. The Curse of Cygnus was incorporated into the religion as an additional means of control. The population of Cygnus Alpha remained small throughout this time: Vargas said he had never had more than 500 followers.
When the London deposited Vila, Gan, and numerous other prisoners there it had been followed by the Liberator. Blake viewed Cygnus Alpha as a potential recruiting ground but had not reckoned on Vargas' control of the planet. Vargas captured Blake and demanded he be given control of the ship so he might take his religion to other worlds. However, Blake was able to teleport Vargas into space. (A: Cygnus Alpha)