The chemical reactions and pathways resulting in the formation of D-serine, the D-enantiomer of serine, i.e. (2R)-2-amino-3-hydroxypropanoic acid. D-serine is often formed by racemization of L-serine.