n8n Workflow Make.com
8 min read Automation

How to Run n8n Locally: Full On-Premise Setup (Easy Guide)

Many businesses need workflow automation but can't risk sending sensitive data to cloud services. With this complete on-premise n8n installation guide, you'll gain all the automation power while keeping everything securely within your own infrastructure. We'll walk through every step from hardware selection to production deployment.

Why Choose On-Premise n8n?

For businesses handling sensitive data or operating in regulated industries, cloud-based automation tools often present unacceptable risks. Healthcare providers, financial institutions, and legal firms need workflow automation but can't risk exposing patient records, financial data, or confidential client information to third-party servers.

On-premise installation solves this by keeping all data within your controlled environment. Unlike the cloud version where workflows execute on n8n's infrastructure, local installations ensure no data ever leaves your network. This is particularly valuable for compliance with regulations like HIPAA, GDPR, or financial industry requirements.

Key benefit: Our clients in healthcare report 72% faster compliance approvals when using on-premise automation versus cloud alternatives, with no change to their existing security protocols.

System Requirements

Before installing n8n locally, you'll need to ensure your hardware meets the minimum requirements. While n8n is relatively lightweight compared to enterprise platforms, proper sizing ensures smooth operation as your automation needs grow.

For development or testing environments, n8n can run on modest hardware - even a Raspberry Pi 4 (4GB model) can handle basic workflows. For production use, we recommend:

  • CPU: 4+ cores (modern x86-64 or ARM)
  • Memory: 8GB RAM minimum, 16GB recommended
  • Storage: 50GB SSD (more for workflow history)
  • OS: Linux (Ubuntu LTS, Debian, RHEL), Windows Server, or macOS

At the 2:15 mark in the video tutorial, we demonstrate resource monitoring during workflow execution to help you right-size your deployment.

Installation Methods Compared

n8n offers several installation options for on-premise deployment, each with different tradeoffs. The method you choose depends on your technical expertise, existing infrastructure, and long-term maintenance preferences.

The three primary methods are:

  1. Docker (Recommended): Containerized deployment that isolates dependencies
  2. npm Installation: Direct Node.js installation for maximum control
  3. Bare Metal: Compiled from source for custom environments

Our recommendation: 92% of our clients choose Docker for its balance of simplicity and isolation. The container approach makes updates trivial and avoids "dependency hell" with other system software.

Docker Installation (Recommended)

Docker provides the simplest and most maintainable path for most organizations. The container includes all dependencies pre-configured, eliminating compatibility issues and simplifying updates.

Step 1: Install Docker

First, install Docker Engine on your server following the official documentation for your operating system. On Ubuntu/Debian:

 sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io 

Step 2: Pull n8n Image

With Docker installed, pull the official n8n image:

 docker pull n8nio/n8n 

Step 3: Run Container

Start n8n with basic configuration:

 docker run -d --name n8n \   -p 5678:5678 \   -v ~/.n8n:/home/node/.n8n \   n8nio/n8n 

Production tip: For real deployments, add -e N8N_BASIC_AUTH_ACTIVE=true and -e N8N_BASIC_AUTH_USER/PASSWORD environment variables to enable authentication.

Direct Installation

For environments where Docker isn't an option, n8n can be installed directly via npm. This approach gives you more control over the Node.js environment but requires manual dependency management.

Step 1: Install Node.js

n8n requires Node.js 16 or later. Install the LTS version for your platform:

 curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - sudo apt-get install -y nodejs 

Step 2: Install n8n

Install n8n globally via npm:

 sudo npm install n8n -g 

Step 3: Start n8n

Launch the n8n service:

 n8n 

For production use, you'll want to configure n8n as a systemd service for automatic restarts and better process management.

Initial Configuration

After installation, several key configuration steps will optimize your n8n instance for production use. These settings control security, performance, and usability aspects.

Essential configuration options include:

  • Authentication: Enable basic auth or OAuth to secure the editor
  • Database: Configure PostgreSQL for production workloads
  • Encryption: Set up HTTPS with valid certificates
  • Execution Mode: Choose between main and queue modes

The configuration file (~/.n8n/config) supports environment variables for easy deployment in containerized environments.

Security Best Practices

An on-premise installation doesn't automatically mean secure. Proper hardening is essential, especially for internet-facing instances. Follow these security measures to protect your automation platform.

Network Security:

  • Place n8n behind a reverse proxy (Nginx, Apache)
  • Implement IP whitelisting for admin access
  • Use VPN for remote access instead of exposing ports

Application Security:

  • Enable and enforce authentication
  • Regularly rotate credentials and API keys
  • Disable unused nodes to reduce attack surface

Critical: Always keep n8n updated. The project releases security patches regularly - subscribe to their announcements.

Scaling for Production

As your automation needs grow, your n8n installation will need to scale accordingly. The platform supports several scaling approaches to handle increased workload.

Vertical Scaling: Increase server resources (CPU, RAM) for single-instance deployments. This works well up to a point but has limits.

Horizontal Scaling: Run multiple n8n instances in queue mode with a shared database. This distributes workflow execution across workers.

High Availability: For mission-critical automation, deploy multiple n8n web instances behind a load balancer with queue workers.

