This paper considers the capacitated facility location problem with convex and differentiable production costs functions, an optimization problem that finds numerous real-world applications such as queues in call-centers, server queuing or when production is pushed beyond normal capacity limits leading to over proportional growth in production costs. As opposed to most other solution methods for this and similar problems, we propose an exact method that instead of linearizing the cost functions deals directly with the nonlinear costs. To this end, we use a Lagrangian relaxation of the demand constraints leading to a Lagrangian subproblem with a nonlinear objective function. The Lagrangian dual is (approximately) solved by means of subgradient optimization. Proven optimal solutions to the facility location problem are then found by employing this lower bounding scheme in a branch and bound algorithm. We use this method for solving a large number of test problem instances with production costs that either follow a quadratic or an inverse cost function. Our computational experiments show that the proposed solution method is in most cases superior to other solution methods for this problem.