How to Self-Host n8n with Coolify and Hetzner for Less Than $15 a Month
Do you want full control over your automations with n8n without relying on expensive cloud services? In this tutorial, I’ll guide you step-by-step on how to self-host n8n using Coolify and a server from Hetzner. The best part? You can do it for under $15 a month! Keep reading to learn how to set it up easily, even if you have no programming or DevOps experience.
What is n8n and Why Self-Host It?
n8n is a powerful open-source tool for creating automations and workflows, perfect for integrating apps, automating tasks, and even building artificial intelligence agents. Self-hosting n8n lets you run it on your own server, giving you greater control, privacy, and customization options—all at a much lower cost than managed solutions.
In this tutorial, we’ll use Coolify, a platform that simplifies installing open-source apps like n8n, and Hetzner, an affordable cloud server provider.
Requirements for This Tutorial
Before you begin, you’ll need:
- A Hetzner account (I’ll walk you through creating one).
- A Coolify Cloud subscription ($5/month) or your own server to install Coolify manually.
- A domain and access to a DNS provider like Cloudflare (optional but recommended for free SSL).
- 5-10 minutes of your time.
Step 1: Set Up Your Server on Hetzner
- Sign Up for Hetzner
Go to hetzner.com, click on Cloud, and select Get Started. Then, at the bottom, find Register Now and create your account. - Create a Project
Once in the dashboard, create a new project. I named mine “n8n” for this example. - Generate an SSH Key
– Go to Security in the Hetzner dashboard.
– In Coolify (I’ll explain how to access it later), go to Keys & Tokens, generate a Private Key, and copy it.
– In Hetzner, add this SSH key (e.g., “n8n-key”) to connect Coolify to your server. - Purchase a Server
– Click Add Server.
– Choose a nearby location (I picked the U.S. since I’m in Mexico).
– Select Ubuntu as the operating system and opt for Shared CPU to keep costs low (starting at $3/month).
– Associate the SSH key you created and name it “n8n-server”.
– Confirm the purchase. Your server will be ready in seconds.
Step 2: Configure Coolify
Coolify is the bridge that makes installing n8n as easy as a click. You can use Coolify Cloud ($5/month) or install it on your own server (instructions are on their site). For this tutorial, we’ll use the cloud version.
- Access the Coolify Dashboard
If you’ve paid the $5/month, log into your account. - Connect the Hetzner Server
– Go to Servers > New Server.
– Paste your Hetzner server’s public IP (find it in the Hetzner dashboard).
– Associate the Private Key you generated earlier.
– Verify the connection. If everything’s set, Coolify will automatically install Docker on your server.
Step 3: Install n8n on Your Server
- Create a Project in Coolify
– In the dashboard, go to Projects and create a new one (call it “n8n”).
– Link your newly connected server. - Add n8n as a Resource
– Select New Resource and search for “n8n”.
– Choose the version with PostgreSQL for a robust database.
– Link your server and click Deploy. Coolify handles the rest.
Step 4: Set Up Your Domain and SSL
- Copy the Domain or IP
In Coolify, under the “n8n” project, copy the generated domain or use the server’s IP. - Configure DNS in Cloudflare
– Go to your Cloudflare dashboard (or your DNS provider).
– Add an A record: for example, “n8n.yourdomain.com” pointing to the server’s IP.
– Disable the proxy so Coolify can use a free Let’s Encrypt SSL certificate. - Update the Domain in Coolify
Return to Coolify, edit the “n8n” project, and save your custom domain (optional).
Step 5: Done! Start Using n8n
Once the deployment finishes (it may take a few minutes), open the generated URL or your custom domain. You’ll see the n8n dashboard ready to set up your user and start building workflows.
- Explore Templates: The n8n community offers hundreds of automations at https://n8n.io Just import a JSON file and you’re set.
- Customize: I’ll be sharing AI automations with explanations on my channel—subscribe so you don’t miss out!
Total Costs
- Hetzner: $3-$10/month depending on the server (Shared CPU is enough to start).
- Coolify Cloud: $5/month.
- Domain: Free if you use a subdomain or Coolify’s domain.
Total: $8-$15/month. Cheaper than any managed n8n plan!
Conclusion
Self-hosting n8n with Coolify and Hetzner is an affordable, straightforward way to take charge of your automations. You don’t need to be a DevOps expert—with this guide, you’ll have n8n running on your own server in under 10 minutes. Ready to build AI agents or integrate your favorite apps? Get started today!
If you liked this tutorial, leave a comment or check out my full video for more details.
Connect WhatsApp with n8n and create AI Agents. Sell AI Agents and WhatsApp with n8n and WAsendr!
Other Resources
Self-hosting n8n
Self-hosting n8n offers greater control and flexibility compared to using the n8n cloud. The official n8n documentation provides comprehensive guides for setting up n8n on your own infrastructure. You can deploy your local n8n instance using Docker Compose, which simplifies installation and management. The n8n service configuration can be customized to match your specific requirements and workload.
By 2025, more organizations are expected to shift towards self-hosted solutions for better scalability and control over their data.
The self-hosted AI starter kit curated by n8n provides an excellent foundation for building self-hosted AI workflows. This starter kit is an open-source collection that combines the self-hosted n8n platform with compatible AI products and components.
For those interested in hosting n8n on cloud platforms, providers like DigitalOcean offer simple deployment options.
The self hosted approach particularly shines when creating a local AI environment for testing. The n8n instance can be integrated with various services via API connections, while the low-code interface makes it accessible to non-developers.
Resources on GitHub provide numerous AI workflow ideas and examples to implement within the n8n ecosystem, regardless of which pricing model or node configurations you choose.