---
title: "Deploy n8n S3"
description: "S3 object events to workflows"
category: "Automation"
url: https://railway.com/deploy/n8n-s3
---

# Deploy n8n S3

S3 object events to workflows

**[Deploy n8n S3 on Railway](https://railway.com/template/n8n-s3)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/n8n-s3/manifest.json

- **Creator:** onepush
- **Category:** Automation

## Template content

### Redis https://cdn.sanity.io/images/sy1jschh/production/0ce0bfdcfbdbf69662b1116671f97c2dd788b655-157x157.svg

- **Image:** redis:8.2
- **Start command:** `/bin/sh -c "rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH"`

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

### n8n-worker

- **Image:** n8nio/n8n:2.36.8
- **Start command:** `n8n worker`
- **Health check:** /healthz

### n8n

- **Image:** n8nio/n8n:2.36.8
- **Health check:** /healthz
- **Public domain:** Yes

## Documentation

# Deploy and Host self hosted n8n S3 (Open-Source S3 Automation) on Railway

S3 uploads arrive in bursts. A marketing team drops 400 images at once. A data pipeline lands hourly CSVs. This stack runs n8n in queue mode with Redis Bull and Postgres, so multiple workers chew through S3 event backlogs without dropping files or timing out.

## About Hosting n8n S3 open-source software on Railway (self hosted n8n template)

S3 automation is event-driven: a file lands, something reacts. n8n has no dedicated S3 trigger, so you point bucket event notifications at an SNS topic and catch them with the AWS SNS Trigger node, route them through EventBridge to a Webhook node, or poll a prefix on a schedule. Queue-mode workers give you a dedicated pool that scales horizontally when S3 events spike. Railway hosts Postgres, Redis, an editor, and a worker, so the editor stays responsive while workers grind through hundreds of files.

## Why Deploy n8n S3, the AWS Lambda alternative on Railway (Railway Free Trial)

AWS Lambda handles simple S3 triggers, but chaining steps - transform, notify, write to a database - forces Step Functions, SQS, and YAML. n8n gives you a visual editor, built-in retries, an AWS SNS Trigger node, and plain webhooks for EventBridge. Queue mode on Railway adds horizontal scaling for bursts. Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying n8n S3 on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

### Railway vs Other Hosting Providers and VPS for n8n S3 self hosting

On a raw VPS you babysit Postgres, Redis, and two n8n processes yourself; Railway puts them in one project with private networking.

| Provider | Setup Complexity | Scaling S3 Bursts | Monthly Cost |
|----------|-----------------|-------------------|--------------|
| DigitalOcean | Manual (Docker Compose or multiple droplets) | Vertical only unless you build autoscaling | $12-$30 |
| AWS | High (ECS, RDS, ElastiCache, ALB) | Good with ECS autoscaling | $30-$60 |
| Hetzner | Manual (dedicated server or cloud) | Vertical, cheap but you're on your own | $8-$20 |

Railway sits in the sweet spot: managed like AWS, cost closer to Hetzner.

## Common Use Cases for hosted n8n S3

**Media processing pipelines.** Videos or images land in an ingest bucket. n8n picks them up, runs ffmpeg or an image API, writes results to a processed bucket, and posts a Slack link.

**Data lake hygiene.** CSV or Parquet files arrive. A workflow validates schema, moves rejects to quarantine, and appends accepted rows to a Google Sheet.

**Compliance and audit.** ObjectCreated events trigger a workflow that logs metadata, checks for PII, and files a Jira ticket when something looks off.

**Cross-system sync.** S3 becomes the middleman between services that don't talk. A partner drops a nightly export, n8n transforms it, pushes to your CRM or warehouse.

## Dependencies for n8n S3 Docker hosted on Railway

Railway checklist: four services (editor, worker, PostgreSQL, Redis), the official `n8nio/n8n:2.36.8` image on both n8n services, queue-mode variables pre-wired, and a volume at `/home/node/.n8n`. You bring AWS credentials and a bucket.

### Deployment Dependencies for Managed n8n S3 Service (S3 Workflow Automation)

Queue mode needs Postgres for workflow and execution metadata and Redis for the Bull queue. The worker runs the same image with `n8n worker`. The volume at `/home/node/.n8n` keeps local config; lose the encryption key and saved credentials are gone.

### Implementation Details for n8n S3 (Using n8n official docker image)

Environment variables make queue mode work:

- `EXECUTIONS_MODE=queue` - dispatches executions to workers.
- `DB_TYPE=postgresdb` - required; queue mode refuses SQLite.
- `WEBHOOK_URL` - your Railway URL so S3 webhooks know where to deliver.
- `N8N_PROXY_HOPS=1` - n8n sits behind one proxy.
- `N8N_ENCRYPTION_KEY` - encrypts saved credentials. Never lose it.
- `EXECUTIONS_DATA_PRUNE=true` - keeps execution history from ballooning.

There is no S3 trigger node. The cleanest real-time path is an S3 event notification to SNS, subscribed to the AWS SNS Trigger node; n8n confirms the subscription itself. EventBridge also works through an API destination that POSTs to a Webhook node. For polling, run a Schedule Trigger into the AWS S3 node on a prefix and dedupe on object key.

## How does n8n S3 compare against other S3 automation platforms

### n8n S3 vs AWS Lambda (AWS Lambda Alternative)

Lambda wins on raw speed and cost for single-step reactions (a 50ms copy costs fractions of a cent). But chaining steps forces Step Functions and YAML. n8n does it visually with retries; for workflows with more than two steps, n8n is faster to build and debug.

### n8n S3 vs Zapier (Zapier Alternative)

Zapier polls S3 (1-15 minute delay on paid plans), while an SNS or webhook trigger in n8n fires in seconds. Zapier charges per task; 5,000 files/month adds up. Self-hosted n8n has no per-execution cost.

### n8n S3 vs Make (Make Alternative)

Make is cloud-only and bills by operations, so 400 files through five modules is 2,000 ops, and its S3 watcher polls. n8n queue mode scales workers without extra fees, and the fair-code source is there when a node misbehaves.

### n8n S3 vs Pipedream (Pipedream Alternative)

Pipedream has native S3 triggers but credit-based pricing; large files burn credits. Self-hosted n8n has no meter. Fixed Railway cost wins at high volume.

## How to use n8n S3 (the OSS S3 Workflow Automation)?

Add an `s3:ObjectCreated:*` event notification on the bucket, filtered to a prefix like `incoming/`, that publishes to an SNS topic. In n8n, drop an AWS SNS Trigger on the canvas, pick the topic, and activate; n8n creates the HTTPS subscription. Upload one test file and the execution shows up within seconds. The message carries the bucket and a URL-encoded key, so decode it before the AWS S3 node downloads the object. Then transform (resize, parse, validate), write the result to another prefix, and notify Slack or Google Sheets. Gotcha: never write output into the prefix that fires the trigger, or you build an infinite loop. And `WEBHOOK_URL` must be your public Railway domain, or SNS confirms against a URL nobody can reach.

## How to self host n8n S3 on other VPS Services (n8n S3 self hosting guide)

Manual path using Docker Compose on any VPS. You manage Postgres, Redis, and processes yourself.

### Clone the Repository

Pull `n8nio/n8n:2.36.8` from Docker Hub. Clone the repo only if modifying source: `git clone https://github.com/n8n-io/n8n`.

### Install Dependencies

Install Docker and Compose. Write a compose file with editor, worker, Postgres, and Redis, both n8n services on the pinned image, the worker running `n8n worker`.

### Configure Environment Variables

Copy env vars from Implementation Details. Critical: `EXECUTIONS_MODE=queue`, `DB_TYPE=postgresdb`, `N8N_ENCRYPTION_KEY`, `WEBHOOK_URL`.

### Start the n8n S3 Application

`docker compose up -d`. Editor listens on port 5678. Upload a test file to S3, confirm SNS delivers the event, watch execution appear. If nothing happens, check worker logs - that's where S3 processing errors show.

## Official Pricing of n8n S3 (n8n S3 pricing)

n8n Community Edition is free under fair-code license. n8n Cloud starts at about $24/month for 2,500 executions; 10,000 S3 files monthly hits higher tiers fast. Self-hosted on Railway typically runs $10-$25/month total for editor, workers, Postgres, Redis - no per-execution fees.

## n8n S3 cloud vs self hosted comparison (Pricing, features, costs, and more)

### Monthly cost of self hosting n8n S3 on Railway

Minimal queue-mode deployment: editor $5, worker $5, Postgres $5-10, Redis $3-5. Total about $18-25/month for unlimited executions. n8n Cloud is $24/month for 2,500 executions. Railway's trial includes a one-time $5 credit. For simpler start without queue mode, use the [cheapest n8n without queue mode](https://railway.com/deploy/n8n).

### System Requirements for Hosting n8n S3 on a VPS

Light workloads (under 1,000 events/day): 2 vCPU, 4GB RAM total for editor and worker. Bursty workloads: give worker at least 2GB RAM alone; file processing is memory-hungry. Scale workers horizontally (two 2GB > one 4GB).

## Frequently Asked Questions (FAQs)

### Why can't I run S3 queue mode on SQLite?

SQLite locks on write; queue mode needs concurrent editor/worker access. Postgres handles it.

### How do I handle S3 events that arrive faster than workers can process them?

Jobs buffer in Redis and each worker runs up to 10 in parallel by default. Add worker replicas to raise throughput. If a downstream API rate-limits you, keep concurrency low and let the queue absorb the burst.

### What happens if I lose my N8N_ENCRYPTION_KEY?

All credentials (AWS keys, Slack tokens, OAuth) become unreadable, no recovery. Store in Railway secrets, not a config file. Treat like prod DB password.

### Can I use the free Railway trial to test this stack?

Yes. The Railway trial includes a one-time $5 credit, enough to deploy all four services and push test files through before you pick a plan.

### How does polling compare to EventBridge for S3 triggers?

Polling needs only list and read permissions, but files wait up to one interval and you must track handled keys. SNS or EventBridge delivers in seconds with the exact key. Events for anything urgent; polling for nightly batches.

### Is the Community Edition missing anything important for S3 automation?

Main gap: SSO (SAML/OIDC needs paid license). For S3 automation, Community has everything: triggers, queue mode, webhooks, all integrations.

## Similar templates

- [N8N Main + Worker](https://railway.com/deploy/n8n-main-worker) — Deploy and Host N8N with Inactive worker.
- [Evolution API with n8n](https://railway.com/deploy/evolution-api-with-n8n) — Automate WhatsApp workflows with Evolution API, n8n, and Postgres.
- [Postgres Backup](https://railway.com/deploy/postgres-s3-backups) — Cron-based PostgreSQL backup to bucket storage

Open this page in a browser: https://railway.com/deploy/n8n-s3
