- Published on
How to Set Up a Hetzner Server for Your Web App in 2026
Setting up a Hetzner server for your web application takes less than 15 minutes and costs as little as €4 per month. You start by creating a Cloud Project, selecting a server location close to your users, and deploying a Linux instance with a few clicks. This process provides you with a dedicated IP address (a unique numerical label for your server) and full control over your hosting environment.
Why is Hetzner a good choice for beginners?
Hetzner offers a balance between low cost and high performance that is difficult to find elsewhere. Unlike complex platforms like AWS (Amazon Web Services), the interface is clean and does not overwhelm you with thousands of unnecessary options. You get clear pricing without hidden fees, which helps you avoid "billing shock" at the end of the month.
The platform uses modern hardware, including NVMe SSDs (Non-Volatile Memory Express Solid State Drives), which are much faster than traditional hard drives. This speed ensures your web application loads quickly for your visitors. Because the dashboard is intuitive, you can focus on building your app rather than managing complicated network settings.
Which server options should you choose?
When you first log in, you will see options for "Cloud" and "Dedicated" servers. Cloud servers are virtual machines (software-based computers running on a physical server) that are perfect for beginners because they are flexible and cheap. Dedicated servers are physical machines reserved entirely for you, but they are more expensive and harder to manage.
For most web applications, a "Shared vCPU" (Virtual Central Processing Unit) plan is the best starting point. These plans allow multiple users to share a single physical processor, which keeps costs low while providing plenty of power for new sites. If your application grows and needs more power, you can upgrade your server with a single click later on.
How do you select the right hardware?
Choosing hardware can feel intimidating, but you only need to focus on three main things: CPU, RAM, and Storage. For a basic web app running on Python 3.12 or Node.js 22, 2GB of RAM and 1 vCPU are usually enough. This setup can handle hundreds of concurrent (simultaneous) visitors without slowing down.
We've found that choosing "ARM64" processors over "x86" can save you about 10-20% on your monthly bill. These processors are highly efficient and fully supported by modern frameworks like Next.js 15 or React 19. If you are just starting out, the smallest ARM64 instance is the most cost-effective way to get online.
What do you need before you start?
Before you click any buttons, make sure you have a few things ready to go. Having these items prepared will prevent you from getting stuck halfway through the setup process.
What You'll Need:
- A Hetzner Cloud account (requires identity verification)
- An SSH Key (Secure Shell Key - a secure way to log in without a password)
- A domain name (optional, but recommended for professional sites)
- A terminal application (Command Prompt on Windows or Terminal on macOS/Linux)
Step 1: Create your first project
Hetzner organizes servers into "Projects," which help you keep different apps separate. This is useful if you want to build a personal blog and a business app on the same account without mixing their settings.
- Log into the Hetzner Cloud Console.
- Click the "New Project" button in the top right corner.
- Give your project a name, like "My-First-App."
- Click "Add Project" to enter your new workspace.
What you should see: A blank dashboard with an "Add Server" button in the center.
Step 2: Configure your server settings
Now you will define the "specs" (specifications) of your server. This is where you choose the operating system and location.
- Click "Add Server."
- Location: Choose a location closest to your target audience (e.g., Falkenstein for Europe, Ashburn for the US).
- Image: Select "Ubuntu 24.04." It is the most beginner-friendly version of Linux and has the most tutorials available online.
- Type: Select "Shared vCPU" and then the "Arm64" tab for the best value.
- Volume: Leave this blank for now (Volumes are extra hard drives you can add later).
What you should see: A summary on the right side of the screen showing your monthly cost, usually around €4.00.
Step 3: Add your SSH key for security
Passwords are easy to guess or steal, so Hetzner encourages using SSH Keys. An SSH key is a pair of long files: a "public" one that stays on the server and a "private" one that stays on your computer.
- Scroll down to the "SSH Keys" section and click "Add SSH Key."
- If you don't have a key, open your computer's terminal and type
ssh-keygen -t ed25519. - Press Enter through the prompts, then copy the text from the file it created (usually in a folder called
.ssh). - Paste that text into the Hetzner "Public Key" box and give it a name like "My-Laptop."
What you should see: Your key name appearing with a checkmark, meaning it will be automatically installed on your new server.
Step 4: Finalize and create
The final steps involve naming your server and launching it into the world. You don't need to worry about "Firewalls" or "Backups" immediately, though they are good to enable later.
- Name: Give your server a simple name, like
web-server-01. - Create: Click the "Create & Buy Now" button at the bottom of the page.
- Wait about 30 seconds for the status bar to turn green.
What you should see: A green "Running" status next to your server name and a public IP address (like 123.45.67.89).
Step 5: Connect to your server
Now that the server is running, you need to "log in" to it from your own computer. You will use the terminal to send commands to the server.
- Open your terminal application.
- Type
ssh root@your-server-ip(replace "your-server-ip" with the actual numbers from Hetzner). - If it asks if you want to continue connecting, type
yes. - You are now "inside" your server! You should see a command prompt that looks like
root@web-server-01:~#.
Code Example: Updating your server Once you log in, always run these two commands to ensure your software is up to date:
# Update the list of available software packages
apt update
# Install the latest versions of all software on the server
apt upgrade -y
How do you fix common connection issues?
It is normal to run into a few bumps when connecting for the first time. Most issues are related to the SSH key or the IP address.
- "Permission Denied": This usually means your terminal can't find your private SSH key. Make sure you added the public key to Hetzner and kept the private key in your
.sshfolder. - "Connection Timed Out": Check your internet connection or ensure you didn't accidentally enable a Hetzner Firewall that blocks "Port 22" (the door SSH uses to enter).
- "Host Identification Changed": This happens if you delete a server and create a new one with the same IP. Run
ssh-keygen -R your-server-ipto clear the old memory.
Next Steps
Once your server is running, you are ready to install the tools needed for your app. You might want to look into installing Nginx (a web server that directs traffic to your app) or Docker (a tool that packages your app so it runs the same on any server).
If you are using modern AI tools to help you code, you can use Claude Sonnet 4 or GPT-5 to generate deployment scripts. Simply tell the AI: "I have a fresh Ubuntu 24.04 server on Hetzner. Help me write a script to install Python 3.12 and Nginx." This is a great way to learn how the server works while getting your app live quickly.
For detailed guides, visit the official Hetzner documentation.