We report the energy dependence of mid-rapidity (anti-)deuteron production in Au+Au collisions at $sqrt{s_text{NN}} = $7.7, 11.5, 14.5, 19.6, 27, 39, 62.4, and 200 GeV, measured by the STAR experiment at RHIC. The yield of deuterons is found to be well described by the thermal model. The collision energy, centrality, and transverse momentum dependence of the coalescence parameter $B_2$ are discussed. We find that the values of $B_2$ for anti-deuterons are systematically lower than those for deuterons, indicating that the correlation volume of anti-baryons is larger than that of baryons at $sqrt{s_text{NN}}$ from 19.6 to 39 GeV. In addition, values of $B_2$ are found to vary with collision energy and show a broad minimum around $sqrt{s_text{NN}}= $20 to 40 GeV, which might imply a change of the equation of state of the medium in these collisions.