A Java client for the Hetzner Cloud API
Example: Create a firewall and a server
HetznerCloudAPI api = new HetznerCloudAPI("API-TOKEN");
Firewall firewall = api.firewalls().create(b -> b
.name("allow-icmp-from-everywhere")
.firewallRule(r -> r
.direction(FirewallRule.Direction.IN)
.protocol(FirewallRule.Protocol.ICMP)
.sourceIP("0.0.0.0/0")
.sourceIP("::/0")))
.firewall();
Server server = api.servers().create(b -> b
.name("my-server")
.startAfterCreate(false)
.serverType("cax11")
.image("...")
.datacenter("...")
.firewall(firewall.id()))
.server();
Installation guide for the latest release
See the contributing guide for detailed instructions on how to get started with our project.
View the license of the current project or the summary including all dependencies