In wind farms, wake interaction leads to losses in power capture and accelerated structural degradation when compared to freestanding turbines. One method to reduce wake losses is by misaligning the rotor with the incoming flow using its yaw actuator, thereby laterally deflecting the wake away from downstream turbines. However, this demands an accurate and computationally tractable model of the wind farm dynamics. This problem calls for a closed-loop solution. This tutorial paper fills the scientific gap by demonstrating the full closed-loop controller synthesis cycle using a steady-state surrogate model. Furthermore, a novel, computationally efficient and modular communication interface is presented that enables researchers to straight-forwardly test their control algorithms in large-eddy simulations. High-fidelity simulations of a 9-turbine farm show a power production increase of up to 11% using the proposed closed-loop controller compared to traditional, greedy wind farm operation.