Geothermal plants have been increasingly constructed in recent years to exploit the high geothermal energy potential in Germany in district heating networks at the municipal level. In order to use this potential economically, municipal planners need instruments for designing the district heating network to supply households with the geothermal heat. This paper presents a combinatorial mixed-integer linear optimisation model and a three-stage heuristic to determine the minimum costs for geothermal district heating systems in municipalities. The central innovations are the ability to optimise both the structure of the district heating network and the location of the district heating plant, the consideration of partial heat supply from district heating and the scalability to many larger municipalities. A comparison of optimisation and heuristic for three exemplary municipalities demonstrates the efficiency of the developed heuristic: the optimisation takes between 500% and 10,000,000% more time than the heuristic. The resulting deviations in the calculated total investment for the district heating from the results of the optimisation a ... mehrre in all cases below 5% and in 80% of cases below 0.3%. The efficiency of the heuristic is further demonstrated by the comparison with simpler heuristics like the Nearest-Neighbour-Heuristic. The latter is not only less efficient, it substantially overestimates the total costs by up to 80% in all cases with less than 100% heat coverage. Future work should focus on a more precise consideration of heat losses in the district heating network, as well as taking additional geological and topological conditions in the municipalities into account.