Retrieving quantitative parameters from magnetic resonance imaging (MRI), e.g. for early assessment of radiotherapy treatment response, necessitates contouring regions of interest, which is time-consuming and prone to errors. This becomes more pressing for daily imaging on MRI-guided radiotherapy systems. Therefore, we trained a deep convolutional neural network to automatically contour involved lymph nodes on diffusion-weighted (DW) MRI of head and neck cancer (HNC) patients receiving radiotherapy. DW-images from 48 HNC patients (18 induction-chemotherapy+chemoradiotherapy; 30 definitive chemoradiotherapy) with 68 involved lymph nodes were obtained on a diagnostic 1.5T MR-scanner prior to and 2-3 timepoints throughout treatment. A radiation oncologist delineated the lymph nodes on the b=50s/mm2 images. A 3D U-net was trained to contour involved lymph nodes. Its performance was evaluated in all 48 patients using 8-fold cross-validation and calculating the Dice similarity coefficient (DSC) and the absolute difference in median apparent diffusion coefficient (ΔADC) between the manual and generated contours. Additionally, the performance was evaluated in an independent dataset of three patients obtained on a 1.5T MR-Linac. In the definitive chemoradiotherapy patients (n=96 patients/lymphnodes/timepoints) the DSC was 0.87 (0.81-0.91) [median (1st-3rd quantiles)] and ΔADC was 1.9% (0.8-3.4%) and both remained stable throughout treatment. The network performed worse in the patients receiving induction-chemotherapy (n=65), with DSC=0.80 (0.71-0.87) and ΔADC=3.3% (1.6-8.0%). The network performed well on the MR-Linac data (n=8) with DSC=0.80 (0.75-0.82) and ΔADC=4.0% (0.6-9.1%). We established accurate automatic contouring of involved lymph nodes for HNC patients on diagnostic and MR-Linac DW-images.