← Library

How to host n8n on a Hostinger VPS: B2B automation, no per-task fees

How to host n8n on a Hostinger VPS with Docker, PostgreSQL, Nginx and SSL: architecture, RAM and CPU by volume, and the cost vs. Make and Zapier task fees.

by Ailton Carvalho · Servers and infrastructure · October 12, 2026 · 12 min read

The short answer

Hosting n8n on a VPS means running the automation tool on your own server, with a fixed machine cost instead of per-task billing. It pays off when volume already weighs on your Zapier bill (10,000 tasks cost $129 per month on the annual plan) or when your workflows have many steps per execution; at 10,000 credits, Make Core still sits in the same price range as the VPS. The production architecture has four pieces: n8n in Docker, PostgreSQL as the database, a reverse proxy (Nginx or Traefik) and an SSL certificate on the subdomain. At Hostinger, the KVM plans range from 4 GB to 32 GB of RAM, and the n8n documentation itself publishes a benchmark with a 4 GB instance handling up to 220 executions per second. The limit stops being the bill and becomes CPU, memory and whoever looks after the server. Once the automation starts carrying business-critical logic, the next step is a custom integration, not more nodes on the canvas.

1. Why per-task pricing hurts in B2B

Make and Zapier charge for the work your workflow performs. On Zapier, according to the official pricing page read on October 12, 2026, "a task is counted whenever Zapier successfully completes a unit of work for you": every completed action counts, while triggers and filters do not. On Make, every module action consumes one credit. n8n Cloud charges differently: per execution of the entire workflow, "regardless of complexity", as the n8n pricing page puts it.

In B2B operations the difference shows up fast. A workflow that receives an order, queries the ERP, updates the CRM, issues the invoice in the tax system and notifies the sales team has five actions. Running 2,000 times a month (a hypothetical example), that adds up to 10,000 tasks on Zapier and at least 10,000 credits on Make. On n8n, it is 2,000 executions. On your own VPS, the number of executions does not show up on the bill: it shows up in CPU and memory usage.

The second problem is what happens when you hit the limit. On Zapier, with pay-per-task turned on, overage costs 1.25 times the base rate on the annual plan and 2.5 times on the monthly plan, and usage stops once it reaches 3 times the subscription price. With the option turned off, automations stop at the limit until the next billing cycle. On Make, without credits "your scenarios won't continue to run". If you automate billing or customer service, stopping on the 25th of the month costs more than the difference between plans.

If you are still deciding between automating with an off-the-shelf tool or building a system, the custom systems and integrations page explains where each approach ends.

2. What each option costs, side by side

The figures below were read on the official pages on October 12, 2026. The units are not the same (task, credit, execution, server), and that is exactly the point: only the VPS does not grow with volume.

Option Price read on October 12, 2026 What that price includes Billing unit
Zapier Professional (annual) $49.00/month 2,000 tasks per month Each completed action
Zapier Professional (annual) $129.00/month 10,000 tasks per month Each completed action
Make Core $9/month 10,000 credits per month Each module action
n8n Cloud Starter (annual) €20/month 2,500 executions per month Entire workflow
n8n Cloud Pro (annual) €50/month 10,000 executions per month Entire workflow
Hostinger VPS KVM 2 R$ 43.99/month (renews at R$ 77.99) 2 vCPU, 8 GB RAM, 100 GB NVMe Fixed server

Sources: official pricing pages from Zapier, Make, n8n and Hostinger VPS.

Three notes before deciding on the table alone. First, Hostinger's promotional price is the plan total divided by the months contracted, and the renewal every 2 years is charged at full price; plan your budget around the renewal. Second, Hostinger's n8n hosting page advertises "unlimited workflows and executions", but the practical limit is the hardware: a heavy workflow on a small machine will stall before any quota kicks in. Third, n8n's paid Business license, even when self-hosted, counts executions from all instances toward the contracted quota, according to the n8n pricing page; the fixed cost applies to the standard self-hosted version that n8n maintains on GitHub.

