Hetzner does not sell a staging environment as a plan feature. There is no "staging" checkbox or add-on to buy. What Hetzner offers is infrastructure, and you build staging on it yourself, usually as a small, separate Cloud server that mirrors production without sharing its database, credentials or DNS. For most teams this costs a few euros a month and takes an afternoon.
This article helps you choose the right Hetzner product for staging, isolate it properly, set it up in a safe order, and keep costs from creeping.
What a Staging Environment Actually Needs
Staging is a rehearsal space. You deploy there first, run migrations and smoke tests, let stakeholders click through changes, and only then promote to production. That purpose sets four requirements:
- Isolation. Staging must not touch production data, production credentials or production DNS.
- A production-like configuration. Same runtime versions, same services, comparable database engine. A staging server that behaves differently trains false confidence.
- Controlled access. The site should be reachable by your team and testers, not by search engines or the public.
- A refresh path. You need a repeatable way to reset staging data and redeploy.
Hetzner's shared-resource cloud plans are described as suitable for test environments, which aligns directly with a staging workload that runs intermittently. Those same shared plans are designed for variable usage patterns rather than sustained high workloads, so a staging box that occasionally gets hammered by a load test is within character.
Which Hetzner Product Fits Staging
Hetzner Cloud offers four instance families: CX (cost-optimized), CAX (ARM-based), CPX (regular performance) and CCX (dedicated vCPUs). For a staging environment the practical question is how much consistent CPU you genuinely need, because staging rarely justifies the dedicated tier.
| Family | Typical staging fit | Starting price (EUR, excl. VAT) |
|---|---|---|
| CX (cost-optimized) | Small sites and apps with low to moderate CPU; the default lean choice | CX23 at €5.49/month |
| CAX (ARM) | Teams already running ARM-compatible stacks | CAX11 at €5.99/month |
| CPX (regular performance) | Staging that needs steadier shared performance | CPX22 at €19.49/month |
| CCX (dedicated vCPUs) | Only when staging must mirror sustained high production CPU | CCX13 at €42.99/month |
The CX23 entry point includes 2 vCPU, 4 GB RAM, 40 GB storage and 20 TB traffic, which is enough for a typical web app plus a database. Hetzner Cloud billing is hourly, rounded up to full hours, with a monthly price cap, and there is no free tier. That hourly model matters for staging: a server you run for two days costs roughly two days of usage, not a full month.
Dedicated servers exist as a higher tier, but for staging they are rarely the right first move. Without a comparable specification source, treat them as an option only if your staging environment must reproduce dedicated-hardware behavior that shared cloud instances cannot.
A Note on Prices and Regions
Listed prices are in EUR excluding VAT and were checked in November 2026. Hetzner Cloud data centers sit in Europe, the USA and Asia, and Singapore pricing runs roughly 20 to 40 percent higher than the European locations. Choose the region closest to your production server so network behavior during testing resembles what users will experience.
Isolate Staging Properly
Isolation is where most staging setups fail, usually because someone reused the production database "just for a minute."
Use a Separate Project and Separate Credentials
Create staging as its own Hetzner Cloud project with its own API tokens, SSH keys and billing labels. Hetzner lets you label servers with key-value pairs such as env=production so resources stay identifiable. Give staging an env=staging label from the start; it makes cleanup and cost tracking far easier later. Keep the secret management rule strict: staging gets its own credentials for every external service, never copies of production keys.
Put the Database on a Private Network
Hetzner Cloud Networks is a free feature that creates private IPv4 networks between your cloud servers. Each network supports up to 50 subnets and up to 100 attached servers, and the address ranges must come from RFC1918 private space such as 10.0.0.0/8, 172.16.0.0/12 or 192.168.0.0/16.
A practical layout on that network:
- App server: public IP for HTTP traffic and SSH, private IP for database access.
- Database server: private network only, not bound to the public interface. Hetzner's own networking tutorial describes exactly this pattern.
Hetzner Cloud server images configure private network interfaces automatically via cloud-init or the hc-utils package. If you override that configuration manually, disable the automatic setup, because two competing DHCP clients on the same interface can cause side effects or outages.
Restrict Traffic with Firewalls
Hetzner Cloud firewalls are stateful, cost nothing extra, and one firewall can be assigned to many cloud servers. Apply a single staging firewall to both servers: allow HTTP and HTTPS from anywhere if you need external previews, and restrict SSH to your team's addresses. Block database ports from the public internet entirely and rely on the private network instead.
Keep Staging Out of Search Results
Staging domains get indexed with surprising frequency, usually because someone linked to them from a public page. Add HTTP basic authentication at the web server level for anything not meant for the public, send X-Robots-Tag: noindex headers, and keep a robots.txt that disallows crawling. Basic auth also solves the access-control half of the problem in one step.
Build It Step by Step
The order below keeps you from exposing anything prematurely.
- Create a dedicated Cloud project. Do this first so every resource, token and cost line stays scoped to staging. Project creation happens in the Hetzner Cloud Console.
- Create the private network. Add a Network to the project, choose an RFC1918 range, and define the subnet.
- Create the database server. Select a small instance, attach it to the network with a private IP only, and leave it out of the public firewall rules.
- Create the app server. Choose the instance family (CX is the sensible default), attach it to the same network, and select an image. Hetzner provides one-click apps such as Docker CE, GitLab CE, WordPress and Nextcloud if you want a preconfigured starting point.
- Add cloud-init. Hetzner lets you paste cloud-init scripts at creation time to run early initialization. Use it to install your runtime, create a deploy user and set the hostname.
- Configure the firewall. Assign the staging firewall to both servers and restrict inbound access as described above.
- Point a staging domain. Create a DNS record such as
staging.example.compointing at the app server's public IP, and a separatedb.staging.example.comonly if you deliberately need database access from outside the network. - Issue a TLS certificate. Use Let's Encrypt for the staging hostname so HTTPS behavior matches production. Keep the certificate renewal automated.
- Enable basic authentication or IP allowlisting on the staging vhost, then deploy your application using your normal pipeline.
- Seed sanitized data and run a smoke test. Confirm migrations, logins and critical paths work before you invite anyone else to test.
You can do any of these steps through the web panel, the hcloud CLI or the Cloud API. The API covers servers, load balancers, volumes, firewalls, networks and more, so CI pipelines can create and destroy staging on demand. Ansible, Terraform and Kubernetes integrations exist if you prefer infrastructure as code.
Keep the Cost Predictable
Staging bills the same way as any other Hetzner Cloud server, so control comes from what you leave running.
- Start at the bottom. A CX23 at €5.49 per month is the floor. Run staging on it until load tests prove you need more, then resize.
- Match backups to the job. Automatic backups cost 20 percent of the instance price. They run daily with a maximum of seven retained and do not survive server deletion. For staging, a weekly snapshot may be a better trade.
- Use snapshots as checkpoints. Snapshots are manual and stored until you delete them, they survive server deletion, and they sit in a different location from the server. They also support lock protection. Snapshot storage is billed per gigabyte, but published rates vary between sources, so check the current figure in your Hetzner account before budgeting precisely.
- Cap traffic exposure. Included traffic on a CX23 is 20 TB, with overage billed at €1.00 per TB. A staging site behind basic auth will not come close, but an unauthenticated staging copy of a media-heavy site can.
- Delete when idle. Because billing is hourly with a monthly cap, a staging server you destroy between sprints is near-free compared with one left running all month.
A lean staging setup with one CX23 app server, a small database instance and a weekly snapshot typically lands in the low tens of euros monthly. That estimate depends on your instance sizes, snapshot volume and region, so treat it as a ballpark and verify against current pricing.
Pitfalls That Undermine Staging
- Sharing the production database. It defeats isolation entirely and risks writes to live data during migration tests. Use a sanitized copy.
- Reusing production secrets. One leaked staging key becomes a production incident. Generate separate credentials for every integration.
- Copying real customer data without sanitizing it. Staging environments are less hardened than production, so strip personal data before seeding.
- Leaving staging indexed. Use basic auth,
noindexheaders and a restrictiverobots.txt. - Letting staging drift from production. Document runtime versions and rebuild staging from the same IaC or image used in production.
- Forgetting the private network on the database. A DB server with a public IPv4 address is reachable by port scanners, even if the firewall is missconfigured later.
- Skipping labels. Without
env=staging, resources blur into production bills and cleanup becomes guesswork.
Lifecycle: Pause, Resize or Delete
Treat staging as disposable infrastructure with a defined refresh cycle.
- Resize the instance up when a load test needs more capacity, then scale back down. Sizing should follow testing needs, not sit at peak permanently.
- Snapshot before risky work so you can roll back a broken migration, and remember snapshots persist independently of the server.
- Delete the server, keep the snapshot when a project pauses. You stop paying for compute while retaining a restorable image, though you continue paying snapshot storage.
- Rely on labels and the API to tear down whole staging stacks programmatically, which keeps orphaned volumes and floating IPs from accumulating.
If you use CI to create staging on demand, connect creation to deletion: every pipeline run that provisions a server should have a matching teardown step, ideally triggered automatically when the pull request closes.
Bottom Line
Hetzner does not provide staging as a managed feature, but its Cloud platform gives you the pieces to build an isolated one cheaply. Start with a CX instance for the app and a second small instance for the database, put both on a free private network, restrict access with firewalls and basic auth, and label everything env=staging. Add backups or snapshots according to how much recovery you actually need, and destroy the servers between sprints to keep the bill near the hourly floor rather than the monthly cap.


