TRPV1+ neurons mediate survival and bacterial clearance in pneumonia. Here, TRPV1 is linked to pneumonia.