-
Notifications
You must be signed in to change notification settings - Fork 1
Hetzner Cloud
github-actions[bot] edited this page Feb 12, 2026
·
5 revisions
csp-benchmarks supports running benchmarks on dedicated Hetzner Cloud servers for consistent, reproducible results.
- Consistent environment: Dedicated VMs provide stable performance
- Cost-effective: Pay only for benchmark time
- Automated: Full automation via CLI and GitHub Actions
- Reproducible: Same hardware configuration each run
- Go to Hetzner Cloud Console
- Create a new project
- Generate an API token with read/write permissions
Set the HCLOUD_TOKEN environment variable:
export HCLOUD_TOKEN="your-api-token-here"For GitHub Actions, add it as a repository secret.
For passwordless access:
- Add your SSH public key to Hetzner Cloud
- Set the key name in the CLI:
--ssh-key-name my-key - Provide the private key path:
--ssh-key ~/.ssh/id_rsa
# Basic run
python -m csp_benchmarks.hetzner.cli run
# With options
python -m csp_benchmarks.hetzner.cli run \
--server-type cpx41 \
--commits "HEAD~5..HEAD" \
--push| Option | Description | Default |
|---|---|---|
--token |
Hetzner API token | $HCLOUD_TOKEN |
--server-name |
Server name | csp-benchmark-runner |
--server-type |
Server size | cpx21 |
--ssh-key |
Path to SSH private key | None |
--ssh-key-name |
Hetzner SSH key name | None |
--branches |
Branches to benchmark | main |
--commits |
Commit range | None |
--reuse |
Reuse existing server | False |
--keep-server |
Keep server after run | False |
--push |
Push results to repo | False |
Remove leftover servers:
python -m csp_benchmarks.hetzner.cli cleanup| Type | vCPU | RAM | Use Case |
|---|---|---|---|
| cpx21 | 3 | 4GB | Quick tests (default) |
| cpx41 | 8 | 16GB | Standard benchmarks |
| cpx51 | 16 | 32GB | Large benchmarks |
The benchmarks workflow automatically uses Hetzner Cloud:
# .github/workflows/benchmarks.yaml
- name: Run benchmarks on Hetzner
env:
HCLOUD_TOKEN: ${{ secrets.HCLOUD_TOKEN }}
run: |
python -m csp_benchmarks.hetzner.cli run --push| Secret | Description |
|---|---|
HCLOUD_TOKEN |
Hetzner Cloud API token |
HETZNER_SSH_PRIVATE_KEY |
SSH private key (optional) |
┌─────────────────┐
│ GitHub Action │
└────────┬────────┘
│
▼
┌─────────────────┐ ┌─────────────────┐
│ CLI Runner │────▶│ Hetzner Cloud │
└─────────────────┘ └────────┬────────┘
│
┌───────────────────────┘
▼
┌─────────────────┐
│ Ubuntu Server │
│ - Clone repo │
│ - Run ASV │
│ - Push results │
└─────────────────┘
- Check API token permissions
- Verify server type is available in the selected location
- Check Hetzner Cloud quotas
- Ensure the server has finished provisioning (cloud-init)
- Verify SSH key is correctly configured
- Check firewall rules in Hetzner Cloud
- Check CSP build dependencies are installed
- Verify Python version compatibility
- Review cloud-init logs:
ssh root@<ip> cat /var/log/cloud-init-output.log
Approximate costs (as of 2024):
| Server | Hourly | Monthly |
|---|---|---|
| cpx21 | €0.008 | €5.18 |
| cpx41 | €0.027 | €17.49 |
Servers are automatically deleted after benchmarks complete.
This wiki is autogenerated. To made updates, open a PR against the original source file in docs/wiki.
Get Started
Benchmarks