How do I set up swarm to use cloud and server farms

Any you could post a how-to? I thought swarm workers had to be on the local network?