Deploy n8n on Fly.io: Setup, Costs, and Tradeoffs

Self-host n8n on Fly.io with PostgreSQL, persistent storage, and automatic SSL. A production walkthrough with realistic costs and honest tradeoffs.

Deploy n8n on Fly.io: Setup, Costs, and Tradeoffs

Updated May 2026. This guide has been refreshed to reflect the latest Fly.io pricing and n8n 1.75+ deployment practices.

n8n is a powerful open-source workflow automation platform. If you’re an Australian business managing hundreds or thousands of workflow executions per month, self-hosting is cheaper and more flexible than paying n8n Cloud’s SaaS fees. We have deployed n8n on Fly.io for finance, recruitment, and property clients across Australia, and it’s a solid choice for production workloads when you want your data to stay local.

We are Osher Digital, a Brisbane-based automation and AI consultancy. This guide comes from real deployments we’ve run since 2024, covering everything from initial setup to scaling, monitoring, and backup strategies. It assumes you’re comfortable with the terminal but new to Fly.io.

By the end, you’ll have a production-ready n8n instance running in Sydney with automatic SSL, a PostgreSQL database, persistent storage, health checks, and a monthly cost around $15–25 AUD for small to medium workloads. If you want a head start, our n8n consulting team can set this up for you.


Why Fly.io for n8n in Australia

There are several platforms you could host n8n on—Docker on a VPS, Railway, Render, or even your own Kubernetes cluster. Fly.io stands out for Australian deployments for three reasons.

First, the Sydney region. Fly.io operates data centres in Sydney (syd). Your n8n workflows, credentials, and execution logs stay in Australia, which simplifies compliance under the Privacy Act 1988, the Australian Privacy Principles, and industry regulations like APRA CPS 234. If your workflows touch customer data, healthcare records, or financial information, local hosting matters.

Second, the pricing model. Fly.io charges by usage rather than a fixed monthly fee. Their free tier can cover very light n8n instances entirely. For a typical small business deployment (10,000 executions per month, shared-cpu-1x VM, 1 GB persistent volume, PostgreSQL), expect $15–25 AUD per month. That’s cheaper than n8n Cloud’s standard plan.

Third, the control and simplicity. Fly.io sits between managed services (like Heroku) and raw infrastructure (like AWS). You get persistent volumes, managed PostgreSQL, native Docker deployment, zero-downtime deploys, and a clean CLI. For a platform automation team or a small business, that’s the sweet spot.


When Fly.io Is Not the Right Fit

Not every n8n deployment belongs on Fly.io. Here’s when you should look elsewhere.

If your workflows are egress-heavy: Fly.io charges for outbound bandwidth beyond 100 GB/month ($0.03 AUD per GB). If your n8n workflows download large files, stream video, or regularly push gigabytes of data to cloud storage, bandwidth costs will dominate. For these workloads, a cloud provider where data transfer is built into your instance cost (AWS, GCP) is cheaper.

If you need guaranteed always-on availability with zero cold starts: Fly.io’s `auto_stop_machines` feature powers down idle instances to save money. The first request after a stop incurs a 5–10 second cold start. If your workflows are triggered by webhooks and you can’t tolerate any cold start latency, set `auto_stop_machines = “off”`. But this adds cost, and you might as well choose a platform designed for always-on workloads.

If you’re worried about Sydney latency for upstream APIs: Most of your n8n API calls will come from Sydney, which is fine for Australian targets. But if your workflows heavily call APIs in the US or Europe, you might notice latency. The typical Sydney-to-US round trip is 150–200 ms. That’s rarely a bottleneck, but it’s worth considering.

If you need true multi-region redundancy: Fly.io Volumes are single-region, not replicated. A regional outage (unlikely, but possible) will take your n8n instance offline. For mission-critical workflows, you’d need to run multiple regions with external failover, which Fly.io supports but adds complexity. Many organisations accept this risk; some don’t.


Prerequisites

You’ll need:

  • A Fly.io account (free to sign up at fly.io). Credit card required, even for the free tier.
  • The Fly CLI (flyctl) installed on your machine.
  • Basic terminal familiarity. No Docker experience needed—Fly.io handles the Docker build.
  • A domain name (optional but recommended for production).

Install the Fly CLI with:

# macOS
brew install flyctl

# Linux
curl -L https://fly.io/install.sh | sh

# Windows
powershell -Command "iwr https://fly.io/install.ps1 -useb | iex"

Then authenticate:

fly auth login

Step 1: Create the Fly.io App

Start by creating a Fly.io application pinned to Sydney:

fly apps create n8n-your-company --region syd

Replace `n8n-your-company` with a globally unique name. Fly.io will verify that it’s available and create the app.


