We study an optimal control problem for the mathematical model that describes steady non-isothermal creeping flows of an incompressible fluid through a locally Lipschitz bounded domain. The control parameters are the pressure and the temperature on the in-flow and out-flow parts of the boundary of the flow domain. We propose the weak formulation of the problem and prove the existence of weak solutions that minimize a given cost functional. It is also shown that the marginal function of this control system is lower semi-continuous.