-
Notifications
You must be signed in to change notification settings - Fork 1
Hetzner Cloud
github-actions[bot] edited this page Feb 13, 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.
SSH keys must be pre-registered in Hetzner Cloud:
- Generate an SSH key pair:
ssh-keygen -t ed25519 -f ~/.ssh/hetzner_key -N ""
- Add the public key to Hetzner Cloud Console with name
benchmarks - Use the CLI with both paths:
--ssh-key ~/.ssh/hetzner_key --ssh-key-name benchmarks
For GitHub Actions, add the private key content as secret HETZNER_SSH_PRIVATE_KEY.
# Basic run (requires SSH key already in Hetzner)
python -m csp_benchmarks.hetzner.cli run --ssh-key-name benchmarks
# With options
python -m csp_benchmarks.hetzner.cli run \
--server-type cx43 \
--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 | cx23 |
--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 |
|---|---|---|---|
| cx23 | 2 | 4GB | Quick tests (default) |
| cx43 | 8 | 16GB | Standard 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 2026):
| Server | Hourly | Monthly |
|---|---|---|
| cx23 | €0.006 | €3.49 |
| cx43 | €0.015 | €9.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