This guide will walk you through setting up an N8N automation server using Coolify, a self-hosted platform that makes it easy to deploy various applications using Docker.
Video Guide: https://youtu.be/7-lCm7utQ48?si=Yw5wH_iG5933W3m7
Table of Contents
● Prerequisites
● Step 1: Purchase a Domain Name
● Step 2: Set Up Cloudflare
● Step 3: Set Up a VPS on Hostinger
● Step 4: Configure Coolify
● Step 5: Deploy N8N
● Troubleshooting
Prerequisites
Before starting, make sure you have:
● A credit/debit card for purchasing services
● A password manager (recommended for storing secure credentials)
Step 1: Purchase a Domain Name
1. Visit a domain registrar (we official recommend Cloudflare, but you can use any provider).
2. Search for your desired domain name.
3. Select an affordable option (TLDs like .org can be cheaper than .com).
4. Complete the purchase by providing:
○ Contact information
○ Address details
○ Payment information
Cost estimate: Domain names can range from $7.50 to $15+ per year depending on the TLD.
*Note: ‘Move it to Cloudflare’ should say ‘Point Nameservers to Cloudflare’
Step 2: Set Up Cloudflare
Cloudflare provides DNS management, CDN services, and SSL certificates.
1. Create a Cloudflare account or log in at cloudflare.com.
2. From the dashboard, select "Add a Site" or "Add a Domain".
3. Enter your domain name and continue.
4. Select the Free plan (sufficient for most basic setups).
5. Cloudflare will provide you with nameserver addresses (usually two).
6. Go to your domain registrar (where you purchased your domain) and:
○ Find the DNS or nameserver settings
○ Replace the default nameservers with Cloudflare's nameservers
7. Return to Cloudflare and complete activation.
Note: DNS propagation can take up to 24-48 hours, but often completes within minutes to a few hours.
Step 3: Set Up a VPS on Hostinger
1. Go to Hostinger and create an account.
2. Navigate to VPS options and select KVM VPS.
3. Choose options:
○ Select a server location (choose based on your location or your users' locations)
○ For installation, select Coolify
○ Create a strong root password (15-20 characters recommended)
○ Unselect any unnecessary add-ons
○ Choose KVM2 plan (or higher if you expect higher resource needs)
4. Select your subscription period (monthly or yearly) and complete payment.
5. After completion, you'll be directed to the VPS management page.
6. Note your server's IP address - you'll need this for the next step.
Cost estimate: KVM2 on Hostinger is approximately $10-15/month.
Step 4: Configure Coolify
A. Set Up DNS Records for Coolify
1. Go to your Cloudflare dashboard and select your domain.
2. Navigate to DNS settings.
3. Add a new A record:
○ Name: "coolify" (this creates coolify.yourdomain.com)
○ Target: Your VPS IP address
○ TTL: Auto
4. Save the record.
B. Configure SSL Settings
1. In Cloudflare, go to the SSL/TLS section.
2. Set the encryption mode to "Full" and save changes.
C. Access and Configure Coolify
1. Once your VPS is ready (status will show "Running"), access the Coolify setup page using the IP address provided.
2. Create your admin account and save the password securely.
3. Skip onboarding if you wish.
4. Go to Settings and update the domain:
○ Enter https://coolify.yourdomain.com
○ Save changes
5. After DNS propagation (usually quick with Cloudflare), you'll be able to access Coolify at coolify.yourdomain.com.
Step 5: Deploy N8N
A. Set Up DNS for N8N
1. Go back to Cloudflare DNS settings.
2. Add another A record:
○ Name: "n8n" (creates n8n.yourdomain.com)
○ Target: Same VPS IP address
○ TTL: Auto
3. Save the record.
B. Create Projects in Coolify
1. Log in to your Coolify dashboard.
2. Create a new project (think of this as a folder):
○ Click "Add New Project"
○ Name it (e.g., "n8n-setup-system")
○ Click Continue
3. Optionally, create a DB project:
○ Click "Add New Project" again
○ Name it (e.g., "DB")
C. Deploy N8N with PostgreSQL
1. Select your project.
2. Click "Add a new resource".
3. Find and select "n8n with PostgreSQL".
4. Configure the installation:
○ Name it (e.g., "n8n-postgres")
○ Leave default values as is
5. Configure the domain settings:
○ Enter your subdomain: n8n.yourdomain.com
6. Click Save.
7. Deploy the application by clicking the "Deploy" button at the top right.
8. Wait for deployment to complete (usually takes a few minutes).
9. Once deployment is complete, check the health status (should show "Healthy").
10. Click on "Links" to access your N8N installation.
D. Activate N8N License
1. When you first access N8N, follow the setup wizard.
2. When prompted for a license, select the free community license.
3. Check your email for the license key.
4. Enter or click the button to apply the license key.
5. Complete the N8N setup process.
Troubleshooting
Common issues to check if things aren't working:
● Make sure SSL/TLS is set to "Full" in Cloudflare
● Verify your IP addresses are entered correctly in DNS records
● Ensure you're using HTTPS in your domain configurations
● Give DNS changes time to propagate
● Check Coolify health status and logs if services aren't starting
Testing Your Setup
To test if everything is working correctly:
1. Log in to your N8N installation
2. Create a simple webhook
3. Test the webhook with a POST request
If you receive a response, congratulations! Your N8N server is set up correctly and ready to use.
Next Steps
With your N8N server now up and running, you can:
● Create workflows
● Set up integrations with other services
● Explore other applications available through Coolify
● Consider setting up automated backups for your server
Remember that your Coolify installation gives you access to many other open-source applications that you can deploy with similar steps.