Fix for Broken Custom Node Icons (Docker + N8N_CUSTOM_EXTENSIONS)

Hey everyone :waving_hand:
I’ve found a working fix for the broken custom node icon path issue when running n8n self-hosted (Docker / with N8N_CUSTOM_EXTENSIONS).

:puzzle_piece: Problem
When using a file: icon path, n8n appends the container’s absolute path to /icons/CUSTOM/..., causing a 404.

:gear: Fix

  • Count the relative levels from your .node.ts to the /dist/assets/ directory.

  • Then, use the appropriate ../../ depth in the icon: 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’, }

1 Like