How to Self-Host n8n on Hetzner (2026 Guide)
If youโre looking to automate workflows using n8n, self-hosting on Hetzner is an excellent option. Hetzner Cloud offers affordable VPS solutions, making it a suitable platform for developers and homelab enthusiasts. This guide walks you through the process of installing and configuring n8n on Hetzner, ensuring you can take full control of your automation tasks.
Why Use Hetzner for n8n?
Before diving into the installation, letโs look at why Hetzner is a great choice for self-hosting n8n.
| Provider | Price (EUR/USD per month) | Performance | Data Centers |
|---|---|---|---|
| Contabo VPS | 5.99 EUR | Moderate | Germany, US |
| Hetzner Cloud | 4.15 EUR | High | Germany, Finland |
| DigitalOcean | 6 USD | High | Worldwide |
| Vultr | 6 USD | High | Worldwide |
| Linode (Akamai) | 5 USD | High | Worldwide |
With prices starting at 4.15 EUR/month for Hetzner, you can set up a robust environment for your n8n instance.
Prerequisites
- A Hetzner Account: Sign up for an account at Hetzner Cloud.
- Basic Linux Knowledge: Understanding commands will be essential.
- VPS Setup: Create a VPS instance with a minimum of 1 GB RAM and 1 CPU (sufficient for n8n).
Step-by-Step Installation Guide
Step 1: Create Your VPS on Hetzner
- Log in to your Hetzner account.
- Go to the โCloudโ section and select โCreate Serverโ.
- Choose the server type, such as โCX11โ, which costs 4.15 EUR/month.
- Select the Linux distribution (Ubuntu 20.04 LTS is recommended).
- Configure the server settings and create the server.
Step 2: Access Your VPS
Once your server is created, access it using SSH:
ssh root@your-server-ip
Replace your-server-ip with your actual IP address.
Step 3: Update the System
Ensure that your system is up-to-date:
apt update && apt upgrade -y
Step 4: Install Docker
n8n runs smoothly using Docker. To install Docker, run the following commands:
apt install apt-transport-https ca-certificates curl software-properties-common -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository "deb [arch=amd64} https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt update
apt install docker-ce -y
Step 5: Configure Docker Permissions
Add your user to the Docker group:
usermod -aG docker $USER
Log out and back in to apply the changes.
Step 6: Run n8n
Use Docker to run n8n in a container:
docker run -d --name n8n -p 5678:5678 n8n-io/n8n
You can now access n8n via your web browser at http://your-server-ip:5678.
Step 7: Secure n8n with HTTPS
Securing your n8n instance is crucial. Letโs set up Nginx and obtain an SSL certificate:
- Install Nginx:
apt install nginx -y
- Install Certbot:
apt install certbot python3-certbot-nginx -y
- Configure Nginx:
Create a new configuration file for n8n:
nano /etc/nginx/sites-available/n8n
Add the following configurations (donโt forget to replace your_domain):
server {
listen 80;
server_name your_domain;
location / {
proxy_pass http://localhost:5678;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
- Enable the Nginx Configuration:
ln -s /etc/nginx/sites-available/n8n /etc/nginx/sites-enabled/
nginx -t
systemctl restart nginx
- Obtain an SSL Certificate:
certbot --nginx -d your_domain
Follow the prompts to secure your site.
FAQs
Can I run n8n in a different environment than Hetzner?
Yes, n8n can be deployed on various infrastructures, including DigitalOcean, Vultr, and others. Each platform may have unique setup steps, but the Docker images remain consistent across providers. Explore other VPS options for a full VPS comparison to find what best suits your budget and needs.
How can I scale my n8n instance?
Scaling your n8n instance primarily involves upgrading your VPS. If you find processing or memory limitations, consider moving to a higher-class server on Hetzner or using multiple instances behind a load balancer. Check out Kubernetes solutions too for container orchestration if your automation tasks grow significantly.
What is n8n used for?
n8n is an open-source workflow automation tool that helps you integrate different services and automate repetitive tasks. Unlike conventional platforms, n8n gives you complete control over your data and processes, and you can tailor workflows according to specific needs. Its flexibility allows for numerous integrations, making it suitable for developers and business users alike.
By following these steps, you should have a fully functional n8n instance running on Hetzner. Embrace the power of automation and streamline your workflows today.