based on this tutorial
- A simple instance is enough for this tutorial (2gb RAM, ARM)
- choose a debian based distro as image - paste your cloud config and finish the setup
- create ssh key pair
ssh-keygen -b 4096
- copy pub key to file config see Config File
MacOS:cat ~/.ssh/my_pub_key | pbcopy
Linux:cat ~/.ssh/my_pub_key | xclip -selection clipboard
- public file
#include
https://URLtoCode/config.yaml
- example usage for this repo
#include
https://raw.githubusercontent.com/EricKrg/cloudinit-breakout-un-deRSE23/main/hetzner_cloudinit_example.yml
- private file with JWT, will also work with basic HTTP Auth
curl \
-X POST \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"image":"ubuntu-22.04","location":"nbg1","name":"my-server","server_type":"cx11","user_data":"#include\nhttps://URLtoCode/config.yaml"}' \
'https://api.hetzner.cloud/v1/servers'
- test the setup by trying to connect to the created instance via ssh
ssh <ssh-user>@<server-ip>
example usage: ssh [email protected]