- Introduction
- Prerequisites
- Step-by-Step Guide
- Step 1: Install Node.js and npm
- Step 2: Install n8n
- Step 3: Start n8n
- Step 4: Access n8n in Your Browser
- Step 5: Create Your First Workflow
- Step 6: Save Your Workflow
- Step 7: Install Custom Nodes (Optional)
- Examples/Use Cases
- Example Workflow
- Common Pitfalls/Tips
- Conclusion

Introduction
n8n is a powerful open-source tool that enables automation through workflow integrations with various services using a user-friendly interface. The ability to run n8n locally allows users to work with their data without relying on cloud solutions, providing more control and privacy. This tutorial will guide you through the steps needed to successfully run n8n on your local machine.
Prerequisites
Before you start, ensure you have the following:
- Basic Knowledge: Familiarity with command-line interfaces and JavaScript npm (Node Package Manager).
- System Requirements:
- Node.js (version 14 or above)
- npm (comes installed with Node.js)
- Operating System: The steps will be similar across Windows, macOS, and Linux environments.
Step-by-Step Guide
Step 1: Install Node.js and npm
If you haven’t installed Node.js yet, follow these steps based on your operating system.
For Windows
- Go to the Node.js official website.
- Download the Windows installer for the LTS version.
- Run the installer and follow the prompts.
For macOS
- You can use Homebrew to install Node.js. Open your terminal and run:brew install node
For Linux
- Use a package manager to install Node.js. For example, on Ubuntu:sudo apt update sudo apt install nodejs npm
Step 2: Install n8n
Once Node.js and npm are installed, you can install n8n globally. Open your terminal and run:
npm install n8n -g
Step 3: Start n8n
After installation, you can start n8n by simply running:
n8n
This command will start n8n on your local server.
Step 4: Access n8n in Your Browser
Open your web browser and navigate to:
You should see the n8n interface where you can start creating workflows.
Step 5: Create Your First Workflow
- Click on ‘New’ in the n8n interface to start a new workflow.
- Choose a trigger node (like Manual Trigger) to begin.
- Add subsequent nodes by dragging them into the canvas and connecting them.
Step 6: Save Your Workflow
- Once you’ve built your workflow, click on the Save button at the top right of the interface.
- You can also export your workflows later for sharing or backup.
Step 7: Install Custom Nodes (Optional)
If you want to work with custom nodes, you can publish them locally by following these steps:
- Navigate to your node directory. For example, if you are in a directory for a custom node:cd path/to/your/node
- Build and link your node:npm run build npm link
- Link the node to your n8n instance:cd ~/.n8n/custom npm link <node-package-name>Restart n8n to see your custom nodes in the panel.
Examples/Use Cases
- Automate Tasks: Set up a simple automation to send notifications via email whenever a new row is added to a Google Sheets document.
- Data Retrieval: Create a workflow that fetches data from an API and processes it for analysis.
- Integration: Connect multiple services such as Slack and Google Drive to collaborate on projects effectively.
Example Workflow
- Trigger: Use a Webhook node.
- Operations: Add a Set node to format incoming data.
- Action: Use an HTTP Request node to send processed data to another service like Slack.
Common Pitfalls/Tips
- Check Node.js Version: Ensure your Node.js version is 14 or above as n8n relies on newer features.
- Permissions: If you experience permission issues, on Unix-like systems, try using sudo npm install -g n8n.
- Linking Nodes: When linking custom nodes, ensure the package name used reflects the correct directory.
- Server Port Conflicts: If you have another service running on port 5678, either stop that service or configure n8n to run on a different port (e.g., n8n start –port 5679).
Conclusion
Running n8n locally allows you to take full advantage of its automation capabilities without the constraints of cloud services. By following the steps outlined in this guide, you will have n8n installed, running, and ready for your automation needs.
For further reading and resources, explore the n8n Documentation for more advanced features or consider joining the n8n Community to connect with other users.
Happy automating!
Also read : Make.com Review: The Ultimate Workflow Automation Tool in 2025