Home › Blog › Automation

n8n automation AMI for AWS: self-hosted workflows live in minutes, not hours

A complete n8n environment on Ubuntu 26.04, backed by PostgreSQL 18 and managed as a systemd service, built to go from instance launched to workflow running in minutes rather than hours.

Automation·12 min read·AWS CloudOps·Updated Oct 12, 2026

n8n's appeal is straightforward: own the automation layer instead of renting it from a SaaS vendor that caps monthly executions or gates integrations behind pricing tiers. The catch is that self-hosting n8n properly means more than installing the application. It means wiring up Node.js, putting a real database behind it instead of the default SQLite (which doesn't hold up under production workloads), and making sure the service survives a reboot without manual intervention. All of that has to happen before the first workflow gets built.

This AMI removes that setup work. It's a complete n8n environment on Ubuntu 26.04, backed by PostgreSQL 18 and managed as a systemd service, built to go from "instance launched" to "workflow running" in minutes rather than hours.

Quick facts

SpecDetail
Base OSUbuntu 26.04 LTS
Applicationn8n with PostgreSQL 18 backend
Service managementsystemd auto-start, persistent storage
AccessInstance public IP on port 5678
Recommended instancet3.medium
Pricing$0.10/hour AMI fee + standard AWS EC2 instance cost
CategoriesData Analysis · Application Development · IT Support
VendorTechforce Services Inc

Table 1. At-a-glance specification of the n8n Automation AMI.

Why self-host n8n instead of the cloud version

Self-hosting removes per-execution and per-workflow pricing tiers entirely. Compute is the only constraint, not a usage ceiling. It also keeps full control over data flowing through connected integrations, which matters the moment a workflow touches customer data or internal systems that shouldn't pass through a third-party SaaS backend. And it comes with unrestricted access to n8n's full integration library and custom node support, without platform-imposed limits on what can be connected or how.

Architecture: what's running under the hood

ComponentRole in the stack
n8n applicationWorkflow editor, execution engine, and webhook listener
PostgreSQL 18Persistent storage for workflows, credentials, and execution history
Node.js runtimeUnderlying runtime n8n is built on
systemd serviceKeeps n8n running and auto-restarts it after a reboot

Table 2. Core components bundled into this AMI.

The database choice is the detail most DIY setups get wrong: n8n defaults to SQLite, which is fine for evaluation but becomes a liability under concurrent executions and larger workflow histories. Shipping with PostgreSQL preconfigured from the start avoids a painful database migration later.

What you can actually build with it

Workflow typeExample use case
Webhook-triggeredKick off a process the moment a form is submitted or an event fires
Scheduled / cronNightly data syncs, recurring reports, periodic cleanup jobs
REST API integrationConnect internal tools or third-party SaaS platforms together
Database workflowsRead, write, and sync records across systems automatically
Email automationTrigger notifications or parse incoming messages into actions
AI / LLM agent workflowsChain LLM calls with tools and data sources for agentic automation

Table 3. Representative workflow types n8n's canvas supports out of the box.

Self-hosted n8n vs. the alternatives

FactorThis AMI (self-hosted)n8n CloudZapier / Make
Pricing modelFlat compute cost ($0.10/hr + EC2)Tiered plans with execution capsTiered plans, priced per task/operation
Execution limitsLimited only by instance capacityCapped per plan, overage billedCapped per plan, overage billed
Data controlStays inside your own AWS accountProcessed on vendor infrastructureProcessed on vendor infrastructure
Custom nodes / code stepsFully supported, no platform restrictionMay be limited by plan tierLimited or unavailable on lower tiers
Integration breadth400+ integrations, self-hostedSame n8n library, hostedLarge library, but workflow logic is simpler
Setup timeMinutes (preconfigured stack)Minutes (no infra to manage)Minutes (no infra to manage)

Table 4. How self-hosting compares against n8n Cloud and mainstream SaaS automation tools.