The break-even point comes straight from the table. On Zapier, 10,000 tasks cost $129 per month on the annual plan; KVM 2 renews at R$ 77.99, and since the dollar is worth more than the real, the VPS comes out cheaper without any exchange-rate math. Against Make it is different: at 10,000 credits, Core costs $9 per month, in the same range as KVM 2, with no server to maintain. At that volume Make does not lose to the VPS. The VPS pays off for three profiles: anyone already paying for Zapier's 10,000-task tier or higher; anyone running workflows with many steps, because each module action consumes a credit on Make; and anyone who cannot afford to see the automation stop when credits run out. Make's page only shows pricing for 10,000 credits; for larger volumes, check the table before deciding.

The cost that does not appear in the table is operations: updating, backing up, reading logs when a webhook fails. The n8n documentation itself warns: "n8n recommends self-hosting for expert users. Mistakes can lead to data loss, security issues, and downtime." That time has a price, whether it is yours or that of whoever you hire.

3. Reference architecture for production

Hostinger's "Ubuntu 24.04 with n8n" template ships n8n preinstalled in Docker and gets you started in minutes. For a B2B operation that will depend on the automation, the recommended architecture has four layers.

n8n in Docker

The official image is n8nio/n8n and it listens on port 5678. The container needs a persistent volume for the n8n data directory: even with an external database, the documentation says that is where the instance's encryption keys and logs live. Losing that volume without having the key saved means losing access to the stored credentials.

PostgreSQL instead of SQLite

By default n8n stores credentials, executions and workflows in SQLite, a file inside the volume. That works for testing. In production, PostgreSQL makes consistent backups easier, handles more concurrent writes and is the database n8n used in the single-instance performance benchmark published in its documentation. The switch is made through environment variables: DB_TYPE=postgresdb and the DB_POSTGRESDB_* variables.

Reverse proxy with SSL

n8n should not be exposed directly to the internet. The official Docker Compose guide uses Traefik to issue and renew TLS certificates and makes n8n reachable only over HTTPS. If your VPS already runs Nginx for other sites, Nginx does the same job: it receives traffic on the subdomain, terminates SSL and forwards to n8n's local port. Webhooks from ERPs, payment gateways and CRMs require valid HTTPS, so this layer is not optional.

Subdomain and webhook URL

The prerequisite in the official guide is a domain or subdomain with an A record pointing to the VPS IP. n8n needs to know that address to generate the correct webhook URLs: N8N_HOST, N8N_PROTOCOL=https and N8N_WEBHOOK_URL, a variable that exists from n8n 2.30.0 onward; in earlier versions the name is WEBHOOK_URL. Without it, n8n generates webhooks with the internal address and the external system never reaches it.

4. Sizing: how much RAM and CPU n8n needs

The n8n documentation does not publish a minimum memory requirement. What it publishes is more useful: what drives memory up and a reference benchmark. On the memory errors page, n8n says it "doesn't restrict the amount of data each node can fetch and process" and lists the factors that weigh in: JSON volume, binary file size, number of nodes in the workflow, use of the Code node, manual executions (n8n copies the data to the UI) and workflows running at the same time.

The performance benchmark published in the documentation used a single instance with 4 GB of RAM, n8n in main mode and PostgreSQL, and recorded up to 220 workflow executions per second. That shows 4 GB runs n8n comfortably for lightweight workflows. It does not show how it behaves with large spreadsheets, PDFs or calls to AI models, which is where memory blows up.

Hostinger plan vCPU RAM NVMe Price read on October 12, 2026 Recommended usage profile
KVM 1 1 4 GB 50 GB R$ 29.99/month (renews at R$ 59.99) n8n with SQLite or lightweight workflows, no files
KVM 2 2 8 GB 100 GB R$ 43.99/month (renews at R$ 77.99) n8n, PostgreSQL and proxy on the same machine
KVM 4 4 16 GB 200 GB R$ 59.99/month (renews at R$ 149.99) Large files, many workflows in parallel
KVM 8 8 32 GB 400 GB R$ 119.99/month (renews at R$ 259.99) Queue mode with several workers

Source for specs and prices: Hostinger's official VPS page. The profile column is my recommendation based on the memory factors in the n8n documentation, not a measurement.

For a B2B operation with PostgreSQL on the same server, KVM 2 is the sensible starting point: the database and the proxy also consume memory, and the headroom keeps a workflow with an attachment from taking the others down. Hostinger's FAQ describes KVM 2 the same way, as enough power for mid-sized applications such as n8n.

