In this paper, an approach for the optimal design and operation of a batch ultrafiltration installation is presented. The approach is based on a dynamic model which takes into account both fouling and cleaning issues. An economic objective function, which includes capital and operating costs, is used and reasonable operating constraints are imposed. The overall problem is formulated as a dynamic optimisation model. A protein ultrafiltration plant involving the use of commercially available tubular ceramic membrane modules is studied. Optimal values for both design and operation variables such as the processing tank volume, the number of membrane modules, the feed and circulation pumps sizing, the work pressure profile and the timing of the operating and cleaning tasks are determined simultaneously.