
Prerequisites
- A Hetzner Cloud account (https://console.hetzner.cloud)
- An API token
- An SSH key pair (local
~/.ssh/id_rsaand~/.ssh/id_rsa.pub)
Get Your API Token
- Go to Hetzner Cloud Console > select your project (or create one)
- Security > API Tokens > Generate API Token
- Set permissions to Read & Write
- Copy the token (shown only once)
Configuration
Minimal Setup
Server Types
Hetzner’s pricing is significantly cheaper than other providers:| Server Type | vCPU | RAM | Disk | $/hr | $/month | Best For |
|---|---|---|---|---|---|---|
| cx22 | 2 | 4 GB | 40 GB | ~$0.007 | ~$4.50 | Light scans, single targets |
| cx32 | 4 | 8 GB | 80 GB | ~$0.013 | ~$8.50 | General scanning |
| cx42 | 8 | 16 GB | 160 GB | ~$0.025 | ~$16.50 | Heavy scans, parallel tools |
| cx52 | 16 | 32 GB | 320 GB | ~$0.050 | ~$33.00 | Large-scale operations |
| cpx21 | 3 | 4 GB | 80 GB | ~$0.008 | ~$5.50 | CPU-optimized scanning |
| cpx31 | 4 | 8 GB | 160 GB | ~$0.015 | ~$10.00 | CPU-optimized, more RAM |
Locations
| Location | Code | Region |
|---|---|---|
| Falkenstein | fsn1 | Germany |
| Nuremberg | nbg1 | Germany |
| Helsinki | hel1 | Finland |
| Ashburn | ash | US East |
| Hillsboro | hil | US West |
| Singapore | sin | Asia |
Custom Image
Use a pre-built snapshot for faster boot:SSH Key (optional)
If you have an SSH key registered in Hetzner Cloud:Cost Limits
Examples
Quick Domain Recon
Budget Bulk Scanning
Hetzner’s low prices make it perfect for scanning many targets:Custom Command Pipeline
Distributed Nuclei at Scale
Port Scanning
Persistent Low-Cost Lab
EU-Based Scanning
Hetzner’s European locations are useful when you need scans originating from EU IP space:High-Performance with cx42
Cost Comparison
Why Hetzner is the cheapest option for bulk scanning:| Scenario | Hetzner (cx22) | DigitalOcean (s-2vcpu-4gb) | AWS (t3.medium) |
|---|---|---|---|
| 1 instance x 1 hour | $0.007 | $0.022 | $0.042 |
| 5 instances x 2 hours | $0.07 | $0.22 | $0.42 |
| 10 instances x 4 hours | $0.28 | $0.89 | $1.66 |
| 20 instances x 8 hours | $1.12 | $3.57 | $6.66 |
Troubleshooting
”Unauthorized” Error
Your API token is invalid or expired. Generate a new one in the Hetzner Cloud Console.Server Type Not Available
Some server types may not be available in all locations. Try a different location:SSH Connection Issues
Hetzner servers default toroot user:
Rate Limiting
Hetzner’s API has rate limits. If creating many instances at once, you may hit them. Space out creation or contact Hetzner support to increase limits.Cleaning Up
Best Practices
- Use cx22 as default — 2 vCPU / 4 GB is enough for most scans at $0.007/hr
- Scale horizontally — 10 x cx22 is cheaper and faster than 1 x cx52 for parallelizable workloads
- Always
--auto-destroy— even at $0.007/hr, forgotten instances add up - Use European locations (fsn1, nbg1) for lowest latency to Hetzner’s network
- Pre-build snapshots for frequently-used tool configurations to skip setup time
- Set modest cost limits — even $5.00 max_total_spend goes a long way at Hetzner pricing
