Thermodynamics is usually developed starting from entropy and the maximum entropy principle. We investigate here to what extent one can replace entropy with relative entropy which has several advantages, for example in the context of local quantum field theory. We find that the principle of maximum entropy can be replaced by a principle of minimum expected relative entropy. Various ensembles and their thermodynamic potentials can be defined through relative entropy. We also show that thermal fluctuations are in fact governed by a relative entropy. Furthermore we reformulate the third law of thermodynamics using relative entropy only.