# Setting Up a NixOS 23.05 Development VM on Hetzner Cloud with nixos-anywhere

**URL:** https://discourse.nixos.org/t/setting-up-a-nixos-23-05-development-vm-on-hetzner-cloud-with-nixos-anywhere/34122
**Category:** Guides
**Created:** [October 12, 2023, 4:59pm UTC](https://discourse.nixos.org/t/setting-up-a-nixos-23-05-development-vm-on-hetzner-cloud-with-nixos-anywhere/34122 "2023-10-12T16:59:53Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![LGUG2Z](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/l/a8b319/32.png) [@LGUG2Z](https://discourse.nixos.org/u/LGUG2Z)
#### Post date: [October 12, 2023, 4:59pm UTC](https://discourse.nixos.org/t/setting-up-a-nixos-23-05-development-vm-on-hetzner-cloud-with-nixos-anywhere/34122/1 "2023-10-12T16:59:53Z")

</div>

I was previously using [`nixos-infect`](https://github.com/elitak/nixos-infect) to set up cloud VMs with NixOS, but I recently saw the [nixos-anywhere announcement](https://discourse.nixos.org/t/nixos-anywhere-1-0-release/33145) and wanted to give it a try.

I ended up with this [video walkthrough](https://www.youtube.com/watch?v=wr22CyoyRo4) and this [template repo](https://github.com/LGUG2Z/nixos-hetzner-cloud-starter) for anyone else who would like to follow along.

---

<div class="post-metadata">

### Author: ![prescientmoon](https://discourse.nixos.org/user_avatar/discourse.nixos.org/prescientmoon/32/17543_2.png) [@prescientmoon](https://discourse.nixos.org/u/prescientmoon)
#### Post date: [October 17, 2023, 2:53am UTC](https://discourse.nixos.org/t/setting-up-a-nixos-23-05-development-vm-on-hetzner-cloud-with-nixos-anywhere/34122/2 "2023-10-17T02:53:32Z")

</div>

Note that this seems to be reading the secrets into the nix store. I wonder how one would go about automatically generating host keys and re-keying agenix/sops-nix secrets using the new key before the install performed by nixos-anywhere.
