We studied the method to grow a smooth and flat CaF 2 layer on NdFeAsO thin films since CaF 2 is a promising candidate material for the barrier layer of a superconducting junction. When the CaF 2 layer was grown at 800°C, the surface was very rough because {111} facets had grown preferentially. However, when CaF 2 was grown at lower temperatures and post-annealed in situ at 800°C for 30 min the facets were eliminated and a CaF 2 layer with a smooth surface was obtained. Fluorine diffusing from CaF 2 into NdFeAsO was observed when CaF 2 was grown at high temperatures, but the diffusion was suppressed by lowering the growth temperature to 400°C.