DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Cover image for Self-hosted workflow automation: How to self-host n8n on Convox
Ada Powers
Ada Powers

Posted on

Self-hosted workflow automation: How to self-host n8n on Convox

Automation tools improve the flow and productivity of business processes, however, they can be pricey and inflexible. The cost of using Zapier for business process automation can run into thousands of dollars, yet, it does not support self-hosting or workflow exports/imports, which ultimately limits control.

To circumvent these limitations, businesses of all sizes opt for cost-effective, self-hosted Zapier alternatives like n8n. N8n is an open source, simple-to-use, and feature-rich workflow automation tool that supports over 220 integrations. Its cloud version costs somewhere between $20 and $120 per month.

Even better, the self-hosted & desktop version of n8n is completely free If you’re wondering how to
self-host n8n on Convox, read on to learn more about n8n, why Convox is the best platform for self-hosting n8n, and how to host it step-by-step.

What is n8n?

n8n is a free self-hosted automation tool that can be added to your cloud infrastructure to power your business process management. You can run it as a workflow engine on Convox or any similar platform to create a powerful workflow management system.

Thanks to the efficiency of the β€œfair-code work automation platform” the project received seed funding of $1.5 million within its first year of business. The self-hosted workflow management software is great for marketing and sales automation. n8n is the best choice if you want:

  • Cost savings:The self-hosted version is free, while the cloud-based alternative is priced competitively.
  • Simplicity of use: The cloud tool is really simple to use, and the self-hosted version is also easy to use once installed.
  • Versatility: It allows 220+ integrations focusing on process diversity, so you can get more things done with fewer integrations enabled.
  • Flexibility: You can design/program nodes from scratch using JavaScript.

Automation Workflows in n8n

A workflow in n8n is like a directed flow chart connecting various nodes to perform a task. Its starting point is always a trigger node that initiates the process, automating the workflow. However, there can be more than one trigger node for added flexibility.

You think of the nodes in an automation workflow as apps/integrations with previous and next actions specified. See a quick example of how n8n automation works below.

Lead Email Validation in Mautic CRM

    1. A Contact is identified in Mautic. Is it a new contact?
    2. If it’s not a new contact, do nothing. Otherwise, use the β€˜Item Lists’ integration to extract the information of the new contact.
    3. Use the β€˜One Simple API’ integration to check whether the email is suspicious or not.

Β 

Source: n8n.io

Β 

Source

Β 

Why Automate Workflows?

The simple answer is: Because you wantΒ  higher productivity with fewer resources.

Automating your workflows will speed up your processes, reduce operations costs, and save you a lot of money. Automation also removes human intervention from business processes and improves the quality of work.

Automation can reduce your teams’ workload, transforming them into more efficient, organized, and productive professionals.

What can n8n help you automate?

Right, you’re probably wondering how automation can help you.

Let’s explain.

While n8n requires more technical knowledge and lacks in-built integrations, it still matches the capabilities of top tools in its domain, like Zapier.

First, have a look at various integrations it works with:

  • Core Nodes: Compression, image editing, error triggering, item list fetching, date, time, encryption, HTML extraction, Merging, workflow execution, and so on.
  • Marketing and Content:Mailchimp, SendInBlue, Strapi, SendGrid, SurveyMonkey, MS Dynamics CRM, Google Slides, Iterable, Facebook, Bannerbear, and so on.
  • Communication and Sales: AWS SNS, ClickUp, ConvertKit, Discord, Freshdesk, Discourse, Freshworks, Hubspot, Intercom, LinkedIn, Mailchimp, Mandrill, MS Teams, MS Outlook, PayPal, and so on.
  • Data and Storage:Airtable, AWS S3, Dropbox, Google Drive, Google Sheets, MS Excel, OneDrive, Supabase, Odoo, Postgres, and so on.
  • Finance and Accounting:InvoiceNinja, PayPal, Stripe, CoinGecko, Xero, Wise, and so on.
  • Utility and Productivity: Asana, Bitbucket, Calendly, Flow, Freshservice, Google Calendar, Jira, Monday.com, One Simple API, Notion, Jira, and so on.
  • Development and Analytics:Github, Google Analytics, AWS SQS, CircleCI, Bubble, DHL, MongoDB, MQTT, Orbit, Twilio, and so on.
  • Misc.:BambooHR, Google Docs, Onfleet, Spotify, Workable, and so on.

