Since the work of Favennec et al. it is well known that the quenching of luminescence from rare earth ions decreases with the host band gap. This has led to a large activity with silicon implanted or doped with RE, and then GaAs was used, in hope to realize simple, cheap light emitters. With a band gap of 3.4 eV at room temperature, GaN is even better suited to such applications. As a matter of fact, Steckl et al. have demonstrated a green light emitting device based on Er doped GaN. This resulted in a renewed effort in this direction, but the crystal quality still have to be mastered and the physical phenomenon involved to be understood. In this work, GaN and Er-doped GaN with various Er concentrations were grown by gas source molecular beam epitaxy on high quality GaN templates grown by metalorganic chemical vapour deposition. In order to understand the influence of the Er incorporation on the crystal quality of GaN, Er-doped GaN were grown with a concentration between 0.1% and 5%. High quality undoped GaN were also grown, as a reference material, to show how the smallest amount of Er may affect drastically the structural and optical properties. All the samples were characterized by scanning electron microscopy, atomic force microscopy and X-ray diffraction. With these measurements, we demonstrate a strong correlation between the Er concentration and the surface roughness and the crystalline quality. This study shows that the activation of the Erbium luminescence is not improved with improving crystal quality. This assumption supports the idea that Er luminescence should be related to defect center in GaN.