Oficjalne CLI do zarządzania Hetzner Cloud. Zainstalowane via brew install hcloud.
| Zasób | Komenda | Status |
|---|---|---|
| Serwery | hcloud server |
GA |
| DNS Zones | hcloud zone |
GA (od v1.57) |
| Firewalle | hcloud firewall |
GA |
| Load Balancery | hcloud load-balancer |
GA |
| Storage Boxy | hcloud storage-box |
GA (od v1.61) |
| Volumes | hcloud volume |
GA |
| Sieci (VPC) | hcloud network |
GA |
| Certyfikaty | hcloud certificate |
GA |
| SSH Keys | hcloud ssh-key |
GA |
| Floating IPs | hcloud floating-ip |
GA |
| Snapshoty | hcloud image |
GA |
| Placement Groups | hcloud placement-group |
GA |
# Status serwera
hcloud server describe data-collector-1
# Bezpośrednie SSH
hcloud server ssh data-collector-1
# Snapshot przed deployem
hcloud server create-image data-collector-1 --description "pre-deploy $(date +%Y-%m-%d)"
# Metryki
hcloud server metrics data-collector-1 --type cpu,disk,network
# DNS — dodaj rekord
hcloud zone add-records example.pl \
--record "type=A,name=staging,value=1.2.3.4,ttl=3600"
# Firewall — lista reguł
hcloud firewall describe rdh-production
# Export DNS zone (backup)
hcloud zone export-zonefile example.pl > zone-backup.txt
# Wszystkie zasoby jednym poleceniem
hcloud all list
hcloud server list # tabela (domyślnie)
hcloud server list -o json # JSON
hcloud server list -o yaml # YAML
hcloud server list -o columns=id,name,status # wybrane kolumny
hcloud context create staging
hcloud context use octadecimal
hcloud context list
https://api.hetzner.cloud/v1Authorization: Bearer $HTZ_API_TOKEN# Domeny
ovhcloud domain-name list
ovhcloud domain-name info octadecimal.pl
# DNS Zones
ovhcloud domain-zone record list octadecimal.pl
ovhcloud domain-zone record add octadecimal.pl --type A --name staging --target 1.2.3.4
# Email
ovhcloud email-domain list
ovhcloud email-domain account list octadecimal.pl
# IAM
ovhcloud iam user list
ovhcloud iam token list
# Account
ovhcloud account info
ovhcloud account bill list
CLI v0.9 nie obsługuje jeszcze /hosting/web — do hostingów używaj SDK:
const ovh = require('@ovhcloud/node-ovh')({
endpoint: 'ovh-eu',
appKey: process.env.OVH_APP_KEY,
appSecret: process.env.OVH_APP_SECRET,
consumerKey: process.env.OVH_CUSTOMER_KEY
});
// Lista hostingów
const services = await ovh.requestPromised('GET', '/hosting/web');
// Bazy danych
const dbs = await ovh.requestPromised('GET', '/hosting/web/{svc}/database');
// SSL
const ssl = await ovh.requestPromised('GET', '/hosting/web/{svc}/ssl');
// Cron
const crons = await ovh.requestPromised('GET', '/hosting/web/{svc}/cron');
| Zadanie | Najlepsze narzędzie |
|---|---|
| DNS zones / rekordy | CLI lub SDK |
| Domeny — lista/info | CLI |
| IAM — users/tokens | CLI |
| Hosting — bazy danych | SDK (Node.js) |
| Hosting — cron/SSL/users | SDK |
| Email — konta/redirecty | CLI lub SDK |
| IaC — powtarzalna infra | Terraform/Pulumi |
https://eu.api.ovh.com/1.0https://eu.api.ovh.com/v2resource "ovh_domain_zone_record" "staging" {
zone = "octadecimal.pl"
subdomain = "staging"
fieldtype = "A"
target = "1.2.3.4"
ttl = 3600
}
# VPS — pełny dostęp (deploy user, sudo z hasłem)
ssh deploy@46.225.114.176 # Hetzner VPS
ssh debian@51.83.253.165 # OVH VPS (Mailcow)
# Shared hosting Pro — ograniczony SSH
ssh wheelse@ssh.cluster121.hosting.ovh.net # ovh-2wheels
ssh octadev@ssh.cluster021.hosting.ovh.net # ovh-octadecimal
# Shared hosting Perso/Free — tylko SFTP
sftp wilsone@ftp.cluster100.hosting.ovh.net # ovh-wilsonos
# Status wszystkich kontenerów
docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"
# Zarządzanie serwisem
docker compose -f ops/twenty-crm/docker-compose.yml ps
docker compose -f ops/twenty-crm/docker-compose.yml restart
docker compose -f ops/twenty-crm/docker-compose.yml logs -f --tail=50
# n8n działa natywnie (nie Docker)
# Home: ~/.n8n/, DB: ~/.n8n/database.sqlite
| Serwis | Compose | Port |
|---|---|---|
| Twenty CRM | ops/twenty-crm/docker-compose.yml | :3000, :5433 |
| Rocket.Chat | ops/rocket-chat/docker-compose.yml | :3100 |
| Qdrant | ops/qdrant/docker-compose.yml | :6333 |
| Wiki.js | ops/wiki/docker-compose.yml | :3200 |
| ShellGate | ops/shellgate/docker-compose.yml | :3300 |
Wszystkie dane dostępowe w ops/devops-team/.server-credentials (gitignored).
Zawiera:
NIGDY nie hardcoduj credentials w skryptach — zawsze ładuj z pliku.
Skill files: ops/devops-team/.claude/skills/
API configs: ops/devops-team/.claude/servers/_hetzner-api.yml, _ovh-api.yml
Ostatnia aktualizacja: 2026-02-27