Prerequisites
Before you begin, ensure you have the following installed on your system:Node.js
Node.js version 24 or newer is required for development.pnpm Package Manager
n8n uses pnpm version 10.22 or newer as its package manager. We recommend installing it with corepack for automatic version management.pnpm workspaces automatically manage file-links between modules that depend on each other in the monorepo.
Corepack
Enable Node.js corepack to manage pnpm automatically:Build Tools
Some n8n dependencies require native compilation. Install the appropriate build tools for your operating system:actionlint (Optional)
If you plan to modify GitHub Actions workflow files, install actionlint:actionlint is only required when modifying
.github/workflows/*.yml files. It runs automatically via git hooks when workflow files change.Development Container (Optional)
If you use VS Code with Docker, you can use n8n’s Dev Container for a pre-configured environment: The Dev Container includes all required tools and dependencies.Initial Setup
For External Contributors
Fork the repository
Go to n8n-io/n8n and click the “Fork” button in the top-right corner.
Install dependencies
For n8n Team Members
Starting n8n
After the initial setup, start n8n in production mode:http://localhost:5678
Development Mode
For active development with hot-reload, use development mode:Full Stack Development
Selective Development
Run only the packages you’re actively working on for better performance:Backend-only development
Backend-only development
Frontend-only development
Frontend-only development
AI/LangChain nodes development
AI/LangChain nodes development
Most Common Development Workflow
Many n8n developers use this two-terminal setup:If you modify code outside
packages/cli or packages/frontend/editor-ui, run pnpm build to rebuild those packages.Custom Node Development
For developing custom nodes with hot-reload:Testing with Different Configurations
n8n uses Testcontainers to quickly spin up local instances with different configurations:Each instance gets its own port. Multi-main stacks use a load balancer by default. See
packages/testing/containers/README.md for more details.Testing with Clean Database
To test features with a fresh n8n instance without losing your existing setup, use a different user folder:Troubleshooting
Build fails with dependency errors
Build fails with dependency errors
-
Clear node_modules and reinstall:
-
Ensure you’re using the correct Node.js and pnpm versions:
Port 5678 is already in use
Port 5678 is already in use
Change the port with an environment variable:
Hot reload not working
Hot reload not working
Ensure you’re using
N8N_DEV_RELOAD=true and that the relevant packages are running in watch mode:Docker alternatives (Podman, Colima)
Docker alternatives (Podman, Colima)
Testcontainers requires additional configuration for Docker alternatives:
- Podman: Follow this guide
- Colima: Set environment variables as described here
Next Steps
- Learn about n8n’s architecture
- Understand the testing practices
- Review contribution guidelines before submitting PRs