CLOUD PROVIDERS
August 5, 2026

How to Set Up a Hetzner Cloud Server

5 min read
Author
CloudStick Team
Security Specialist
Share this article
How to Set Up a Hetzner Cloud Server
CloudStick
Hetzner
Cloud Setup

What Makes Hetzner Different From AWS or DigitalOcean

Hetzner's entire pitch is price-to-performance: a dedicated-vCPU Cloud instance with 4GB RAM costs a fraction of the equivalent DigitalOcean or AWS box, and the raw CPU benchmarks routinely beat providers charging two to three times as much. That is why it has become a default pick for agencies running several WordPress or Laravel sites on one server and watching margin closely.

The tradeoff is geography. Hetzner Cloud's region list is short and EU-heavy — Falkenstein, Nuremberg, and Helsinki in Europe, with Ashburn (US East), Hillsboro (US West), and Singapore as the only non-EU options. If your traffic is mostly European, latency is excellent. If your audience is spread across Asia-Pacific or South America, you are choosing between a distant EU region or one of only two US datacenters, and that gap is worth weighing before you commit rather than after your users start complaining about load times.

Hetzner does not compete on region count — it competes on what a single euro buys you inside the regions it does have. For an EU-facing app, that trade is close to free money; for a global audience, it is a real latency decision, not a footnote.

Choosing a Server Type: CX vs. CPX/CCX

Hetzner splits its Cloud line into shared-vCPU CX instances and dedicated-vCPU CPX (AMD) or CCX (Intel) instances. CX is the cheapest option, but the vCPU is shared with other tenants on the same physical host, so performance can dip under noisy-neighbor load. CPX and CCX pin actual dedicated cores to your instance and cost more per GB of RAM, but CPU performance stays consistent even when the host is busy.

For a single low-traffic WordPress site or a staging environment, a CX instance is fine and keeps monthly cost low. For anything running PHP-FPM under real production traffic, a database that gets hit hard, or a server hosting more than one client site, pick CPX — the consistent CPU allocation matters more than the small price gap once you are running MariaDB and PHP-FPM side by side under load.

Picking the OS and Location

Select Ubuntu 22.04 LTS as the image — it is the version CloudStick's Direct Install expects, and long-term support means you are not forced into a disruptive OS upgrade a year in. Hetzner offers newer Ubuntu images too, but 22.04 is the safer, better-tested choice for a control-panel-managed server right now.

For location, remember the region list is short by design: Falkenstein and Nuremberg (Germany), Helsinki (Finland), Ashburn and Hillsboro (US), and Singapore. Pick whichever is physically closest to the majority of your visitors — for an EU or UK client base, either German region is a safe default; for a US-based audience, Ashburn edges out Hillsboro for most East Coast and Midwest traffic.

Adding an SSH Key Before You Create the Server

Add your SSH public key at creation time rather than relying on Hetzner's emailed root password. Generate a fresh Ed25519 key pair on your own machine if you do not already have one for this server.

ssh-keygen -t ed25519 -C "hetzner-server" -f ~/.ssh/hetzner_ed25519
cat ~/.ssh/hetzner_ed25519.pub
# paste the output into Hetzner Cloud Console -> Security -> SSH Keys -> Add SSH Key

Attach that key to the server on the creation screen, under the "SSH Keys" section, before you click Create & Buy Now. Skipping this step means Hetzner emails you a root password instead, which works but leaves you doing a manual password-to-key migration afterward — cheaper to do it right the first time.

Creating the Server and Connecting for the First Time

Note that Hetzner Cloud is a separate product from Hetzner's dedicated "Robot" servers — you want the Cloud Console, not the Robot panel, since only Cloud gives you the pay-hourly VPS-style instances this guide covers. With the server type, image, location, and SSH key all set, click Create & Buy Now and Hetzner provisions the instance in under a minute; the public IPv4 address appears on the server's overview page as soon as it is ready.

ssh -i ~/.ssh/hetzner_ed25519 root@<server-ip>
# accept the host key fingerprint on first connection
apt update && apt upgrade -y

Run the update before installing anything else — a fresh image is usually only a few weeks old, but confirming it is current avoids odd package-dependency errors later. At this point you have a bare Ubuntu 22.04 box with nothing but SSH access, which is exactly the state CloudStick's Direct Install expects.

Adding a Network Firewall, Then Connecting CloudStick

Before installing anything, attach a Hetzner Cloud Firewall to the server from the Firewalls tab in the console — it filters traffic at the network edge, before packets even reach the box, which is a cheap extra layer alongside the CSF firewall CloudStick configures on the server itself. Open only 22 (SSH), 80, and 443 to start; CloudStick can adjust rules on the server side later as you add services.

With the server reachable over SSH, go to your CloudStick dashboard, choose Add Server, and select Direct Install. Paste in the server's IP address and either the root password or point it at the same SSH key you generated earlier, and CloudStick handles the rest remotely — installing Nginx 1.24 as nginx-cs, Apache 2.4.53 as apache2-cs on port 81 for PHP, PHP-FPM, MariaDB 10.6, Redis, and CSF, all without you running a single install command by hand.

Once Direct Install finishes, the server shows up in your CloudStick dashboard with live CPU, RAM, and disk metrics, and you can create your first website, database, and SSL certificate from there — the same workflow whether the box sits at Hetzner, DigitalOcean, or AWS. The Hetzner-specific decisions were all made upstream of this point: server type, region, and SSH key. Everything after Direct Install is identical CloudStick server management, which is the whole point of using a control panel instead of hand-configuring every provider differently. If you later add a second Hetzner server in a different region, or a completely different provider, it lands in the same dashboard next to the first one, with the same billing view and the same per-server pricing rather than a per-site fee that punishes you for consolidating clients onto fewer boxes.

Leave a comment
Full Name
Email Address
Message
Contents