trinithunder / ltek_systems

0 stars 0 forks source link

Automated VPS/Dedicated Server Setup via JSON API #1

Open trinithunder opened 1 month ago

trinithunder commented 1 month ago

Use Hetzner Cloud API to manage VPS creation, deletion, and modification. Integrate Faraday to make API requests for server provisioning. Depending on the API responses, you can either allocate a single VPS per account or install multiple user accounts on one server.

trinithunder commented 1 month ago

Example Faraday request for provisioning a VPS:

response = Faraday.post("https://api.hetzner.cloud/v1/servers") do |req| req.headers['Authorization'] = "Bearer #{your_api_token}" req.body = { name: "new-server", server_type: "cx11", # Adjust based on the server type needed image: "ubuntu-20.04" }.to_json end