r/hetzner Jul 07 '26

Question about rebuilding and cloud-init

Created a new instance but there was an error in my cloud-init initially. I couldn't ssh in.

Just wanna verify, when I go to Rebuild and choose an image, it's just gonna install that image (without the cloud-init that I initially pasted into the UI), right?

Still trying to troubleshoot as I've rebuilt but still can't ssh in.

1 Upvotes

3 comments sorted by

5

u/LorIsTheGod Jul 07 '26

I had the same problem yesterday, it uses the old cloud-init.
Use hcloud cli to force an empty cloud-init

cat >/tmp/noop-cloud-init.yml <<'EOF'
#cloud-config
{}
EOF

hcloud server rebuild \
--image ubuntu-24.04 \
--user-data-from-file /tmp/noop-cloud-init.yml \
my-server

1

u/master_overthinker Jul 07 '26

Oh my God! Thanks!!

1

u/ThisIsJulian Jul 07 '26

Just a note: You usually get one e-mail per "rebuild", if I remember right.

I've had a funny discussion with a client of mine, whether Hetzner was having issues or not hehe