The invention relates to an apparatus (1) for drying and/or roasting beans for foodstuff, such as cocoa beans, or parts of beans, such as cocoa nibs, comprising a frame, a drum (2) for receiving the beans or parts of beans rotatably mounted in the frame and at least partially closed at one end (3) and open at the other (4), a shell (5) enveloping the drum (2), a door (7) for closing the open end (4) of the drum (2), a heater (19) for heating the drum (2), and a fan and a valve (26) for maintaining an underpressure in the space (20) between the drum (2) and the shell (5). A seal (30) is located in the clearance between the drum (2) and the shell (5).