Icons wont display on custom node running in k8s

Describe the problem/error/question:

When running n8n in kubernetes, my svg for my custom node is not loading. I am getting:

https://n8n.custom.io/icons/CUSTOM//home/node/.n8n/node_modules/custom-n8n-nodes/dist/nodes/custom.svg

Request Method
GET
Status Code
404 Not Found
I have checked that the files exist it just feels like the way that n8n is try to resolve tha path is wrong:

other then this the custom nodes are loading and working

Sample Trigger Description:

description: INodeTypeDescription = {
    displayName: "Custom Trigger",
    name: "CustomTrigger",
    icon: "file:custom.svg",
    group: ["trigger"],
    version: 1,
    description: "Triggers workflows based on custom trigger",
    subtitle: "Overlapping Detections",
    defaults: {
      name: "Custom Trigger",
    },
    inputs: [],
    outputs: [NodeConnectionTypes.Main],
    credentials: [
      {
        name: "graphqlSubscriptionApi",
        required: true,
      },
    ],

gulpfile:

const path = require('path');
const { task, src, dest } = require('gulp');

task('build:icons', copyIcons);

function copyIcons() {
    const nodeSource = path.resolve('nodes', '**', '*.{png,svg}');
    const nodeDestination = path.resolve('dist', 'nodes');

    src(nodeSource).pipe(dest(nodeDestination));

    const credSource = path.resolve('credentials', '**', '*.{png,svg}');
    const credDestination = path.resolve('dist', 'credentials');

    return src(credSource).pipe(dest(credDestination));
}

docker file to build node:

# https://github.com/n8n-io/n8n/blob/master/docker/images

ARG NODE_VERSION=22

FROM node:${NODE_VERSION}-alpine AS build

WORKDIR /build

# Install Node.js dependencies
COPY package*.json ./
RUN npm ci

COPY build.js gulpfile.js tsconfig.json ./
COPY credentials/ ./credentials/
COPY nodes/ ./nodes/
COPY python_blocks/ ./python_blocks/

ARG APP_VERSION
ENV APP_VERSION=${APP_VERSION}
RUN echo Setting npm version: ${APP_VERSION} && \
    npm version --force --no-git-tag-version ${APP_VERSION}

RUN npm run build

RUN npm pack

FROM node:${NODE_VERSION}-alpine AS runtime

WORKDIR /app

# Copy assets from build stage
COPY --from=build /build/*.tgz ./


I am using:

 - name: N8N_CUSTOM_EXTENSIONS
value: /home/node/.n8n/node_modules/custom-n8n-nodes

What is the error message (if any)?

Just the 404 error

information on your n8n setup

instance information

Debug info

core

  • n8nVersion: 1.110.1
  • platform: docker (self-hosted)
  • nodeJsVersion: 22.19.0
  • database: postgres
  • executionMode: scaling (single-main)
  • concurrency: -1
  • license: community
  • consumerId: unknown

storage

  • success: all
  • error: all
  • progress: false
  • manual: true
  • binaryMode: memory

pruning

  • enabled: true
  • maxAge: 336 hours
  • maxCount: 10000 executions

client

  • userAgent: mozilla/5.0 (macintosh; intel mac os x 10_15_7) applewebkit/537.36 (khtml, like gecko) chrome/139.0.0.0 safari/537.36
  • isTouchDevice: false

Generated at: 2025-09-15T19:09:20.920Z

Hey @jumbrage hope all is good. Welcome to the community.

See if this is the same issue:

2 Likes

It could be a similar issue, but hard to say with the limited information I have. From what I can tell, the only recommendation in the referenced GitHub issues is to modify the n8n core code and roll my own build—which I could do but feels like I must be doing something wrong. Another person suggested using Tampermonkey, but that wouldn’t really help my users. I was hoping that a more detailed post might attract some answers specific to how I’m deploying.

Does this happen only when you are testing or if you push the node to npmjs and then install from the repo, the same issue happens?

It works locally if i just copy the files to the custom directory or set the N8N_CUSTOM_EXTENSIONS to my dist folder….it just on the instance running in k8s

I will try pushing to npmjs and installing that way

Let me know how it goes, I think installing it from the repo could be the solution, even though I think that’s still a bug.

Yes, installing via the npm package as a community node does actually work.

Yay, I suspected as much!