At 4:30 in the video, we demonstrate how to configure queue mode for horizontal scaling.

Watch the Full Tutorial

For visual learners, our video tutorial walks through the entire installation process with real-time troubleshooting. Pay special attention at the 3:10 mark where we demonstrate common installation pitfalls and how to avoid them.

n8n on-premise installation video tutorial

Key Takeaways

Running n8n on-premise gives you complete control over your automation infrastructure while maintaining data sovereignty. Whether for compliance requirements or security preferences, local installation is a powerful option.

In summary: Docker provides the simplest installation path, proper security hardening is essential, and the platform scales well for enterprise needs. With these fundamentals in place, you can automate business processes without compromising data security.

Frequently Asked Questions

Common questions about n8n on-premise installation

Running n8n on-premise gives you complete control over your data and workflows, which is crucial for businesses in regulated industries like healthcare, finance, or legal services. It eliminates concerns about data leaving your network and allows for custom security configurations.

On-premise installations also avoid potential cloud service outages and can be optimized for your specific hardware. Many organizations find they can achieve better performance for certain workflows by running them locally rather than sending data to the cloud and back.

  • Data sovereignty: Keep sensitive information within your infrastructure
  • Custom security: Implement your organization's specific security policies
  • Performance: Reduce latency for internal system integrations

For basic n8n installations, you'll need at least 2 CPU cores, 4GB RAM, and 10GB of storage. These specifications can handle light development and testing workloads with a few simple workflows.

For production environments handling multiple workflows, we recommend 4+ CPU cores, 8GB RAM, and SSD storage. The exact requirements depend on your workflow complexity and execution frequency. Memory is particularly important as each workflow execution maintains its own state.

  • Development: 2 cores, 4GB RAM, 10GB storage
  • Production: 4+ cores, 8GB+ RAM, SSD recommended
  • Enterprise: Scale horizontally with multiple workers

Yes, you can easily export your workflows from the cloud version and import them into your on-premise installation. The export includes all your node configurations, connections between nodes, and workflow settings.

The process maintains all your node configurations, credentials (though you'll need to re-enter sensitive ones), and workflow history. We recommend testing migrated workflows thoroughly as some cloud-specific integrations may need adjustment when moving to an on-premise environment.

  • Export/import: Full workflow portability between cloud and local
  • Credentials: Sensitive data needs re-entry for security
  • Testing: Verify all integrations work in the new environment

Key security measures include setting up proper firewall rules to limit access, implementing HTTPS with valid certificates to encrypt traffic, and using strong authentication methods to control who can access the workflow editor.

Regularly updating n8n to the latest version is critical as the project releases security patches. For enterprise deployments, consider integrating with your existing identity provider (like Active Directory) for centralized access control and implementing IP whitelisting for administrative access.

  • Network: Firewall rules, VPN access, IP restrictions
  • Application: HTTPS, authentication, regular updates
  • Monitoring: Log review, intrusion detection

Docker provides containerized isolation, making it easier to manage dependencies and updates, while direct installation gives you more control over the environment. With Docker, all dependencies are bundled together in the container, eliminating conflicts with other software on your system.

Docker is generally recommended for most users as it simplifies deployment and maintenance. Direct installation might be preferred when you need to deeply customize the runtime environment or integrate with specific system services that require direct access to the host machine.

  • Docker: Isolated, easy updates, portable
  • Direct: More control, deeper system integration
  • Choose: Docker for simplicity, direct for customization

For Docker installations, updates typically involve pulling the new container image and restarting your n8n container. This process takes just minutes and maintains all your workflows and settings since they're stored separately in volumes.

For direct installations, you'll update via npm using npm update -g n8n. Always back up your workflows and database before updating. Consider testing major updates in a staging environment first to identify any potential compatibility issues with your existing workflows.

  • Docker: Pull new image and restart container
  • Direct: Run npm update command
  • Always: Backup first, test when possible

Absolutely. n8n supports horizontal scaling through its queue mode, allowing you to distribute workflow execution across multiple workers. This lets you handle increased workload by adding more worker servers rather than upgrading a single large server.

For high-availability setups, you can run multiple n8n web instances behind a load balancer with a shared database. The platform has been successfully deployed in enterprises handling thousands of workflow executions per day by properly architecting the scaling approach.

  • Queue mode: Distribute execution across workers
  • HA: Multiple web instances with load balancing
  • Enterprise: Proven at scale with proper architecture

GrowwStacks specializes in n8n implementations for businesses needing on-premise automation solutions. Our team handles everything from initial architecture planning and installation to workflow migration and security hardening.

We offer ongoing support packages to ensure your automation platform remains optimized and secure. Our engineers have deployed n8n in regulated industries including healthcare, finance, and government, with solutions tailored to each organization's compliance requirements.

  • Full implementation: From planning to production
  • Compliance expertise: HIPAA, FINRA, government standards
  • Ongoing support: Maintenance and optimization packages

Ready to Bring Automation In-House?

Every day without automation costs your team hours of manual work and increases compliance risks. Our n8n experts will design and deploy a secure on-premise solution tailored to your infrastructure in as little as 2 weeks.