Cloud VPS from $1.98/mo · pay with Bitcoin, Ethereum, Monero, USDT or Solana · paid in crypto
Self-hosting

Self-hosted workflow automation: n8n, Activepieces and more

n8n, Activepieces, Node-RED, Huginn, Windmill and Kestra compared on license and fit, plus how to run an automation server that holds every credential safely.

CloudSat teamNovember 18, 20267 min read
Abstract illustration of glowing nodes wired into a branching flow that ends in several small app icons
On this pageWhat changes when you self-host

Hosted automation services price by volume: tasks, operations or runs, so every extra step in a busy workflow costs more. A self-hosted engine turns that into a fixed cost, the server and your time, and keeps the data flowing between your systems on a machine you control. It also concentrates risk. The automation server ends up holding API keys for the CRM, the mailbox, the database and the chat, which makes the license and the way you run it matter more than the size of the integration catalog.

What changes when you self-host

  • Cost follows the server, not the step count. A workflow that polls every minute or fans out to hundreds of records costs the same as one that runs weekly, until the server runs out of capacity.
  • Data stays on your path. Payloads pass through your server instead of a vendor's, which helps when the data is personal or confidential.
  • You own the uptime. Missed webhooks, stuck executions and expired OAuth tokens become your alerts to answer.
  • You own the license terms. Several of these tools are not open source in the strict sense, and the difference matters as soon as a client or a customer touches the workflows.

The candidates

n8n: the broadest catalog, fair-code license

n8n has a large catalog of integration nodes, a visual editor, Code nodes for JavaScript and Python, and AI agent nodes. It is licensed under the Sustainable Use License, which allows use and modification "only for your own internal business purposes or for non-commercial or personal use", and distribution only free of charge for non-commercial purposes. Files with .ee. in their name need a separate n8n Enterprise License.

The free Community edition leaves out projects, sharing of workflows and credentials between users, SSO (SAML and LDAP), Git version control, environments, external secrets, log streaming, external binary storage and multi-main mode. Registering your instance with an email address adds a free license key for folders, debugging in the editor and custom execution data. For a team, the missing sharing is the limit you will meet first.

Activepieces: MIT community edition

Activepieces releases its Community Edition under the MIT license, with enterprise code kept separately under a commercial license. Integrations, called pieces, are npm packages written in TypeScript, and Activepieces makes contributed pieces available as MCP servers for AI clients. Its builder is aimed at non-developers, which suits operations and marketing teams.

Node-RED: flows for devices and APIs

Node-RED (Apache-2.0) wires nodes together in a browser editor and is at home with MQTT, serial devices and home automation as well as HTTP APIs. One default needs changing on day one: the editor is not secured unless you configure adminAuth, and the documentation calls the default suitable only on a trusted network.

Huginn: agents that watch the web

Huginn (MIT) is a Rails application of agents that create and consume events along a directed graph: watch a page, filter the change, send a digest. It runs on MySQL or PostgreSQL, ships a single-container image at ghcr.io/huginn/huginn, and fits monitoring and personal alerting better than business integrations.

Windmill and Kestra: when workflows are code

Windmill turns scripts in Python, TypeScript, Go, Bash and more into flows, APIs, cron jobs and simple UIs, with a PostgreSQL database holding the job queue. Its Community Edition is AGPLv3 and free for internal use within its limits; reselling it or offering it as a service needs a commercial license. Kestra (Apache-2.0) defines workflows in declarative YAML and unifies scheduled and event-driven orchestration. Both suit engineers who want automations reviewed in Git like any other code.

License check before you build

Tool License Free for internal use Hosting it for customers
n8n Sustainable Use License; enterprise files separate Yes Not under the free license
Activepieces MIT (Community Edition) Yes Allowed by MIT for the community code
Node-RED Apache-2.0 Yes Allowed
Huginn MIT Yes Allowed
Windmill AGPLv3 (Community Edition) Yes, within its limits Needs a commercial license
Kestra Apache-2.0 Yes Allowed

If an agency builds workflows for clients, or a product embeds automation for its users, read the full license text and ask the vendor before the first deployment, not after.

Run n8n with PostgreSQL behind HTTPS

Start from the official Compose file, docker/get-n8n-compose.yml in the n8n repository, and its .env template. It runs n8n with task runners in a separate container for Code nodes, plus a code sandbox service and a SearXNG search instance, and n8n asks for at least 4 GB of RAM and 2 vCPUs for it. Set N8N_VERSION to the latest stable release rather than a moving tag.

