clawmechanic.ai โ€บ hetzner-vps-setup

Set Up a Hetzner VPS
for OpenClaw

A step-by-step walkthrough with real screenshots. No server experience needed โ€” just follow along.

Lite โ€” CPX22 ยท 4 GB RAM Heavy โ€” CPX32 ยท 8 GB RAM
Use CasePlanRAMCPUSSDEst. Price
LITE  1 bot, personal use CPX22 4 GB3 vCPU80 GB~$6.59/mo
HEAVY  Multiple bots, production CPX32 8 GB4 vCPU160 GB~$12/mo

1

Create your Hetzner account

hetzner.com โ†’ Login โ†’ Console โ†’ Register

Go to hetzner.com. In the top-right navigation, click Login โ†’ Console. On the login screen, click Register now if you don't have an account.

console.hetzner.cloud โ€” Login
Hetzner login screen

Fill in your email and a strong password. Complete the contact info and payment screens that follow.

Registration complete โœ“
Registration success
๐Ÿ’ฐ
โ‚ฌ20 free credit on new accountsEnough to run a CPX22 for 2โ€“3 months before you're charged anything.

2

Generate your SSH key pair

Terminal (Mac/Linux) or PowerShell (Windows) โ€” run on your local machine

SSH keys replace passwords for server login โ€” more secure, more convenient. One command creates two files: a private key (never leaves your machine) and a public key (you give this to Hetzner).

Terminal โ€” generate key pair
ssh-keygen -t ed25519 -C "openclaw" -f ~/.ssh/openclaw_key
  • โ†’When asked for a passphrase: press Enter twice to skip, or type one for extra security
  • โ†’Two files appear in ~/.ssh/ โ€” openclaw_key (private) and openclaw_key.pub (public)

Now print your public key so you can copy it:

View your public key
cat ~/.ssh/openclaw_key.pub

The output will look something like this โ€” copy the entire line:

Example output
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAI...  openclaw
๐Ÿ”
Save both keys in your password manager right nowOpen 1Password, Bitwarden, or similar. Create a Secure Note. Paste the public key output. Note the private key path (~/.ssh/openclaw_key). You'll need this if you ever change machines.
๐ŸชŸ
WindowsSame commands work in PowerShell. Keys save to C:\Users\YourName\.ssh\

3

Create your server

console.hetzner.cloud โ†’ your project โ†’ Create Resource โ†’ Servers

After logging in you'll land on your project dashboard. Rename the default project to something descriptive like OpenClaw (click the โ‹ฏ menu on the project card). Then click Create Server under that project.

Hetzner Console โ€” Projects โ†’ Create Server
Hetzner Console projects page showing Default project with Create Server option
โš™๏ธ Type Regular Performance โ†’ x86 (AMD)

Select Regular Performance under Shared Resources. Best price/performance for OpenClaw. Architecture: x86 (AMD).

Create Server โ†’ Type
Server type selection

Scroll down in that section to the server list and select CPX22 (lite) or CPX32 (heavy):

CPX22 selected โ€” 3 vCPU ยท 4 GB RAM ยท $4.99/mo
CPX22 selected row
โœ…
CPX22 for lite use  ยท  CPX32 for heavy useThe total shown (image above) is $6.59/mo โ€” that includes the server + backups + IPv4. Backups are optional but recommended.
๐Ÿ“ Location

Pick the region closest to you or your users. Any works fine.

Location selection
Location picker
๐Ÿง Image โ€” Ubuntu 22.04

Select Ubuntu, then use the version dropdown to switch from 24.04 โ†’ 22.04 LTS. OpenClaw is tested on 22.04.

Image โ†’ Ubuntu (change dropdown to 22.04)
Ubuntu OS selection
โš ๏ธ
Must change to Ubuntu 22.04The default selected version is 24.04. Click the dropdown arrow on the Ubuntu card and switch it to 22.04 LTS before proceeding.
๐ŸŒ Networking

Leave Public IPv4 and Public IPv6 both checked. No private networks needed.

๐Ÿ”‘ SSH Keys โ€” paste your public key here

This is critical. Without it, Hetzner emails you a root password instead โ€” less secure. Click + Add SSH key:

SSH Keys โ€” no key added yet
SSH keys warning
+ Add SSH key โ€” paste your .pub content here
Add SSH key modal

After adding, your key appears as a card. Make sure it's selected (red border = selected):

SSH key added and selected โœ“
SSH key selected
๐Ÿ“ฆ Volumes / Firewalls / Backups / Cloud Config / Labels

We'll set up the firewall separately after the server is running (Step 5). For now:

  • โ†’Volumes โ€” skip, not needed
  • โ†’Firewalls โ€” skip for now, we'll add one after creation
  • โ†’Backups โ€” optional but recommended (+20% of server price โ‰ˆ $1/mo for CPX22)
  • โ†’Cloud config / Labels / Placement groups โ€” skip all
๐Ÿš€ Name your server and buy

Give it a name (e.g. openclaw-prod) and click Create & Buy now. The server is ready in about 30 seconds.

Name your server
Server name field
Buy your server
Create Resource dropdown

4

Set up a firewall

console.hetzner.cloud โ†’ Create Resource โ†’ Firewalls

A firewall blocks all unwanted inbound traffic while keeping your bot's outbound connections open. You only need two inbound rules: SSH (so you can connect) and PING (for diagnostics).

From your project dashboard, click Create Resource โ†’ Firewalls:

Dashboard โ†’ Create Resource โ†’ Firewalls
Hetzner dashboard showing Create Resource dropdown with Firewalls option
Inbound rules โ€” SSH + PING only

Hetzner adds these two rules by default when you create a firewall. Leave them exactly as shown โ€” don't add anything else:

Inbound rules โ€” SSH (TCP/22) + PING (ICMP)
Create Firewall showing inbound rules: SSH (TCP port 22) and PING (ICMP)
๐Ÿ’ก
Why only SSH and PING?OpenClaw's outbound tunnel means ClawMechanic connects out from your server โ€” no inbound ports needed for monitoring. Keeping inbound ports minimal is correct and intentional.
Outbound rules

Leave outbound rules empty (no rules = all outbound traffic allowed). This is what you want.

Name and create

Give the firewall a name like openclaw-fw and click Create Firewall:

Name your firewall
Firewall name field
Create Firewall
Create Firewall form showing inbound rules, outbound rules, apply to, labels, name, and Create Firewall button

You can leave Apply to and Labels blank โ€” the firewall will be applied to your VPS automatically when you create it.

๐Ÿ”’
Your server is now locked downOnly SSH (port 22) is open inbound. All outbound traffic โ€” including ClawMechanic's monitoring tunnel โ€” is allowed.
ClawMechanic

Server ready.

Your Hetzner VPS is running, secured with SSH keys, firewall active, and Node.js installed. Next: install OpenClaw and connect to ClawMechanic.

Start Free Trial โ†’