Step 2: Configure fly.toml

Create a `fly.toml` file in a new directory. This is the manifest for your Fly.io deployment. Here’s a production-ready template with annotations:

# fly.toml – n8n on Fly.io (Sydney region)
app = "n8n-your-company"
primary_region = "syd"

[build]
  # Use the official n8n Docker image
  image = "n8nio/n8n:latest"

[env]
  # n8n will be accessible at this hostname
  N8N_HOST = "n8n-your-company.fly.dev"
  N8N_PORT = "5678"
  N8N_PROTOCOL = "https"

  # Webhook URL for external trigger systems (e.g., n8n webhooks, Zapier)
  WEBHOOK_URL = "https://n8n-your-company.fly.dev/"

  # Australian timezone (Brisbane is UTC+10 standard, AEST in winter)
  GENERIC_TIMEZONE = "Australia/Brisbane"
  N8N_DEFAULT_LOCALE = "en"

  # Database type (set to postgresdb; credentials come via secrets)
  DB_TYPE = "postgresdb"

  # Auto-prune old execution data to avoid bloating the DB
  EXECUTIONS_DATA_PRUNE = "true"
  EXECUTIONS_DATA_MAX_AGE = "168"  # Keep 7 days of execution logs

# HTTP service config
[http_service]
  internal_port = 5678  # n8n listens on 5678 inside the container
  force_https = true    # Always redirect HTTP to HTTPS
  auto_stop_machines = "stop"   # Power down idle instances to save money
  auto_start_machines = true    # Wake on incoming request
  min_machines_running = 1      # Always keep one instance warm

  [http_service.concurrency]
    type = "requests"
    hard_limit = 250   # Max concurrent requests
    soft_limit = 200   # Trigger scale-up at 200 concurrent

# VM sizing – shared-cpu-1x with 512 MB is typical for small to medium
[[vm]]
  size = "shared-cpu-1x"
  memory = "512mb"

# Mount the persistent volume for n8n's .n8n directory
[mounts]
  source = "n8n_data"
  destination = "/home/node/.n8n"

# Health check – Fly.io uses this to detect unhealthy instances
[checks]
  [checks.health]
    type = "http"
    port = 5678
    path = "/healthz"
    interval = "30s"
    timeout = "5s"
    grace_period = "15s"

Key decisions here: the `auto_stop_machines = “stop”` setting saves money by powering down when idle, but means your first request after idle will have a brief cold start. The health check endpoint `/healthz` is built into n8n and lets Fly.io automatically restart unhealthy instances.


Step 3: Set Up Persistent Storage

n8n stores encryption keys, credentials, and local files in `~/.n8n`. You need a persistent volume so this data survives restarts and redeployments:

fly volumes create n8n_data --region syd --size 1

This creates a 1 GB volume in Sydney. For most n8n deployments, 1 GB is enough. You can resize later without downtime if you outgrow it.

Important caveat: Fly Volumes are not replicated or backed up automatically. If the physical server hosting your volume fails, you lose the data. For production, implement backups (we’ll cover this later).


Step 4: Provision PostgreSQL

n8n can run on SQLite, but PostgreSQL is much better for production. It handles concurrent executions and scales better.

fly postgres create \
  --name n8n-db \
  --region syd \
  --initial-cluster-size 1 \
  --vm-size shared-cpu-1x \
  --volume-size 1

Once provisioned, attach it to your n8n app:

fly postgres attach n8n-db --app n8n-your-company

This will add a `DATABASE_URL` secret to your app. However, n8n expects individual connection parameters, so you’ll set those manually in the next step.


Step 5: Configure Secrets and Environment Variables

Set your database credentials and n8n encryption key as Fly secrets. Fly encrypts these at rest and injects them at runtime:

fly secrets set \
  DB_POSTGRESDB_HOST="n8n-db.flycast" \
  DB_POSTGRESDB_PORT="5432" \
  DB_POSTGRESDB_DATABASE="n8n" \
  DB_POSTGRESDB_USER="n8n" \
  DB_POSTGRESDB_PASSWORD="your-secure-password" \
  N8N_ENCRYPTION_KEY="your-random-encryption-key" \
  N8N_BASIC_AUTH_USER="admin" \
  N8N_BASIC_AUTH_PASSWORD="your-admin-password" \
  --app n8n-your-company

Generate a strong 32-byte encryption key with:

openssl rand -hex 32

Critical: Store your `N8N_ENCRYPTION_KEY` somewhere safe outside of Fly.io—a password manager, a secure vault, anywhere offline. If you lose this key, all your stored credentials become permanently unrecoverable. We learned this from a client who lost three months of credentials when an instance was accidentally deleted.


Step 6: Deploy n8n