Before upgrading your plan, tune the workflow. The n8n documentation recommends splitting processing into batches (the official example swaps 10,000 rows per execution for 200), avoiding the Code node when a native node does the job, not testing large volumes in manual executions and breaking the workflow into sub-workflows that return little data to the main one. If heap errors still show up, the NODE_OPTIONS variable with the --max-old-space-size flag increases the memory available to Node.

When one server is not enough, n8n scales in queue mode: the documentation's multi-instance benchmark uses separate instances for webhooks and workers, with Redis. Hostinger offers a VPS template specifically for n8n in queue mode.

5. Step by step on a Hostinger VPS

The path below follows n8n's official Docker Compose guide, with PostgreSQL and a proxy in front. If you used Hostinger's ready-made template, the DNS, proxy and validation steps still apply.

5.1 Point the subdomain

In your domain's control panel, create an A record for the subdomain (for example n8n.suaempresa.com.br) with the VPS IP. Check whether it has propagated:

dig +short n8n.suaempresa.com.br

The response has to be the VPS IP. Until it is, the SSL certificate will not be issued.

5.2 Check Docker and generate the secrets

The official guide requires Docker Engine and Docker Compose to be installed. Then create the project folder and generate the N8N_ENCRYPTION_KEY and the database password straight into the .env file, without printing the values to the terminal:

docker --version
docker compose version
mkdir -p ~/n8n && cd ~/n8n
echo "N8N_ENCRYPTION_KEY=$(openssl rand -hex 32)" >> .env
echo "DB_POSTGRESDB_PASSWORD=$(openssl rand -hex 24)" >> .env
chmod 600 .env

The values do not appear in the terminal output. Open .env only when it is time to copy the key and the password into a password manager, off the server.

5.3 Configure the database and the public address

In the same folder, add the remaining PostgreSQL variables to .env. This file never goes into a repository.

DB_TYPE=postgresdb
DB_POSTGRESDB_HOST=postgres
DB_POSTGRESDB_DATABASE=n8n
DB_POSTGRESDB_USER=n8n

In the same file, the public address and the time zone. On n8n versions earlier than 2.30.0, replace N8N_WEBHOOK_URL with WEBHOOK_URL.

N8N_HOST=n8n.suaempresa.com.br
N8N_PROTOCOL=https
N8N_WEBHOOK_URL=https://n8n.suaempresa.com.br/
GENERIC_TIMEZONE=America/Sao_Paulo
TZ=America/Sao_Paulo

5.4 Start the containers

Start from the docker-compose.yml in the official guide and add a postgres service with its own volume. In the n8n service, keep the data volume, point env_file to .env and publish port 5678 only on 127.0.0.1, so that only the proxy can reach n8n.

sudo docker compose up -d
sudo docker compose ps
sudo docker compose logs n8n --tail 50

Both containers need to show as running, and the n8n log must not show any database connection error.

5.5 Add the proxy and SSL

If you use the Traefik setup from the official guide, the certificate is issued automatically on first access. If the VPS already has Nginx, create a site for the subdomain with this block, which forwards traffic and keeps the n8n UI's real-time connection working:

location / {
    proxy_pass http://127.0.0.1:5678;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
}

Then issue the certificate and test the public address:

sudo certbot --nginx -d n8n.suaempresa.com.br
curl -I https://n8n.suaempresa.com.br

curl has to respond with status 200 over HTTPS, with no certificate warning. Open the address in your browser and create the instance owner account. In the VPS firewall, leave only SSH, HTTP and HTTPS open.

6. Operations: what keeps n8n running

Getting it up is the short part. What separates a reliable automation from one that vanishes on a Friday night is the routine.

Backup in two parts. The PostgreSQL dump holds workflows, encrypted credentials and history. The N8N_ENCRYPTION_KEY holds the ability to read those credentials. One without the other restores nothing. Run the dump daily to a location off the VPS and test the restore on a clean machine at least once.

Pruning execution history. n8n already prunes old executions by default: it deletes anything older than 336 hours (14 days) or anything beyond 10,000 stored executions, according to the execution data documentation. Without that, the database grows until the disk runs out. If you want to make it explicit in .env:

