Blocking the CD40-CD154 pathway prevents allograft rejection and induces donor-specific tolerance in various experimental models. However, the translation to clinical studies has been hampered by unexpected thromboembolic complications of CD154-blocking antibodies. Thus, blocking CD40 instead is now considered as an alternative strategy. Here, we evaluated the role of donor CD40 in allospecific T-cell responses in vitro and in an in vivo model for renal transplantation. Fully MHC-mismatched allografts from CD40-deficient donors displayed better renal function than wild type. These functional data correlated with a lower level of apoptosis in renal tubular epithelial cells and higher expression of PD-L1, which is most probably because of a reduced Th17 response in recipients of a CD40-deficient donor. This hypothesis was supported in vitro, where donor CD40 expression was important for the induction of direct allospecific T-cell responses. Especially the induction of Th17 cells was critically dependent on donor CD40. IL-17A in conjunction with interferon-γ in turn rendered renal tubular epithelial cells to a more costimulatory state by upregulating CD40 and downregulating PD-L1 expression. In conclusion, CD40 blockade not only reduces the allospecific T-cell responses, but might also lead to protection of tubular epithelium from apoptosis and thereby preserve kidney allograft function.