Deploy with:

fly deploy --app n8n-your-company

Fly.io pulls the n8n Docker image, builds the app, provisions a machine in Sydney, attaches your volume and database, and starts the service. This usually takes 60–90 seconds.

Monitor the logs:

fly logs --app n8n-your-company

Once you see n8n’s startup message, your instance is live at `https://n8n-your-company.fly.dev`. Log in with the admin credentials you set above.


Step 7: Custom Domain and SSL

For production, use your own domain. Fly.io provisions TLS certificates automatically:

fly certs create n8n.yourdomain.com.au --app n8n-your-company

Add a CNAME record in your DNS provider pointing to the Fly.io hostname:

n8n.yourdomain.com.au  CNAME  n8n-your-company.fly.dev

Fly.io will automatically request and renew TLS certificates. Update your app secrets:

fly secrets set \
  N8N_HOST="n8n.yourdomain.com.au" \
  WEBHOOK_URL="https://n8n.yourdomain.com.au/" \
  --app n8n-your-company

Monitoring, Health Checks, and Scaling

Your `fly.toml` health check automatically restarts unhealthy instances. Check the status of your deployment:

fly status --app n8n-your-company

For small workloads (under 10,000 executions per day), a shared-cpu-1x with 512 MB is sufficient. As your workload grows, scale up vertically:

fly scale vm shared-cpu-2x --memory 1024 --app n8n-your-company

For very high-throughput deployments, n8n supports queue mode with separate main and worker instances. That requires Redis and more configuration, but allows horizontal scaling. We’ve deployed queue mode on Fly.io for clients processing 50,000+ executions daily.


Cost Breakdown in AUD

Fly.io’s pricing is usage-based. Here’s what a typical n8n deployment costs in Australian dollars (as of May 2026):

Small deployment (shared-cpu-1x, 512 MB, low volume):

  • Compute: ~$6–10 AUD/month
  • Volume storage (1 GB): ~$0.25 AUD/month
  • PostgreSQL (shared, 1 GB): ~$5–8 AUD/month
  • Bandwidth (first 100 GB free, then $0.03 AUD per GB): $0
  • Total: $12–18 AUD/month

Medium deployment (shared-cpu-2x, 1 GB, higher volume):

  • Compute: ~$15–20 AUD/month
  • Volume storage (2 GB): ~$0.50 AUD/month
  • PostgreSQL: ~$8 AUD/month
  • Bandwidth (100 GB included): $0
  • Total: $23–28 AUD/month

Compare this to n8n Cloud’s paid plan ($100+ AUD per month) and you can see why many Australian businesses self-host on Fly.io. You also get full control over your data, access to the open-source n8n codebase, and the ability to integrate custom nodes.


Data Sovereignty and Privacy

If your n8n workflows handle customer data, employee records, or sensitive business information, you need to consider Australian privacy laws.

Fly.io’s Sydney region means your n8n execution data, stored credentials, and workflow state never leave Australia. This simplifies compliance with the Privacy Act 1988 and the Australian Privacy Principles (APPs), particularly APP 1.1 (open and transparent management of personal information) and APP 1.2 (collection of solicited personal information).

For healthcare (My Health Records), finance (APRA CPS 234), and government workflows, check the specific requirements for your industry. Having a deployment in Australia is a strong first step, but you may also need to implement encryption at rest, audit logging, and documented data handling procedures. Our AI and automation consulting team can help you design a compliant architecture.


Backup Strategy

Fly Volumes are not automatically backed up. For production, implement at least one of these:

1. Snapshot-based backups:

fly volumes snapshots create <volume-id> --app n8n-your-company

2. PostgreSQL dump to S3:

fly ssh console --app n8n-db -C "pg_dump -U postgres n8n" > backup-$(date +%Y%m%d).sql

Then upload to an S3-compatible bucket. AWS S3 has a Sydney region (ap-southeast-2) or use Cloudflare R2 for similar pricing.

3. Automated backup n8n workflow:

Use n8n itself to run a daily scheduled workflow that dumps the PostgreSQL database and uploads it to S3. It’s recursive, but it works well.

At minimum, back up your encryption key (stored offline, in a password manager) and your PostgreSQL database (daily). The volume data is less critical since most of it (credentials, workflows) can be recovered from the database or re-entered.


Comparing Fly.io with Other Hosting Options

If you’re deciding between Fly.io and self-managed Docker, here’s the trade-off:

Fly.io: Managed platform, Sydney region, $15–30 AUD/month for small deployments, zero infrastructure overhead, automatic scaling, integrated PostgreSQL and persistent volumes. You give up some customisation and accept Fly.io’s dependency.