Out of the box it stores data in SQLite. To use PostgreSQL, add the documented service and volume:

volumes:
  db-storage:

services:
  postgres:
    image: postgres:18
    restart: always
    environment:
      POSTGRES_USER: ${POSTGRES_USER}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
      POSTGRES_DB: ${POSTGRES_DB}
      PGDATA: /var/lib/postgresql/data
    volumes:
      - db-storage:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -h localhost -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
      interval: 5s
      timeout: 5s
      retries: 10

Then add DB_TYPE: postgresdb and the DB_POSTGRESDB_HOST, DB_POSTGRESDB_PORT, DB_POSTGRESDB_DATABASE, DB_POSTGRESDB_USER and DB_POSTGRESDB_PASSWORD variables to the n8n service, plus a depends_on entry that waits for postgres to be healthy. Keep the PGDATA line: without it, PostgreSQL 18 writes outside the mounted volume and you end up with an empty database. Existing SQLite data does not move over by itself, so decide before you build workflows.

The n8n service reads .env, so the public URL, the proxy and the encryption key go there. Set the key before the first start; otherwise n8n generates its own and saves it in its data volume.

POSTGRES_USER=n8n
POSTGRES_PASSWORD=replace-with-openssl-rand-hex-24
POSTGRES_DB=n8n
N8N_ENCRYPTION_KEY=replace-with-openssl-rand-hex-32
N8N_HOST=n8n.example.com
N8N_PROTOCOL=https
N8N_PROXY_HOPS=1
N8N_WEBHOOK_URL=https://n8n.example.com/
N8N_EDITOR_BASE_URL=https://n8n.example.com/

Change the published port from 5678:5678 to 127.0.0.1:5678:5678 so only the proxy reaches n8n, and put Caddy in front:

n8n.example.com {
    reverse_proxy 127.0.0.1:5678
}

N8N_WEBHOOK_URL replaced the older WEBHOOK_URL, which still works but logs a deprecation warning. On CloudSat, n8n hosting starts from a one-click n8n app, and the 4 GB Cloud VPS at $11.58/mo matches n8n's stated minimum of 4 GB and 2 vCPUs.

Treat the server like a vault

  • Keep the encryption key twice. n8n encrypts stored credentials with N8N_ENCRYPTION_KEY before saving them to the database. Without the key, a database backup restores workflows whose credentials cannot be decrypted. Store it in your password manager, separately from the backups.
  • Close the editor. Only the webhook paths need to be public. Restrict the editor to your office or VPN addresses at the proxy, and configure adminAuth on Node-RED before anything else.
  • Authenticate every webhook. A webhook URL is an open door to whatever the workflow does next. Require a secret header or a signature, and reject everything else early in the flow.
  • Contain code. Run n8n's task runners in their own container, which its documentation recommends for production, and give each credential the narrowest scopes the workflow needs.
  • Upgrade on purpose. Pin versions, read the release notes, back up the database and the key, then upgrade. Compare your Compose file with the official one after major releases.

When one instance is not enough

n8n's queue mode splits the work: the main instance receives triggers and webhooks, Redis queues executions, and workers run them. Set EXECUTIONS_MODE=queue on the main instance and every worker, point QUEUE_BULL_REDIS_HOST at Redis, give every worker the same N8N_ENCRYPTION_KEY, and start workers with n8n worker. Use PostgreSQL for this: n8n does not support a distributed setup on SQLite. Each worker runs up to 10 executions at a time by default.

FAQ

Can an agency use n8n for client workflows?

The free license covers your own internal business use. Building and running workflows for clients may fall outside it, depending on who hosts what. Read the license text and confirm with n8n before you sell anything built on it, or pick a tool under MIT or Apache-2.0.

Is SQLite fine to start with?

For one person testing ideas, yes. For anything a team depends on, start on PostgreSQL: SQLite data does not migrate by itself, and queue mode needs PostgreSQL.

Can I import my existing hosted automations?

Plan to rebuild them. List each automation with its trigger, steps, credentials and owner, rebuild the busiest ones first, and run old and new side by side until the outputs match.

Which tool for a non-technical team?

Activepieces or n8n, both with visual builders. Choose Node-RED for devices and MQTT, Huginn for watching websites, and Windmill or Kestra when engineers own the automations.

Run it on CloudSat. Cloud VPS on AMD EPYC and NVMe from $1.98/mo in 13 regions, delivered in under 5 minutes and paid in crypto. See plans or deploy a server.