Let $S$ a Noetherian scheme and $X \subseteq |S|$ be a constructible subset of its topological space defined by some point-wise property $P$. To check whether $X$ is closed, it suffices to show that the property $P$ is stable under specialization, which reduces to checking the same condition on specializations of height 1. That is, we may reduce to the case that $S = \operatorname{Spec} A$ is a 1-dimensional, local Noetherian ring.
Often, in the literature, I see arguments now assume that $S$ is a DVR. This reduction corresponds to assuming that $S$ is regular. Why can one make this reduction? There are many examples inside of affine space of height one specializations that do not give rise to DVRs, e.g. the stalk at a singularity on a curve.
An example can be found in Conrad's reductive group schemes, the proof of Proposition 3.1.12. Brian is generally a careful guy, so I assume the reduction is valid, but I haven't found a justification for this in e.g. EGA IV3.9.
Sergey Guminov in the comments is correct - it won't literally be the case that if $s_0\rightsquigarrow s_1$ is a specialization in $S$, then $\mathcal{O}_{\overline{s_0},s_1}$ is a DVR. But what is true is that there exists a morphism $f:\operatorname{Spec} A\to S$ where $A$ is a DVR and the images of the generic and special point are $s_0,s_1$ respectively. For reference, Hartshorne exercise II.4.11(a) lays out how to prove it:
Here's the Krull-Akizuki theorem referenced above:
This gets you the required $f$ and $A$, and now (assuming your condition plays nicely with base change) you can really assume that $S$ is the spectrum of a DVR.