EXECUTIONS_DATA_PRUNE=true
EXECUTIONS_DATA_MAX_AGE=336
EXECUTIONS_DATA_PRUNE_MAX_COUNT=10000

Updates with a maintenance window. Updating means pulling the new image and recreating the container through Compose. Do it after the backup, outside the hours when customer webhooks come in, and read the release notes first: the switch from WEBHOOK_URL to N8N_WEBHOOK_URL alone shows that variable names change between versions.

Minimum monitoring. Set up an error workflow in n8n that alerts the team when another workflow fails, and an external monitor that hits the subdomain at regular intervals. If the server goes down, the external monitor is the only thing that will notice.

If the same VPS runs other tools, such as AI agents, separate them by container and keep an eye on total memory. The article on Claude Code 24/7 on a Hostinger VPS shows that other use of the same kind of server.

7. When n8n is not enough and a custom integration is worth it

n8n is excellent for connecting systems that already have an API and a connector. It starts to be the wrong place in four situations.

  1. Business logic lives on the canvas. Pricing calculations, credit policy or tax rules scattered across Code nodes become code with no tests, no review and no reliable versioning. Critical logic belongs in its own service, and n8n just calls that service.
  2. Volume demands consistency. When an order must never be processed twice or get lost, you need a queue, idempotency and controlled reprocessing. You can build part of that in n8n, but a dedicated worker solves it with fewer moving parts.
  3. The system on the other side has no connector. A legacy ERP, a local database or a portal without an API needs an adapter written for that system. n8n consumes the adapter; it does not replace it.
  4. The team needs a screen, not a workflow. Approvals, checks and exceptions call for an interface. If the automation was born to replace a spreadsheet that keeps freezing, the article on when to replace a spreadsheet with a system helps you tell whether it is time for a dashboard.

The design that tends to work in B2B is hybrid: n8n for orchestration and simple integrations, your own services for critical logic and hard connectors, all on the same infrastructure you control.

A ready-made prompt for your agent

Paste the text below into the AI agent that has access to your VPS terminal (over SSH). It checks the prerequisites, runs the steps from section 5 in the same order and stops at the first error. Logging into the control panel, creating the DNS record and creating the owner account in the browser remain your job.

You are going to install n8n on an Ubuntu VPS with Docker, PostgreSQL, a proxy and SSL.

My details:
- Subdomain: <SUBDOMAIN>  (e.g.: n8n.suaempresa.com.br)
- VPS IP: <VPS_IP>
- Proxy: <TRAEFIK_OR_NGINX>

Rules:
- Never print, paste into the chat or save to a versioned file any password, token, API key or login code.
- The database password and the N8N_ENCRYPTION_KEY go only in the server's .env file; tell me where they are, not the value.
- Show each command before running it and stop at the exact error, with the output.
- Do not invent commands, versions or prices. Use only the commands below.

Prerequisites (check these first):
1. Run: dig +short <SUBDOMAIN>. The output has to be <VPS_IP>. If it is not, stop and ask me to create the A record in the domain control panel.
2. Run: docker --version and docker compose version. If either is missing, stop and let me know.

Steps:
3. Run: mkdir -p ~/n8n && cd ~/n8n. Then, without printing the values: echo "N8N_ENCRYPTION_KEY=$(openssl rand -hex 32)" >> .env, echo "DB_POSTGRESDB_PASSWORD=$(openssl rand -hex 24)" >> .env and chmod 600 .env. Never run openssl rand on its own or show the contents of .env. Remind me to copy the key and the password from .env into a password manager.
4. Add to .env: DB_TYPE=postgresdb, DB_POSTGRESDB_HOST=postgres, DB_POSTGRESDB_DATABASE=n8n, DB_POSTGRESDB_USER=n8n.
5. Add to .env: N8N_HOST=<SUBDOMAIN>, N8N_PROTOCOL=https, N8N_WEBHOOK_URL=https://<SUBDOMAIN>/, GENERIC_TIMEZONE=America/Sao_Paulo, TZ=America/Sao_Paulo. If the n8n version is earlier than 2.30.0, use WEBHOOK_URL instead of N8N_WEBHOOK_URL.
6. Build the docker-compose.yml from n8n's official Docker Compose guide, with a postgres service with its own volume; in the n8n service, keep the data volume, use env_file .env and publish port 5678 only on 127.0.0.1.
7. Run: sudo docker compose up -d, then sudo docker compose ps and sudo docker compose logs n8n --tail 50. Both containers must be running and the log must not show any database connection error.
8. Proxy:
   - If <TRAEFIK_OR_NGINX> is Traefik, use the configuration from the official guide.
   - If it is Nginx, create the subdomain site with location / forwarding to http://127.0.0.1:5678, proxy_http_version 1.1 and the Upgrade and Connection "upgrade" headers. Then run: sudo certbot --nginx -d <SUBDOMAIN>.
