A method for drying and/or roasting a food which is performed in a treatment apparatus (2) comprising a treatment chamber (3) and at least one heating apparatus (4). The method comprises heating a gas by the heating apparatus (4) and further comprises heating an outside (5) of the treatment chamber (3) and conducting part or all of the heated gas through the treatment chamber where the heated gas is conducted through the treatment chamber before heating, after heating, or simultaneously with heating of the outside. The food in the treatment chamber is dried and/or roasted, due to heating, and/or by the heated gas conducted through the treatment chamber. During drying and/or roasting, a control value is determined on the basis of a measured value of a sensor. The heating and/or the conducting of heated gas through the treatment chamber is controlled depending upon the determined control value, particularly the moisture.