If you’re planning to set up a Hetzner server to host websites, you’re on the right track. Hetzner is known for its high-performance servers at affordable prices, making it a popular choice among developers, businesses, and hosting enthusiasts. But setting up a server from scratch can feel overwhelming, especially if you’re not familiar with the process.
In this comprehensive guide, we’ll walk you through two effective methods to set up a Hetzner server for hosting your websites:
- Using ServerAvatar – A beginner-friendly and automated way.
- Manual Setup – For advanced users who prefer full control.
By the end of this guide, you’ll have your Hetzner server running with your websites hosted, secured, and optimized for performance.
Why Choose Hetzner for Hosting Your Websites?
Before we dive into setup, let’s briefly understand why Hetzner is an ideal hosting provider:
- Affordable pricing with powerful resources
- Global data centers (Germany and Finland)
- Reliable performance and uptime
- Quick provisioning with a wide range of operating systems
- Support for both VPS (Cloud) and Dedicated servers
Whether you’re building a simple WordPress site or deploying full-stack web apps, Hetzner has the infrastructure to back your needs.
Method 1: Set Up a Hetzner Server with ServerAvatar (Fast & Easy)
If you’re looking for a hassle-free, time-saving way to manage your server and host websites, ServerAvatar is your best friend. It’s a modern cloud server management panel that lets you manage servers and host unlimited websites without needing to dive deep into the command line.
Step 1: Log in to ServerAvatar Dashboard
- Create a New Server
- Choose Self-Managed Server as your server type
- Select Hetzner as Cloud Provider

Step 2: Create or Connect Your Hetzner Server for Deployment
Create a New Hetzner Account
Don’t have a Hetzner account?
Click “Create an Account” to visit the Hetzner signup page. Once you’ve completed the registration, return to ServerAvatar to link your new account.
Link a Hetzner Account
Already have a Hetzner account but haven’t linked it yet?
Click on the link Account to connect your Hetzner account with ServerAvatar.
Hetzner Integration in ServerAvatar
Step 1: Log in to your Hetzner account and go to Your Project → Security.

Step 2: In the API Tokens section, click the Generate API Token button.

Step 3: Provide a description for the token, select Read & Write permissions, and then click Generate API Token.

Step 4: Once the token is generated, you can copy it for later use.

Set up Hetzner API Token on ServerAvatar
Step 1:
From the left-hand sidebar of the ServerAvatar dashboard, click on the “Integration” tab, as illustrated in the image below.

Step 2:
Go to the “Cloud Platforms” section and click on the “Link Hetzner” button

Step 3:
Enter your Name and Access Key, then click the “Save” button to complete the setup.

Step 4:
Choose the application framework you want to host. ServerAvatar will suggest the optimal setup based on your selection.

Step 5: Server Configuration
Pick your desired Tech Stack, Operating System Image, and Database.

Enable the toggle if your application requires Node.js.
Note:-
If you select the Node Stack, the Node.js toggle will not be visible as it is already included.
If you choose Node Stack as your web server, you can also enable Yarn by toggling the “Install Yarn Along with Node” option.

Step 6: Choose an SSH Key:
- Generate a New Key: Creates a new private-public SSH key pair for secure server access.
- Add a Public Key: If you already have an existing SSH key, you can add its public part to the server for authentication.

Step 7: Select a Server Location and Size.
Choose a server location (region) close to your target audience for optimal performance. Then, select a server size that fits your needs for CPU, RAM, storage, bandwidth, and budget.

Step 8: Click the Deploy Server button to begin the setup.

