How to Install and Host n8n with Coolify: A Step-by-Step Guide

How to Install and Host n8n with Coolify: A Step-by-Step Guide

How to Install and Host n8n with Coolify: A Step-by-Step Guide

n8n is a powerful workflow automation tool that allows you to connect apps, automate tasks, and build complex workflows without any coding. In this guide, we’ll show you how to install and host n8n on a virtual private server (VPS) using Coolify, a user-friendly platform for deploying apps. By the end of this guide, you’ll have a fully functional n8n instance running through Coolify, giving you complete control over your automation workflows.

Prerequisites

  • A VPS, dedicated server, or virtual machine with SSH access
  • Coolify installed on your system
  • Docker installed on your system
  • A custom domain (optional)

Self-hosting n8n with Coolify

In this section, we’ll cover all the necessary steps to install n8n on the Coolify platform, from setting up Coolify to adding new users to your projects.

1. Installing and configuring Coolify

Coolify comes preinstalled on Hostinger’s Coolify hosting plans. If you’re using Hostinger, you can skip this step. Otherwise, follow these steps to install Coolify:

  • Log in to hPanel with your Hostinger account and go to VPS → Manage.
  • From your VPS dashboard’s left sidebar, select OS & Panel → Operating System.
  • Under the Change OS section, choose OS with Panel → Coolify.
  • In the confirmation dialog, click Change OS and enter your VPS root password to proceed.

2. Deploying n8n on Coolify

Now it’s time to deploy n8n through the Coolify dashboard. Here’s how:

  • From the left sidebar, go to Projects → Add. Name your project something like ‘n8n automation’ and click Continue.
  • On the Resource page, select production → Add New Resource.
  • Type ‘n8n’ in the search box and choose the option that includes PostgreSQL. You’ll then be directed to the Configuration page.
  • If you’ve already set up a domain and SSL, hit the Edit button next to the generated random URL and enter your custom domain. Otherwise, you must add an environment variable to bypass the security cookie warning by clicking Edit Compose File.
  • Add the following line inside the environment section:
    - N8N_SECURE_COOKIE=false
  • Once done, click Save. Then, hit Deploy in the top-right corner to start the n8n deployment.

3. Accessing your n8n project

After successfully hosting n8n on your own server via Coolify, the next step is to access your new project and start using n8n. Here are the instructions:

  • Copy and paste the generated or custom domain without the :5678 port into a new browser tab. This will take you to the n8n setup page.
  • Create an n8n owner account by following the on-screen instructions.
  • Once completed, you’ll land on the n8n dashboard.

4. Monitoring logs and resource usage

To keep n8n running smoothly on Coolify, regularly monitor logs and track resource usage. This helps detect issues, optimize performance, and determine when to upgrade your server. Here’s how:

  • In n8n’s Configuration page, navigate to the Logs tab. Hit Refresh for either n8n or PostgreSQL to view their logs.
  • Look for errors or warnings, such as exited containers or database connection issues.
  • To free up disk space, run a Docker cleanup. From the left sidebar, navigate to Servers → localhost. Select Docker Cleanup and set a cron expression for the cleanup schedule.
  • If you want Coolify to periodically check disk usage, open the Advanced tab. Set a disk space check interval using a cron expression.

5. Managing user access and permissions

If you want to collaborate on your n8n instance or scale your setup across multiple projects and teams, you can invite others to use Coolify. Follow these steps:

  • Go to Teams → Members and locate the Invite New Member section.
  • Enter their email address and assign a role.
  • Hit Generate Invite Link and share the link with them so they can complete the registration process.
  • To manage team members, go to the Members section in the same tab. Here, you can change roles or remove members as needed.
  • If you need a separate team for different projects, create a new one by accessing Teams → Add, entering a team name, and clicking Continue.

Troubleshooting common n8n issues

Even with a smooth setup, you may encounter issues while running n8n on Coolify. Here are some common problems and their solutions:

n8n blocks insecure connections

By default, n8n enforces secure connections via SSL. If you didn’t set up an SSL certificate for your domain or forgot to set the N8N_SECURE_COOKIE variable to false during deployment, you’ll see an error when trying to access the n8n dashboard. To fix this, add the N8N_SECURE_COOKIE variable to the Docker Compose file, as explained in step two.

Unhealthy n8n container

If Coolify marks your n8n container as Degraded (unhealthy), it could be due to an improper update without a restart or accidental deletion. To diagnose the issue, check the n8n logs for any errors and try restarting the container. If a regular restart doesn’t work, you can force a restart manually.

n8n deployment failures

Deployment failures usually happen due to misconfigurations in the Docker Compose file. Coolify highlights the exact line where the issue occurs, making it easy for you to fix it accordingly. If you need further assistance, you can ask Kodee, Hostinger’s AI Assistant, to analyze the issue and generate a fixed configuration.

Best practices for hosting n8n on Coolify

To maintain a secure and reliable n8n instance, follow these best practices when hosting it on Coolify:

  • Secure access with SSH keys and a firewall
  • Regularly back up files
  • Keep n8n and Coolify updated

Conclusion

Using Coolify to self-host n8n allows you to set up the automation tool in minutes while maintaining complete control over your workflow data and privacy. By following the steps in this guide and implementing best practices, you can ensure a smooth and secure n8n deployment on Coolify.

How to host n8n with Coolify FAQ

How do I deploy n8n using Coolify?

To deploy n8n using Coolify, first install Coolify on your VPS. Then, create a new project, add an n8n service, and configure its environment variables. Once set up, hit Deploy to launch n8n. You can then manage your instance through Coolify’s dashboard.

Can I customize n8n settings in Coolify?

Yes, Coolify lets you customize n8n settings through environment variables. You can specify database connections, webhook settings, and authentication options. You can also assign a custom domain to n8n in Coolify for easier access.

How do I access my n8n instance after hosting it with Coolify?

After deployment, open the generated random URL in Coolify to access n8n. If you’ve pointed a custom domain to your server’s IP address, you can use that instead. Create an owner account in n8n and start building workflows from its dashboard.

Ariffud Muhammad is a Technical Content Writer with extensive expertise in Linux and VPS. He has authored over 200 articles on server management and web development. Follow him on LinkedIn.

👉
Start your website with Hostinger – get fast, secure hosting here
👈


🔗 Read more from MinimaDesk:


🎁 Download free premium WordPress tools from our Starter Tools page.

How to Enable Command Blocks on Your Minecraft Server: A Comprehensive Guide
How to Start Your Own Online Boutique in 10 Minutes
My Cart
Wishlist
Recently Viewed
Categories