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.
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
| Spec | Detail |
|---|---|
| Base OS | Ubuntu 26.04 LTS |
| Application | n8n with PostgreSQL 18 backend |
| Service management | systemd auto-start, persistent storage |
| Access | Instance public IP on port 5678 |
| Recommended instance | t3.medium |
| Pricing | $0.10/hour AMI fee + standard AWS EC2 instance cost |
| Categories | Data Analysis · Application Development · IT Support |
| Vendor | Techforce 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
| Component | Role in the stack |
|---|---|
| n8n application | Workflow editor, execution engine, and webhook listener |
| PostgreSQL 18 | Persistent storage for workflows, credentials, and execution history |
| Node.js runtime | Underlying runtime n8n is built on |
| systemd service | Keeps 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 type | Example use case |
|---|---|
| Webhook-triggered | Kick off a process the moment a form is submitted or an event fires |
| Scheduled / cron | Nightly data syncs, recurring reports, periodic cleanup jobs |
| REST API integration | Connect internal tools or third-party SaaS platforms together |
| Database workflows | Read, write, and sync records across systems automatically |
| Email automation | Trigger notifications or parse incoming messages into actions |
| AI / LLM agent workflows | Chain 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
| Factor | This AMI (self-hosted) | n8n Cloud | Zapier / Make |
|---|---|---|---|
| Pricing model | Flat compute cost ($0.10/hr + EC2) | Tiered plans with execution caps | Tiered plans, priced per task/operation |
| Execution limits | Limited only by instance capacity | Capped per plan, overage billed | Capped per plan, overage billed |
| Data control | Stays inside your own AWS account | Processed on vendor infrastructure | Processed on vendor infrastructure |
| Custom nodes / code steps | Fully supported, no platform restriction | May be limited by plan tier | Limited or unavailable on lower tiers |
| Integration breadth | 400+ integrations, self-hosted | Same n8n library, hosted | Large library, but workflow logic is simpler |
| Setup time | Minutes (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
| Area | Recommended action |
|---|---|
| Public exposure | Restrict port 5678 to known IPs or place behind a VPN/reverse proxy rather than leaving it open |
| TLS/SSL | Front the instance with a domain and certificate instead of serving the editor over plain HTTP |
| Credential storage | Use n8n's built-in credential encryption rather than hardcoding secrets inside workflows |
| User management | Create individual user accounts instead of sharing one admin login across the team |
| Database backups | Schedule regular PostgreSQL backups/snapshots of workflow and execution data |
| Webhook validation | Validate 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
| Pitfall | Why it happens | How to avoid it |
|---|---|---|
| Editor exposed publicly | Leaving port 5678 open to the internet by default | Restrict via security group or put behind a VPN/reverse proxy |
| No database backup | Assuming the instance itself is the only thing that matters | Schedule PostgreSQL backups independently of instance snapshots |
| Undersized instance under load | Starting at t3.medium and never revisiting sizing | Monitor CPU/memory as workflow volume grows and resize proactively |
| Secrets hardcoded in workflows | Pasting API keys directly into workflow nodes | Use 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.
We'll size, secure, and operate it for you.
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.