How to self-host n8n with Coolify on a DigitalOcean server
By Max Warnault · 21 April 2025 · 5 min read
In short
Instead of paying for n8n's hosted plan, which caps your executions and active workflows, rent a DigitalOcean droplet and install Coolify on it for free. In Coolify, add n8n as a new resource and point two Cloudflare A records (one for Coolify, one for n8n) at the droplet's IP with the proxy off. Set both domains with https, deploy, create your admin account and activate n8n's free license key. For the same monthly cost you get unlimited workflows and executions.
n8n's hosted plan costs $24 a month. For that you get 2,500 workflow executions and only five active workflows. Once your automations start doing real work, those limits come fast.
For the exact same price, you can rent your own server on DigitalOcean and run n8n on it with unlimited workflows and unlimited executions. Here is how I install n8n using Coolify on a DigitalOcean droplet, step by step.
Why self-host n8n instead of paying for the hosted plan
The server I picked on DigitalOcean has 4 GB of memory, 2 CPUs and 80 GB of storage. It costs me $24 a month, the same as n8n's hosted plan.
The difference is what you get for it. Instead of paying n8n directly, I install it with Coolify on that server. Coolify is free to self-host. The result is unlimited workflows and unlimited executions on a server I control.
At Million Dollar Year, code is one of the four kinds of leverage: software and systems that run while you sleep. A self-hosted n8n server is a cheap place to run those systems without a cap on how many you build.
Step 1: Set up your DigitalOcean droplet
- Go to DigitalOcean and get a droplet.
- Once you have your droplet, open the console. It will connect to the server.
- Check your email. You should have received a password.
- Copy that password and paste it into the console. The first thing the server asks you to do is change your password.
- Type the new password you want to use to connect to your server over SSH. Pick one you will remember.
That is it. You can now log in to your server using SSH.
Step 2: Install Coolify on the server
Go to coolify.io and choose to self-host Coolify. It is completely free.
All you have to do is copy the one line of install code they give you and paste it into your server's console. The script does the rest for you.
The install takes about five minutes. You can use that time to set up your subdomains.
Step 3: Create subdomains for Coolify and n8n in Cloudflare
You want to reach both Coolify and n8n on your own subdomains. I manage my domain's DNS records in Cloudflare.
- Copy the IP address of your DigitalOcean droplet.
- In Cloudflare, go to your domain's DNS records.
- Create a new A record named coolify and point it to your droplet's IP address.
- Do the exact same thing for a second A record named n8n, also pointing to your droplet.
- Make sure the proxy is gray, set to DNS only, on both records.
Do not use the Cloudflare proxy. Coolify already has its own proxy, and that is what makes the link between your domain and your server.
Step 4: Create your Coolify account
Go back to the console. You should see that Docker has been installed successfully, then that Coolify has been installed successfully. It waits about 20 seconds and gives you an IPv4 address.
- Open that address in your browser.
- Create your account and choose your own password.
- Click register.
- Click "skip onboarding". Everything is already done for you.
Step 5: Connect your own domain to Coolify
- Go to the settings.
- Under "instance domain", type your Coolify subdomain, for example https://coolify.yourdomain.com.
- Name the instance coolify.
- Save.
Do not forget the https in front of the address, or it will not work. Check that it says https and not http. It is a big difference.
The change takes about two minutes to propagate. If the address does not load straight away, wait a moment and move on to the next step.
Step 6: Add n8n as a resource in Coolify
- Go to projects and create a new project named n8n.
- Click continue. Coolify creates a production environment. You can add another one, but I just go with production.
- Click to add a new resource.
- Search for n8n and select it.
Connect your n8n domain before you deploy
Before you deploy, set up the domain name for n8n.
- Open the services settings for n8n.
- Set the domain to your n8n subdomain, for example https://n8n.yourdomain.com.
- Save.
Again, make sure it is https here, or it will not work.
Deploy n8n
Click deploy. Coolify installs n8n on your server for you.
While it runs, you can try your Coolify subdomain again. By now you should be able to log in to Coolify with your password on your own domain. It is the same Coolify instance, now on your subdomain.
Step 7: Check that n8n is running
Look at the deployment. You should see that n8n started and that the status shows "running".
You may see a status message on the resource for a moment. It says itself that this does not mean the resource is malfunctioning. In my case it went away on its own.
Then open your n8n subdomain. It should load.
Step 8: Create your n8n admin account and activate the free license
- On your n8n subdomain, create the first account. That account gets admin access.
- Click next, then confirm.
- Choose to receive the free license key that gives you unlimited workflows.
- Check your email. You should have a new email from n8n with the key.
- In n8n, go to settings and click "enter activation key".
- Paste the key and click activate.
You now have n8n installed with Coolify on a DigitalOcean droplet, with unlimited workflows and unlimited executions on your own server.
Key takeaways
- Compare n8n's hosted plan limits with a DigitalOcean droplet at the same monthly price before you choose where to run your automations.
- Install Coolify on your droplet by pasting its one-line self-host install command into the server console.
- Point two Cloudflare A records, coolify and n8n, at your droplet's IP and set both to DNS only with the proxy off.
- Always type https in front of your Coolify instance domain and your n8n domain, or they will not work.
- Set n8n's domain in Coolify's services settings before you click deploy.
- After creating your n8n admin account, request the free license key by email and activate it in settings.
Questions and answers
Can I get n8n for free?
n8n can be self-hosted at no software cost by installing it with Coolify, which is also free to self-host. You still pay for the server. I use a DigitalOcean droplet that costs the same as n8n's hosted plan, but it gives unlimited workflows and unlimited executions.
What DigitalOcean droplet size do I need for n8n?
The droplet I picked has 4 GB of memory, 2 CPUs and 80 GB of storage. It costs me $24 a month, the same price as n8n's hosted plan.
Should I turn on the Cloudflare proxy for my n8n subdomain?
No. Set the A records for Coolify and n8n to DNS only, with the proxy gray. Coolify already has its own proxy that links your domain to your server.
Why is my Coolify or n8n domain not working?
Check that you typed https in front of the domain, not http, both in Coolify's instance domain setting and in n8n's services setting. Also give the change about two minutes to propagate before you try to log in.
How do I get unlimited workflows in self-hosted n8n?
When you create your first n8n account, choose to receive the free license key. n8n emails it to you. Go to settings, click enter activation key, paste it and activate.