9. In the VPS firewall, leave only SSH, HTTP and HTTPS open.

Steps that are mine (let me know when you reach them):
- Create the A record in the domain control panel.
- Open https://<SUBDOMAIN> in the browser and create the instance owner account.
- Copy the N8N_ENCRYPTION_KEY and the database password from .env into a password manager.

Final validation:
- Run: curl -I https://<SUBDOMAIN>. It has to respond with status 200 over HTTPS, with no certificate error.
- Run: sudo docker compose ps. n8n and postgres running.
Only say you are done when both validations pass. Give me a summary of what was done and where each file ended up.

Frequently asked questions

How much does it cost to host n8n?

The main cost is the VPS. On Hostinger's official page, read on October 12, 2026, KVM 1 (4 GB of RAM) costs R$ 29.99/month and renews at R$ 59.99/month; KVM 2 (8 GB) costs R$ 43.99/month and renews at R$ 77.99/month, with renewal every 2 years. Add the domain, which you probably already have, and maintenance time. For comparison, n8n Cloud Starter costs 20 euros per month on the annual plan with 2,500 executions, according to the n8n pricing page.

How many GB of RAM does n8n need?

The n8n documentation does not set a minimum. The performance benchmark it publishes used an instance with 4 GB of RAM and PostgreSQL and reached 220 executions per second. In practice, 4 GB handles lightweight workflows; with PostgreSQL and a proxy on the same machine and files moving through the workflow, 8 GB gives you headroom. Consumption rises with JSON volume, binary files, the Code node and concurrent workflows.

Can I use Hostinger's n8n template in production?

Yes, as a starting point. The "Ubuntu 24.04 with n8n" template ships with n8n already installed in Docker. Before putting customer processes on top of it, check which database it uses, switch to PostgreSQL if it is on SQLite, and set up the subdomain with SSL, the webhook variables and backups that include the encryption key.

SQLite or PostgreSQL?

SQLite is n8n's default and is fine for testing. For production, PostgreSQL: consistent backups while n8n is running, better handling of concurrent executions, and it is the database used in the documentation's single-instance performance benchmark. It also avoids SQLite's problem of not giving disk space back without running VACUUM.

Does n8n on my VPS have an execution limit?

Billing does not. The limit becomes the machine's capacity: CPU, memory and disk. The exception is n8n's paid Business license, which, even when self-hosted, counts executions from all instances toward the contracted quota, according to the n8n pricing page.

Conclusion

Hosting n8n on a Hostinger VPS swaps a bill that grows with volume for a fixed server cost. It pays off against Zapier at the 10,000-task tier and for workflows with many steps; against Make Core at 10,000 credits the price is a tie, and the advantage is not stopping when the quota runs out. The price of that is operations: PostgreSQL, a proxy with SSL, backups that include the encryption key and updates with a maintenance window. Start on KVM 2 if the database and proxy share the same machine, tune your workflows before upgrading your plan and move critical business logic off the canvas. Once the automation starts supporting billing, inventory or customer service, it deserves the same care as a custom system.

If what you need is integration and automated workflows for custom systems, with your ERP, your store or your CRM talking to each other through webhooks and queues, describe your systems and what you want to automate at oailton.dev/contato.

