Epitaxially grown \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\hbox {SrTiO}_{{3}}$$\end{document} (STO) thin films are material enablers for a number of critical energy-conversion and information-storage technologies like electrochemical electrode coatings, solid oxide fuel cells and random access memories. Oxygen vacancies ( \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{V}_{{\mathrm{O}}}}$$\end{document} ), on the other hand, are key defects to understand and tailor many of the unique functionalities realized in oxide perovskite thin films. Here, we present a comprehensive and technically sound ab initio description of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{V}_{{\mathrm{O}}}}$$\end{document} in epitaxially strained (001) STO thin films. The novelty of our first-principles study lies in the incorporation of lattice thermal excitations on the formation energy and diffusion properties of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{V}_{{\mathrm{O}}}}$$\end{document} over wide epitaxial strain conditions ( \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$-4 \le \eta \le +4$$\end{document} %). We found that thermal lattice excitations are necessary to obtain a satisfactory agreement between first-principles calculations and the available experimental data for the formation energy of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$${\mathrm{V}_{{\mathrm{O}}}}$$\end{document} . Furthermore, it is shown that thermal lattice excitations noticeably affect the energy barriers for oxygen ion diffusion, which strongly depend on \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\eta $$\end{document} and are significantly reduced (increased) under tensile (compressive) strain. The present work demonstrates that for a realistic theoretical description of oxygen vacancies in STO thin films is necessary to consider lattice thermal excitations, thus going beyond standard zero-temperature ab initio approaches.