Self-hosted Docker (e.g., on a VPS): Full control, but you manage the server, TLS certificates, backups, and security updates yourself. A small VPS in Sydney costs $5–15 AUD/month, but you’ll add time and operational overhead. We recommend this only if you already have DevOps experience or infrastructure in place.

Railway or Render: Similar to Fly.io, but neither offers a Sydney region yet. Your traffic routes through US regions, adding 150–200 ms of latency and raising data residency concerns for Australian Privacy Principles compliance.

For most Australian businesses, Fly.io is the practical choice. It’s cheaper than n8n Cloud, gives you Sydney residency, and requires no infrastructure experience.


Common Gotchas and Troubleshooting

Out of memory errors: If n8n crashes with OOM, scale up your VM memory. We’ve seen it happen when running complex workflows with large data payloads. Move from 512 MB to 1 GB and the issue usually goes away.

Database connection refused: Verify your PostgreSQL instance is running and the flycast DNS name resolves. The hostname `n8n-db.flycast` is a Fly.io internal DNS entry that only works within the same Fly organisation.

Webhooks not triggering after idle: If `auto_stop_machines = “stop”` and your machine is idle, the first webhook request will trigger a cold start. Fly.io handles the wake-up automatically, but there may be a 5–10 second delay. For always-on webhooks, set `auto_stop_machines = “off”` and accept the higher cost.

502 errors on first deploy: n8n takes 10–15 seconds to start up and run migrations. The `grace_period = “15s”` in the health check gives it breathing room. If errors persist, check the logs with `fly logs –app n8n-your-company`.


Need Help Getting Started?

If you’d rather focus on your workflows and let us handle the infrastructure, our n8n consulting team at Osher Digital can set this up, maintain it, and help you build production automation workflows. We work with Fly.io, Docker, and other platforms depending on your requirements. Book a call with our team to discuss your project, or get in touch if you have questions.


Frequently Asked Questions

Can I run n8n for free on Fly.io?

Yes, technically. Fly.io’s free tier includes 3 free shared-cpu-1x machines (256 MB each) and covers outbound bandwidth up to 100 GB. But for a production n8n instance, you’ll hit the limits quickly. The free tier is better suited for testing or very light personal workflows. For anything you depend on, budget $15–25 AUD per month.

How do I update n8n on Fly.io?

Just redeploy: `fly deploy –app n8n-your-company`. Since `fly.toml` references `n8nio/n8n:latest`, this pulls the newest image. For stability, pin to a specific version in `fly.toml` (e.g., `image = “n8nio/n8n:1.75.0″`) and test updates in a staging environment first.

What happens if Fly.io’s Sydney region goes down?

Your n8n instance will be offline until it comes back up. Fly.io’s Sydney infrastructure is reliable, but it’s not geographically redundant. For critical workflows, implement offsite backups and a documented recovery procedure. Some clients run a warm standby in another region, but that’s complex and most don’t need it.

Can I use SQLite instead of PostgreSQL?

Yes. Remove the PostgreSQL-related environment variables from your secrets and SQLite will use the Fly Volume. However, SQLite doesn’t handle concurrent writes well. If multiple workflows run simultaneously, you’ll hit locking issues. PostgreSQL is the production standard and costs only $5–8 AUD/month, so it’s worth using.

Does Fly.io support n8n queue mode?

Yes. You can deploy separate Fly apps for the n8n main process and worker processes, connected to a shared PostgreSQL database and Redis instance. Fly.io offers Upstash Redis integration. This is more complex to set up but allows horizontal scaling for high-volume workloads. Our team has done queue mode deployments on Fly.io; contact us if you need guidance.

How do I migrate from another host to Fly.io?

Export your workflows from your existing n8n instance (Settings > Export), deploy on Fly.io following this guide, then import the workflows. For credentials, you’ll need to re-enter them since they’re encrypted with your old instance’s encryption key. If you have access to the original encryption key and can export it, you can set the same key on the Fly.io instance to preserve credential encryption during migration.

What bandwidth costs should I budget?

Fly.io gives you 100 GB of free outbound bandwidth per month. Most n8n workflows stay under this unless they’re downloading large files or streaming video. Beyond 100 GB, expect $0.03 AUD per GB. For a workflow that downloads 5 GB of files daily (150 GB/month), you’d pay roughly $1.50 AUD in bandwidth. Track your usage in the Fly.io dashboard to avoid surprises.


We are a Brisbane-based team with hands-on experience deploying n8n for Australian finance, recruitment, property, and healthcare clients. If you want help setting up n8n on Fly.io, optimising your workflows, or designing an automation strategy, get in touch with our team.

Ready to streamline your operations?

Get in touch for a free consultation to see how we can streamline your operations and increase your productivity.