Hey everyone ![]()
I’ve found a working fix for the broken custom node icon path issue when running n8n self-hosted (Docker / with N8N_CUSTOM_EXTENSIONS).
Problem
When using a file: icon path, n8n appends the container’s absolute path to /icons/CUSTOM/..., causing a 404.
Fix
-
Count the relative levels from your
.node.tsto the/dist/assets/directory. -
Then, use the appropriate
../../depth in theicon:field. -
Example that worked for me:
icon: { light: ‘file:../../../../../../../../n8n-nodes-my-node/dist/assets/icon.svg’, dark: ‘file:../../../../../../../../n8n-nodes-my-node/dist/assets/icon.dark.svg’, }