Installation Process
During the installation, you’ll be able to see each service being installed and configured step by step. ServerAvatar will carry out the following actions:
- Set up a web server (Apache, Nginx, or OpenLiteSpeed)
- Install PHP along with all supported versions (7.2 to 8.3)
- Configure PHP-FPM
- Install and configure MySQL
- Set up Redis for caching
- Create a SWAP memory file
- Generate basic virtual host configuration files
- Install Git and Composer
- Complete the setup and run necessary tests
The entire process usually takes between 5 and 15 minutes. Once done, your server will be fully set up and ready to host PHP or WordPress websites directly from the ServerAvatar panel. This is the standard way to connect a Hetzner server with ServerAvatar.
Benefits of Using ServerAvatar
- No technical headache or manual configurations
- Unlimited site hosting
- Built-in performance and security optimizations
- Easy-to-use UI for file and database management
- Great for WordPress, Laravel, Node.js, and more
Perfect for beginners, agencies, freelancers, and anyone who wants to save time.
Method 2: Manual Setup of Hetzner Server for Hosting
For developers who love control and want to learn the internals of Linux server setup, this method is for you. You’ll install and configure all components by yourself.
Step 1: Connect to Your Hetzner Server via SSH
Use any terminal or SSH client (like PuTTY):
ssh root@your.server.ip
If using an SSH key, make sure your private key is in the correct location.
Step 2: Update and Upgrade the System
apt update && apt upgrade -y
Ensure your system is up-to-date to avoid compatibility or security issues.
Step 3: Install LAMP Stack (Apache, MySQL, PHP)
1. Apache Web Server
apt install apache2 -y
2. MySQL Server
apt install mysql-server -y
mysql_secure_installation
Follow the prompts to set a root password and secure your installation.
3. PHP
apt install php libapache2-mod-php php-mysql -y
You can install specific extensions like:
apt install php-curl php-gd php-mbstring php-xml php-zip -y
ServerAvatar vs Manual Setup: Which One Should You Choose?
Feature | ServerAvatar | Manual Setup |
Ease of Use | ||
Time Required | Very Quick | Time-Consuming |
Technical Skills Needed | Minimal | Advanced |
Flexibility | High | Full Control |
Ideal For | Beginners, Agencies | Developers, Sysadmins |
Choose based on your comfort level and project needs. For faster, scalable hosting without stress, ServerAvatar is unbeatable. For full control, the manual route is powerful.
Optional: Add Extra Security Layers (Both Methods)
Regardless of your setup method, consider these additional steps for enhanced security:
- UFW Firewall: ufw allow OpenSSH && ufw enable
- Fail2Ban to protect against brute-force attacks
- Disable root login and use a sudo user
- Keep software updated regularly
- Use SFTP instead of FTP
Performance Tips for Hetzner Servers
To make the most of your server:
- Use Nginx + PHP-FPM for better performance (available in ServerAvatar)
- Enable object caching (Redis or Memcached)
- Set up GZIP compression and browser caching
- Regularly monitor logs and performance metrics
Conclusion
Setting up a server might seem intimidating, but with the right tools and guidance, it’s easier than ever. In this guide, we showed you two powerful ways to set up a Hetzner server to host your websites:
- Use ServerAvatar for an automated, fast, and user-friendly setup.
- Go manual for full control and learning opportunities.
Whichever method you choose, you now have the knowledge to confidently deploy and manage your websites on a Hetzner server. With the right setup, your sites will be secure, fast, and reliable—just what every modern website needs.
FAQ:
1. How long does it take to deploy a Hetzner server with ServerAvatar?
With a compatible SSH key already in place, the automated installation generally finishes in 5–15 minutes. The exact time can vary with the server size, selected tech stack, and network speed.
2. What operating systems can I install on a new Hetzner cloud instance?
Hetzner offers popular Linux images such as Ubuntu, Debian, AlmaLinux, Rocky Linux, Fedora, and CentOS Stream. If you need something custom, you can also upload your own ISO.
3. Does ServerAvatar handle backups automatically?
Scheduled off‑site backups are built in. You can choose daily, weekly, or monthly snapshots for both files and databases, stored on S3‑compatible storage or your preferred cloud bucket.
4. How do I scale my server when traffic spikes?
For cloud servers, you can resize the instance in the Hetzner console, then run the “Re‑verify Specs” button inside ServerAvatar to sync the new resources. For dedicated servers, consider load‑balancing or vertical scaling to a more powerful machine.
5. Is there downtime during server provisioning or resizing?
Initial provisioning has no public downtime because nothing is live yet. Cloud resizes usually require a reboot, causing 30–60 seconds of interruption. Plan upgrades during low‑traffic periods when possible.