As requested by the OP in the comments of the (correct and complete) accepted answer of user131755: it's possible to say more. > **Theorem** [Mochizuki 2004, vDdB 2019]. *Let $S$ and $S'$ be schemes. Then the natural functor $$\operatorname{Isom}(S,S') \to \mathbf{Isom}(\mathbf{Sch}_{S'},\mathbf{Sch}_S)$$ is an equivalence of categories, where $\operatorname{Isom}(S,S')$ is a discrete category and $\mathbf{Isom}$ denotes the category whose objects are equivalences and whose morphisms are natural isomorphisms.* The version where $\mathbf{Sch}$ denotes the category of locally Noetherian schemes with finite type morphisms is due to Mochizuki [Mochizuki 2004], and the general statement appears in a preprint of myself [vDdB 2019]. In particular, taking $S = S' = \operatorname{Spec} \mathbf Z$ answers the question, since $\operatorname{Aut}(\operatorname{Spec} \mathbf Z) = 1$. --- **Some ideas of the proof.** Here is a broad overview of the proof; more details can be found in [vDdB 2019]. As will become clear, most of the ideas were already present in some form, but there were some key tricks missing. **1. Underlying set.** The underlying set of $X \in \mathbf{Sch}_S$ is reconstructed as the set of isomorphism classes of simple subobjects. **2. Topology.** Although we don't know if regular monomorphisms in $\mathbf{Sch}$ are the same as (locally closed) immersions (see also [this question](https://mathoverflow.net/q/66279/82179)), we do know: - Every open immersion is a regular monomorphism; - Every closed immersion is a regular monomorphism; - Every regular monomorphism is an immersion. Thus, a morphism $f \colon X \to Y$ is an immersion if and only if it can be written as a composition of two regular monomorphisms. Next, one shows: > **Proposition.** *Let $(X,x)$ be a pointed scheme. Then $(X,x) \cong (\operatorname{Spec} R, \mathfrak m)$ for a valuation ring $R$ with maximal ideal $\mathfrak m$ if and only if all of the following hold:* > > 1. *$X$ is reduced and connected;* > 2. *the category of immersions $Z \hookrightarrow X$ containing $x$ is a linear order;* > 3. *there exists a subset $V \subseteq |X|$ that is the support of infinitely many pairwise non-isomorphic immersions $Z \hookrightarrow X$ containing $x$.* Together with the characterisation of immersions, this leads to categorical criteria for closed immersions and open immersions in $\mathbf{Sch}_S$. **3. Quasi-coherent sheaves.** A variant of the Beck cogroup argument (see also user131755's post) realises nilpotent thickenings $\mathbf{Spec}_X(\mathcal O_X \oplus \mathscr F) \to X$ as cogroups in $X/\mathbf{Sch}_X$. This gives (loosely speaking) a pseudofunctor \begin{align*} \mathbf{Sch}_S &\to \mathbf{Cat}^{\operatorname{op}}\\ X &\mapsto \mathbf{Qcoh}(\mathcal O_X), \end{align*} reconstructed from $\mathbf{Sch}_S$ using only categorical data. **4. The structure sheaf.** Now we run an enhanced version of [this argument of the OP](https://mathoverflow.net/a/65509/82179) (that took place in the ring setting). We would like to say that the '(pre)sheaf End' $\mathscr End(\mathbf{Qcoh}(\mathcal O_{-}))$ on $\mathbf{Sch}_S$ is isomorphic to the structure (pre)sheaf $\mathcal O$ on the big Zariski site $\mathbf{Sch}_S$. This is possible, but the difficulty is to say what exactly this presheaf End (or really prestack End) should be (also since it all takes place on the big Zariski site $\mathbf{Sch}_S$, not just the small Zariski site $S$). **5. Proof of main theorem.** By 2 and 4 above, we have reconstructed from $\mathbf{Sch}_S$ the topology on $|S|$ together with its structure sheaf $\mathcal O_S$. This gives (roughly speaking) some sort of lax functor of $2$-categories \begin{align*} \{\text{categories equivalent to } \mathbf{Sch}_S \text{ for some } S\} &\to \mathbf{Sch}\\ \mathbf{Sch}_S &\mapsto S. \end{align*} But in fact the reconstruction of the scheme $X \in \mathbf{Sch}_S$ (with its structure morphism $X \to S$) from categorical data in $\mathbf{Sch}_S$ is functorial in $X$. With some work, this shows that this lax functor is a lax inverse of $S \mapsto \mathbf{Sch}_S$. $\square$ (Because I don't really speak $n$-category, I phrase the last part a little differently in my paper.) --- **References.** [vDdB 2019] <cite authors="van Dobben de Bruyn, Remy">Remy van Dobben de Bruyn, *Automorphisms of categories of schemes*, 2019. Submitted. arXiv:[1906.00921](https://arxiv.org/abs/1906.00921).</cite> [Mochizuki 2004] <cite authors="Mochizuki, Shinichi">Shinichi Mochizuki, [*Categorical representation of locally Noetherian log schemes*](http://dx.doi.org/10.1016/j.aim.2003.10.005). Adv. Math. **188**.1, p. 222-246 (2004). [ZBL1073.14002](https://zbmath.org/?q=an:1073.14002).</cite>