Now that you know about integrations that work with n8n, you can assess your existing workflows to identify areas where you can combine and automate business operations. For example:

  • Enable PayPal invoice creation when an invoice is created in Invoice Ninja and has a valid PayPal ID of the client.
  • Add new orders in Shopify to your CRM.
  • Send email addresses of your Mailchimp subscribers to an Excel sheet.
  • Send order confirmation emails to customers for your FB Campaigns.
  • Send tasks to your employees in Slack every day.

You can also create more complex workflows with any number of nodes as your business demands.

n8n Vs. Zapier

How best can we appreciate the benefits of n8n than viewing it side by side with some of the most popular automation tools? Let’s compare and contrast n8n vs Zapier in the table below:

Zapier

n8n

Zapier allows more integrations (170+).

n8n.io has more diverse integrations available (220+ at present)

Zapier cannot be self-hosted and costs up to $599.

Self-hosted n8n is free. The cloud version costs up to $120.

Doesn’t support custom integrations (e.g., of your own scripts).

Allows custom integrations.Β 

Easy to set up

Complex installation process when self-hosted.

Low code platform automates workflows, so execution takes the least time. However, the controls are not very customizable.

Custom (not in-built) scripts and integrations automate various workflows.. Tougher than Zapier, but more customizable.

How to self-host n8n on Convox

To get started, sign up with Convox, then follow these steps next:

Step 1:

You should have a V2 (ECS) Rack up and running in your Convox Configuration. Follow these steps until the β€œInstall a Rack” step is completed.

*With a specific note before the β€œInstall a Rack” step advising to ensure the Rack is being created on ECS (Version 2) engine.

Step 2:

In the CLI, address the new rack with the command:Β 

convox switch [Rack Name]

In this example:

convox switch staging

Step 3:

***This step could be followed earlier too.***

Get the n8n example repository from this GitHub repository

Step 4:

Edit the convox.yml file to define environment variables for n8n:

The convox.ymlin the example repository comes with the required env var for functional user management and invite features via SMTP listed:

If you would prefer to manually manage users or simply to not setup SMTP you should use:

N8N_USER_MANAGEMENT_DISABLED=true

This configuration would look like this:

For a full list of the available n8n environment variables, including their: type, default value, and description, visit: https://docs.n8n.io/hosting/environment-variables/

Step 5:

Once desired variables are set, return to the CLI and execute the command:

convox apps create n8n

Once built, deploy the app with command:

convox deploy

Deployment may take a few minutes and will complete with a final message: OKΒ 

Step 6:

Now to show the DNS resolution for your running app execute the command:

convox services

Copy and paste the DOMAIN into your web browser to view your new self-hosted n8n instance.

The initial account setup will be the OWNER.Β 

Additional users can be invited via SMTP or manually configured in the settings menu.

Now, you can start using your self-hosted n8n as you prefer.

Why Convox?

n8n is a more cost-convenient and customizable automation solution when self-hosted. For self-hosting, we have suggested using Convox for many reasons:

  • Developer-friendly: Its K8s-based deployment allows you to customize your n8n installation and workflows easily.

  • Cloud: It is production-ready and supports DigitalOcean, AWS, Google Cloud, and Microsoft Azure. So, it can fulfill your cloud requirements for n8n very easily.

  • Convox allows auto-scaling and lets your n8n deployment grow without hassles.

  • Cost-convenience: Convox’s cost will amaze you when comparedΒ  with other options available.

Final Word

n8n is aΒ  powerful workflow automation tool that every business can use to work more efficiently. However, self-hosting this solution in an efficient infrastructure platform like Convox is the only way to explore the full potential of n8n’s capabilities. With this tutorial, you should have a step-by-step practical guide showing you how to do this.

Top comments (0)

🌚 Turn on dark mode

πŸ”  Change your default font

πŸ“š Adjust your experience level to see more relevant content

Β 

Head to your account's Settings to do all this and more.