In the context of increasing use of renewable energy sources, residential energy supply systems are changing as well. In this paper, a techno-economical model for the energy supply of a district including both electrical and thermal demand as well as renewable energy generation is developed. Furthermore, a high penetration of fuel cell electric vehicles is assumed and the hydrogen has to be provided by the energy supply system as well. The single components of the energy system are optimal sized, with respect to the total cost of ownership of the system, while the systems operation strategy is defined by a fixed ranking list. A reference case is defined by actual or near future techno-economical assumptions of the components. In the resulting optimal system, the most important components are a large PV system, a SOFC for heat and power generation and a PEM electrolyzer for hydrogen production. The produced hydrogen is used solely to refuel the fuel cell electric vehicles. On this basis, the influences of the components investment costs and the energy purchasing costs on the system configuration are investigated. It is shown that, the PV investment costs as well as the feed-in tariff can cause qualitative differences in the system configuration. Moreover, interactions between all conversion devices with respect to the optimal sizing are identified. Finally, it is shown that if the PV investment costs and the feed-in tariff decreases in the future, a reconversion of the self produced hydrogen in the SOFC becomes economically feasible, even for small natural gas purchasing costs.