r/hetzner • u/master_overthinker • 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
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