From launch to first workflow

Once the instance is running, n8n is reachable immediately on the instance's public IP over port 5678. The first visit walks through creating the administrator account, and from there it's straight into the workflow editor. There's no separate setup phase between the server coming online and the team being able to use it.

Security hardening checklist

AreaRecommended action
Public exposureRestrict port 5678 to known IPs or place behind a VPN/reverse proxy rather than leaving it open
TLS/SSLFront the instance with a domain and certificate instead of serving the editor over plain HTTP
Credential storageUse n8n's built-in credential encryption rather than hardcoding secrets inside workflows
User managementCreate individual user accounts instead of sharing one admin login across the team
Database backupsSchedule regular PostgreSQL backups/snapshots of workflow and execution data
Webhook validationValidate and authenticate incoming webhook payloads rather than trusting them implicitly

Table 5. Baseline hardening steps to apply after first launch.

Backup and scaling considerations

Because workflow definitions, credentials, and execution history all live in PostgreSQL, a standard pg_dump (or EBS snapshot of the data volume) on a schedule is sufficient for disaster recovery. There's no separate datastore to coordinate. As execution volume grows, the first scaling lever is usually instance size (moving from t3.medium toward the m5 or c6i families). Past that, n8n supports a queue-mode architecture that separates the editor/API from worker processes, which is the standard next step for high-throughput production use.

Common pitfalls to avoid

PitfallWhy it happensHow to avoid it
Editor exposed publiclyLeaving port 5678 open to the internet by defaultRestrict via security group or put behind a VPN/reverse proxy
No database backupAssuming the instance itself is the only thing that mattersSchedule PostgreSQL backups independently of instance snapshots
Undersized instance under loadStarting at t3.medium and never revisiting sizingMonitor CPU/memory as workflow volume grows and resize proactively
Secrets hardcoded in workflowsPasting API keys directly into workflow nodesUse n8n's built-in credential store instead

Table 6. Mistakes most commonly made in early n8n deployments.

How billing works

Pricing is usage-based at $0.10 per hour, in addition to normal AWS EC2 infrastructure costs for the chosen instance size. There's no end date on the subscription, and it can be canceled at any time.

Scaling automation into a broader AWS footprint? See how we approach cutting AWS cost and migration planning for 2026.
Need help running automation infrastructure on AWS?
We'll size, secure, and operate it for you.
Book a Cloud Assessment
What instance size should I start with for n8n?

t3.medium is the recommended starting point. Instance needs grow with workflow complexity and concurrent execution volume rather than just editor access, so monitor usage as automation scales up.

How do I access n8n after launching the instance?

Once the instance is running, open its public IP address on port 5678 in a browser. The first visit prompts you to create the administrator account.

Will n8n automatically restart if the EC2 instance reboots?

Yes, n8n runs as a systemd service configured to auto-start, so it comes back up automatically after a reboot without manual intervention.

Can I connect AI/LLM workflows with this setup?

Yes, n8n supports AI and LLM-connected agent workflows natively through its workflow editor, alongside its standard automation and integration nodes.

How does pricing work for this AMI versus n8n Cloud?

This AMI is billed at $0.10 per hour plus standard AWS EC2 infrastructure costs, with no per-execution or per-workflow caps. You're paying for compute, not usage tiers, and can cancel anytime.

How do I back up my workflows and execution history?

Since everything is stored in PostgreSQL, a scheduled pg_dump or an EBS snapshot of the data volume is sufficient to back up workflows, credentials, and execution history.

What happens if workflow volume outgrows a single instance?

The typical path is resizing toward the m5 or c6i instance families first, and adopting n8n's queue-mode architecture (separating the editor from worker processes) if execution concurrency continues to grow.

Is port 5678 safe to leave open to the internet?

It's not recommended as a long-term setup. Restrict access via security group rules to known IPs, or place the instance behind a VPN or reverse proxy with TLS before relying on it for production workflows.