Self-Hosting n8n: Costs, Docker Setup, and Production Checks
Plan a self-hosted n8n deployment with current installation sources, a total-cost worksheet, and checks for backups, access, webhooks, and ongoing support.
Self-hosting n8n gives your team control over the workflow engine's infrastructure. It also makes your team responsible for recovering it. Choose the hosting model by who can operate the system, which features you need, and what a failed workflow would interrupt.
A server quote alone won't answer that decision. The same monthly execution count can describe small record updates or document-processing jobs that occupy workers for minutes. Their capacity and support needs differ.
Start with ownership. Before you price a server, write down who restores it when a disk fails, who can recover the encryption key if the host disappears, and which business owner decides whether a delayed invoice run can wait until morning.
This is a planning and acceptance checklist. The linked n8n installation instructions are maintained by the vendor; this article does not certify a particular Docker deployment. Our separately tested workflow samples include their runtime version, fixtures, and testing limits.
Self-hosted n8n vs n8n Cloud
| Decision | Self-hosted n8n | n8n Cloud |
|---|---|---|
| Infrastructure | Your team chooses and operates the host | n8n operates the hosted service |
| Plan | Check Community, Business, or Enterprise against required features | Select a hosted plan against usage and feature requirements |
| Workflow ownership | Your team still owns business rules, credentials, and failure handling | Your team still owns business rules, credentials, and failure handling |
| Recovery planning | Include the database, keys, files, configuration, and restore procedure | Check the provider's retention and recovery terms alongside your own workflow exports |
| Budget | Infrastructure, licenses where needed, API use, and operating time | Subscription, API use, and workflow maintenance |
Community is the free self-hosted edition. Self-hosting does not make every feature free: shared access, SSO, external secrets, and other requirements can change the plan you need. Check the edition comparison and current pricing before choosing infrastructure. Record the currency, billing term, execution allowance, and required features in your estimate.
What self-hosting actually costs
Build two estimates using the same workload and reporting period. These are budget inputs, not price quotes or measured client results.
| Cost line | What to enter | Evidence to keep |
|---|---|---|
| Compute and database | Host, database, and any worker charges | Dated provider quote and chosen region |
| Storage and recovery | Persistent storage, backup copies, retention, and transfer charges | Expected data size and backup policy |
| n8n license | The plan needed for your access and operating requirements | Feature list and billing terms |
| Connected services | Model tokens, email, enrichment, and other API charges | Expected calls or tokens per business event |
| Routine operations | Planned hours × your internal hourly cost | Named owner and agreed maintenance tasks |
| Setup and migration | One-time engineering, testing, and handover | Written scope and acceptance criteria |
Monthly operating cost equals the recurring rows above. Keep setup and migration separate so a low recurring bill doesn't conceal the initial work. Compare a first-year total as twelve months of operating cost plus setup; adjust for a shorter contract or seasonal workload when needed.
Don't put a universal savings number beside that calculation. If you lack usage logs, run a representative pilot and label the remaining inputs as estimates. Include both successful executions and the extra work caused by retries, rejected records, and manual review.
Step 1: Choose the deployment and size a pilot
Start with n8n's hosting options and Docker Compose installation guide. Read which services the example includes. The current Compose guide includes an Assistant sandbox stack and specifies at least 4 GB RAM and 2 vCPUs for that example; those figures are not a capacity guarantee for your workflows.
The guide also links the official Postgres hosting example. Choose the database, persistent storage, and code-execution components for the version and features you intend to use. Record image versions before staging tests. Review upgrades deliberately instead of letting a floating image tag define your production release.
Test your largest expected payload and busiest expected arrival period. Record memory use, execution duration, queued work, storage growth, and recovery after a restart. Monthly volume alone cannot establish whether several simultaneous document jobs fit in memory.
Use a busy-hour scenario. For example, if an accounting team uploads a month's invoices while scheduled CRM syncs are running, test that overlap with representative files and measure whether the shorter sync jobs still finish within the time their owners expect.
Step 2: Establish access and the public endpoint
Use an owned hostname and HTTPS. Confirm the editor, production webhook URLs, and OAuth callbacks use the intended public address. Restrict database and internal service access to the components that need it.
Finish owner-account setup before handing over the instance. Configure individual access and two-factor authentication, and test the actual password-reset email. The old N8N_BASIC_AUTH_* settings no longer protect current n8n versions. The vendor's user-management guide explains SMTP configuration and the supported setup flow.
Maintain a small access register: service owner, backup operator, permitted workflow editors, and where credentials are managed. When a person leaves, somebody must be able to remove access without losing control of the instance.
Step 3: Prove a restore works
A successful backup job isn't proof of recovery. Restore into an isolated environment and check the result without activating production schedules or sending customer messages.
| Check | Evidence required before handover |
|---|---|
| Database recovery | A dated restore result with the expected workflow records |
| Credential recovery | A controlled test showing the restored instance can use a test credential |
| Files and configuration | Required binary files, encryption material, configuration, and versions accounted for |
| Isolation | Restored schedules and outbound actions cannot duplicate live work |
| Recovery objective | Measured restore time compared with the agreed maximum outage and acceptable data loss |
Keep recovery material somewhere it can survive losing the original host. Protect access to it. Record who can retrieve it and when the restore exercise should be repeated.
Keep the result. A useful restore record identifies the backup you used, the recovered version, the test data you checked, the time recovery took, and any missing files or credentials that prevented the replacement instance from doing its job.
Step 4: Test the business failure paths
An editor loading successfully doesn't prove an invoice workflow will behave correctly. Before activation, test a duplicate event, an expired credential, an unavailable downstream API, and an input the workflow should reject.
For each test, record the expected disposition: retry, stop, queue for review, or reconcile against the destination. Verify that the responsible person can find the execution and identify what needs attention. An alert should provide enough context to act without copying unnecessary customer data into chat.
Our n8n error-handling patterns cover failure routing and replay concerns. The invoice-review implementation note provides synthetic fixtures and a tested decision gate. Neither replaces testing your own credentials and external systems.
Step 5: Assign ongoing ownership
Agree who reviews security notices, stages upgrades, checks failed jobs, and tests recovery. Define support hours and escalation expectations in writing. Hosting an application doesn't automatically provide round-the-clock workflow support.
Be specific about weekends. If the workflow accepts orders on Saturday but the support agreement starts again on Monday, the business owner needs to decide whether queued orders can wait, whether a manual fallback is available, or whether the support scope needs to change.
Keep a release record with the version, backup reference, test results, and rollback decision. If an upgrade changes the database, restoring an older application image alone may not restore the previous system. Rehearse the recovery process against the specific change.
For sensitive workloads, map every destination: external APIs, AI providers, email, logs, backups, and support access. Self-hosting the workflow engine does not keep those outbound transfers inside your infrastructure. Have the responsible reviewers confirm the complete design against your organization's requirements.
When self-hosting isn't worth it
Choose a managed option when nobody can own patches and recovery, when the required features erase the expected savings, or when your team needs to concentrate on the process rather than the host. A small pilot can establish that before you migrate important workflows.
If you need help deciding, bring the workflow inventory, usage logs, required features, and recovery expectations to an n8n consulting discussion. The service scope covers the work we can agree on, and the production handover guide helps define what the team must be able to operate afterward.
Have a similar operating problem?
Tell us about the process and the decision you need to make.