Entanglement between single spins and photons is an important resource in quantum information science, e.g. in quantum networking. Rare-earth ions in dielectric crystals have emerged as a promising candidate for this task. Rare-earth ion doped solids have been used so far mostly as ensemble-based quantum memories. However, they also feature promising properties for single ion detection and manipulation, such as long-lived spins, narrow optical transitions and preservation of coherence properties when inserted in nanostructures. Because of the long lifetimes of the optical t