This repository contains custom nodes for n8n based on the n8n-nodes-starter template. It includes example nodes that you can modify or replace with your own custom nodes.
You need the following installed on your development machine:
- git
- Node.js (minimum version 18)
- npm or pnpm package manager
- A local n8n server installation
-
Clone this repository:
git clone https://github.com/your-username/custom-node-template.git
-
Install dependencies:
cd custom-node-template npm install
-
Browse the examples in
/nodes
and/credentials
. Modify the examples, or replace them with your own nodes. -
Update the
package.json
to match your details. -
Build the custom nodes:
npm run build
-
Link the custom nodes to your local n8n server using the provided script:
./scripts/link-to-local-server.sh /path/to/your/local-n8n-server
-
Start your n8n server and you should see the custom nodes available.
This repository includes the following utility scripts in the scripts
directory:
Links the custom nodes to a local n8n server installation.
Usage:
./scripts/link-to-local-server.sh [path-to-local-n8n-server]
Parameters:
-
path-to-local-n8n-server
: Optional. Path to the local n8n server directory. If not provided, the script will try to use a default path.
What it does:
- Builds the custom nodes package
- Updates the n8n server's
.env
file to include the full path to the custom nodes in theN8N_CUSTOM_EXTENSIONS
variable - Ensures community nodes are enabled
No symlinks are created - the approach relies solely on the environment variable configuration.
Removes the custom nodes from a local n8n server installation.
Usage:
./scripts/unlink-from-local-server.sh [path-to-local-n8n-server]
Parameters:
-
path-to-local-n8n-server
: Optional. Path to the local n8n server directory. If not provided, the script will try to use a default path.
What it does:
- Removes any symlinks that might have been created in previous versions
- Updates the n8n server's
.env
file to remove the custom nodes from theN8N_CUSTOM_EXTENSIONS
variable - Provides guidance on fully removing the nodes from the n8n server
- Modify or create nodes in the
nodes
directory. - Run
npm run build
to compile your changes. - Use the link-to-local-server script to update your local n8n server.
- Restart your n8n server to see the changes.
- When you're done with development or want to remove the nodes, use the unlink-from-local-server script.
If your custom nodes aren't appearing in n8n:
- Ensure the
N8N_CUSTOM_EXTENSIONS
path in the server's.env
file is correct - Verify that
N8N_COMMUNITY_NODES_ENABLED=true
is set in the server's.env
file - Make sure you've built the nodes with
npm run build
- Restart the n8n server after any changes