- Published on
How to Set Up a Hetzner Cloud Server: A Beginner's Guide
Setting up a Hetzner Cloud server takes less than 10 minutes and costs approximately €5.50 per month for a modern entry-level instance. By following a few simple steps—creating a project, selecting a location, and configuring an SSH key—you can have a fully functional Linux environment ready for web hosting or app development.
Why should you choose Hetzner for your first server?
Hetzner is a European hosting provider known for high-performance hardware at lower prices than competitors like AWS or Google Cloud. For beginners, their Cloud console is much easier to navigate because it focuses on the essential tools you need without overwhelming you with thousands of enterprise services.
We've found that Hetzner’s ARM-based instances offer the best price-to-performance ratio for new developers testing out ideas. These servers use modern processors that handle high traffic while consuming less power, which keeps your monthly bill predictable.
You also get the benefit of strict European data privacy laws (GDPR). This means your data is handled with a high level of security and transparency from the moment you sign up.
What do you need before getting started?
Before you deploy your first server, you need a few basic things ready to go. Having these prepared will prevent you from getting stuck halfway through the setup process.
- A Verified Account: You will need to provide identification or a small deposit to prevent fraud during the sign-up process.
- An SSH Client: If you are on Windows 11, you can use the built-in Terminal; Mac and Linux users can use their native Terminal apps.
- An SSH Key: This is a secure way to log into your server without a password (we will show you how to make one).
- A Budget: While Hetzner is cheap, you still need a valid credit card or PayPal account linked to your profile.
How do you create an SSH key for secure access?
An SSH (Secure Shell) key is like a digital passport for your computer. It consists of a "public key" that stays on the server and a "private key" that stays on your laptop.
Step 1: Open your terminal Search for "Terminal" or "PowerShell" on your computer and open it. You should see a blinking cursor waiting for your command.
Step 2: Run the generator command Type the following command and press Enter:
ssh-keygen -t ed25519 -C "[email protected]"
# This creates a modern, highly secure key pair
Step 3: Save the file The terminal will ask where to save the key; just press Enter to accept the default location. It will then ask for a "passphrase," which is an optional password for your key for extra security.
Step 4: Copy your public key
You need to copy the text inside the .pub file to give it to Hetzner. Run this command to see your key:
cat ~/.ssh/id_ed25519.pub
# You should see a long string starting with 'ssh-ed25519'
How do you deploy your first Cloud server?
Now that your key is ready, you can launch the actual hardware. Hetzner calls these "Cloud Instances" or "Virtual Private Servers" (VPS).
Step 1: Create a Project Log into the Hetzner Cloud Console and click "New Project." Give it a name like "My-First-App" to keep your work organized.
Step 2: Select a Location Choose a data center closest to you or your target audience. Locations like Nuremberg (Germany) or Falkenstein (Germany) are usually the most cost-effective.
Step 3: Choose an Image An Image is the operating system (OS) that will run on your server. Select Ubuntu 26.04 LTS (Long Term Support) because it is the most beginner-friendly version of Linux and will receive security updates for years.
Step 4: Select your Hardware For a beginner, the CX22 (Intel/AMD) or CAX11 (ARM) tiers are perfect. These usually cost between €4 and €6 per month and provide enough power for multiple small websites.
Step 5: Add your SSH Key Click "Add SSH Key" and paste the long string you copied from your terminal earlier. This ensures that only your computer can log into the server.
Step 6: Click Create & Buy The server will be ready in about 30 to 60 seconds. You will see a green "Running" status next to your server's new IP address (a series of numbers like 123.45.67.89).
How do you log into your server for the first time?
Connecting to your server is called "remoting in." You are basically telling your computer to open a window into the computer sitting in Hetzner's data center.
Step 1: Copy your IP Address Find the IP address in your Hetzner dashboard and click it to copy it to your clipboard.
Step 2: Run the SSH command In your terminal, type the following (replacing the numbers with your actual IP):
ssh [email protected]
# 'root' is the default administrative user for Linux
Step 3: Accept the Fingerprint
The first time you connect, you will see a warning asking if you trust this host. Type yes and press Enter.
Step 4: Verify you are in
If successful, your terminal prompt will change to something like root@ubuntu-2gb-nbg1-1:~#. Congratulations, you are now controlling a powerful computer in a professional data center!
What are the first commands you should run?
Linux servers don't come with the latest software pre-installed for security reasons. You need to tell the server to go out and grab the newest updates.
Step 1: Update the package list This tells the server to check which software versions are currently available.
apt update
# 'apt' is the Advanced Package Tool used to manage software
Step 2: Upgrade the software This actually downloads and installs the updates.
apt upgrade -y
# The '-y' flag tells the server to say "yes" to all prompts automatically
Step 3: Set up a basic Firewall You want to make sure your server is protected from basic attacks. Ubuntu comes with a tool called UFW (Uncomplicated Firewall).
ufw allow ssh
# This ensures you don't lock yourself out of the server
ufw enable
# This turns the firewall on
Troubleshooting common beginner mistakes
It is normal to run into a few bumps when you are learning. Don't worry if things don't work perfectly on the first try.
- "Permission Denied (publickey)": This usually means your terminal can't find your SSH key. Make sure you added the public key to the Hetzner dashboard before creating the server.
- Connection Timed Out: This often happens if you are on a restricted Wi-Fi network (like a school or office) that blocks SSH. Try using a mobile hotspot or check your firewall settings.
- The server is slow: If you chose a very small instance and are running heavy software like a large database, you might be out of RAM (Random Access Memory). You can "Rescale" your server in the Hetzner dashboard to a larger size at any time.
We recommend always keeping a backup of your work. Hetzner offers a "Backups" feature for an extra 20% of the server cost, which automatically saves your data every day.
Next Steps
Now that your server is running and secure, you can start building. You might want to install a web server like Nginx (a tool that serves web pages) or set up a Docker environment (a way to run apps in isolated containers) for your projects.
The best way to learn is by doing, so try installing a simple "Hello World" website next. Each time you break something, you can simply delete the server and start over for just a few cents.
For more detailed technical guides, visit the official Hetzner documentation.