Sources

  1. 1Read on October 12, 2026: by default n8n uses SQLite to store credentials, executions and workflows; for PostgreSQL it uses DB_TYPE=postgresdb and the variables DB_POSTGRESDB_DATABASE, HOST, PORT, USER, SCHEMA and PASSWORD; the container's data directory still holds encryption keys and logs, so the volume must be kept; N8N_ENCRYPTION_KEY can be set; n8nio/n8n image on port 5678 n8n Docs (Docker)
  2. 2Read on October 12, 2026: Docker Compose on a Linux server requires a domain or subdomain with an A record pointing to the server's IP; uses Traefik for TLS certificates; N8N_HOST, N8N_PROTOCOL=https and N8N_WEBHOOK_URL (available from n8n 2.30.0, use WEBHOOK_URL before that); started with sudo docker compose up -d; 'n8n recommends self-hosting for expert users. Mistakes can lead to data loss, security issues, and downtime.' n8n Docs (Docker Compose)
  3. 3Read on October 12, 2026: n8n does not restrict the amount of data each node fetches and processes; memory use grows with JSON volume, binary data size, number of nodes, the Code node, manual executions and concurrent workflows; example of processing 200 rows per execution instead of 10,000; NODE_OPTIONS with --max-old-space-size for heap errors n8n Docs (Memory-related errors)
  4. 4Read on October 12, 2026: n8n processes up to 220 workflow executions per second on a single instance; test on a c5a.large instance with 4 GB of RAM, n8n in main mode with PostgreSQL; the multi-instance setup uses queue mode with Redis; the page does not state a minimum requirement n8n Docs (Performance benchmarking)
  5. 5Read on October 12, 2026: n8n enables execution pruning by default; EXECUTIONS_DATA_MAX_AGE defaults to 336 hours (14 days); EXECUTIONS_DATA_PRUNE_MAX_COUNT defaults to 10,000; the database can grow until it runs out of space; with SQLite the space is not reclaimed without VACUUM n8n Docs (Execution data)
  6. 6Read on October 12, 2026: n8n Cloud Starter at 20 euros per month on the annual plan with 2,500 executions; Pro at 50 euros with 10,000; Business at 667 euros with 40,000, self-hosted only, with usage across all instances on the license counted toward the quota; billing is per execution of the entire workflow, not per step; the standard self-hosted version is available on GitHub n8n (official pricing page)
  7. 7Read on October 12, 2026: KVM 1 (1 vCPU, 4 GB RAM, 50 GB NVMe) R$ 29.99/month, renews at R$ 59.99/month; KVM 2 (2 vCPU, 8 GB, 100 GB) R$ 43.99/month, renews at R$ 77.99/month; KVM 4 (4 vCPU, 16 GB, 200 GB) R$ 59.99/month, renews at R$ 149.99/month; KVM 8 (8 vCPU, 32 GB, 400 GB) R$ 119.99/month, renews at R$ 259.99/month; renewal every 2 years; the price is the plan total divided by the months contracted; the FAQ cites KVM 2 as enough for mid-sized applications such as n8n Hostinger (official VPS page)
  8. 8Read on October 12, 2026: 'Ubuntu 24.04 with n8n' template with n8n preinstalled in Docker; a separate template for n8n in queue mode; KVM 2 marked as most popular; the page advertises unlimited workflows and executions Hostinger (n8n hosting page)
  9. 9Read on October 12, 2026: Zapier Free with 100 tasks per month; Professional at US$ 19.99/month billed annually (US$ 29.99 monthly) with 750 tasks; 2,000 tasks at US$ 49.00 and 10,000 tasks at US$ 129.00 on Pro annual; Team at US$ 69.00/month annual with 2,000 tasks; a task counts for each completed unit of work, triggers and Filter do not count; above the limit, per-task billing at 1.25 times the base rate on annual and 2.5 times on monthly, capped at 3 times the subscription Zapier (official pricing page)
  10. 10Read on October 12, 2026: Make Free with up to 1,000 credits per month; Core at US$ 9/month, Pro at US$ 16/month and Teams at US$ 29/month, prices shown for 10,000 credits; each module action counts as one credit; without credits, scenarios stop until more are purchased Make (official pricing page)

Ailton Carvalho

I build custom web systems, internal tools, integrations and stores that sell on mobile. You get working code and someone accountable after launch.

Talk on WhatsApp

Next step: Custom web systems

Related