This work presents a comparative study of the growth by plasma-assisted molecular beam epitaxy (MBE) of GaN layers on four different substrates: Si(111), Al2O3(0001), GaN/Al2O3 and ELOG GaN/Al2O3 templates. Optimization of the growth parameters for the case of growth of GaN layers on silicon substrates leads to smooth films with surface roughness below 5 nm, intense low temperature photoluminescence (PL) (15 meV FWHM) and X-ray diffraction (XRD) values of 8.5 arcmin. (FWHM). The quality of the material clearly improves when growing on sapphire substrates obtaining intense low- and-room temperature PL (10 and 54 meV FWHM, respectively) and XRD values of 6.5 arcmin (FWHM). The best GaN epilayers (intense low-temperature PL emissions with FWHM of 4 meV) are obtained when growing homoepitaxially on high quality GaN/Al2O3 templates, reproducing the optical and structural properties of the template underneath. Finally, the dislocation density decreases drastically from (6 to 10) × 109 cm2 for the case of silicon substrate to 〈106 cm–2 for the GaN layers grown on the ELOG templates.