In organic greenhouse farming, only organic fertilizers are used. Ensuring sufficient availability of nitrogen to the crop in this situation is challenging because most of the nitrogen in organic fertilizers must be mineralized before it can be taken up by the crop. The objective of our work was to develop a method to optimize fertilizer strategy. We developed the simple model LINFERT, which describes the time course of mineralization and environmental loss of mineralized nitrogen in such a way that the cumulative mineralization and loss of nitrogen are linearly related to the amounts of fertilizer applied. The linear relation means that LP (linear programming) can be used to optimize the model. Cumulative mineralization and nitrogen loss simulated with the simple model were compared with the equivalent numbers simulated by a detailed soil process model describing water movement, N transport and N transformation processes. In earlier, related work with the detailed model, mineralization, leaching and denitrification under greenhouse conditions were simulated correctly. It was found that the simple model was able to simulate the time course of plant-available nitrogen with sufficient detail to allow optimization of fertilizer strategy. When the constraints of the optimization were set to represent the constraints met by today’s growers, the optimization generated fertilizer strategies that were similar to today’s strategies. We take this to mean that our optimization method will be helpful to farmers when current fertilizer strategies are fine-tuned, and when in the future fertilizer strategies are needed that place greater emphasis on reducing nitrogen loss.