How private custom nodes reach a self-hosted n8n image
When an internal API or system needs an n8n node that no public package provides, the node has to be built, packaged and loaded into every n8n process that runs production workflows. A private custom node is a node package your team writes and keeps inside your organization, so it is never published to the public npm registry. It appears on the canvas next to built-in nodes and can carry its own credential type. A Code node module is different: it is a Node.js or Python library that a single Code node imports at runtime. Use a Code node module for a few lines of logic or a helper library. Use a custom node when workflow builders need a reusable, configured step with its own parameters and credentials.
Production teams usually bake custom nodes into a Docker image instead of copying files onto a running server. The reason is repeatability: the same image that passed testing is the one that starts in production, and a rebuild after an n8n upgrade is an explicit, reviewable change rather than a hand edit that nobody remembers. The n8n documentation describes loading custom nodes through the N8N_CUSTOM_EXTENSIONS setting, which points n8n at folders containing extension packages. Confirm for your target version exactly which directories n8n scans, how packages must be declared, and whether the node is discovered at startup, so your build places files where n8n actually looks.
Before you commit to this path, confirm three things with your n8n version and your own environment: how the image build installs the node's dependencies, whether your queue mode workers and webhook processors load the same extensions as the main instance, and how you will test that a rebuilt image still registers the node. Plan a single owner for the package and a rebuild step that runs on every n8n upgrade, because the node depends on n8n's internal interfaces and can break when n8n changes. Keep the node source in your private repository and the image in your private registry so that no part of the chain depends on the public npm registry.
Which way to load internal nodes fits your release process
This table compares four ways to get a private node into a self-hosted n8n instance: extension folders in a custom image, a mounted volume, a private npm package and a manual host install. Read each row against your release cadence and who will rebuild and retest the node after every n8n upgrade.
| Approach | When it fits | Who maintains it | What breaks on upgrade |
|---|---|---|---|
| Extension folder baked into a custom image | Production instances rebuilt and deployed through CI, with every node version pinned to a tagged build | Platform team owns the Dockerfile and build pipeline; node owner owns the code | Image must be rebuilt against each new n8n base image, and nodes must be retested before rollout |
| Mounted volume with N8N_CUSTOM_EXTENSIONS | Teams that need to update a node without rebuilding the image, with strict change control on the mounted path | Operations team manages the volume contents; node owner delivers builds into it | Node packages may not match a new n8n version; the mount persists across upgrades, so stale code can run silently |
| Package from a private npm registry | Organizations that already publish internal packages and want versioned, auditable releases | Registry administrator and node owner; platform team pins versions in the image | Dependency and peer version ranges can conflict with the new n8n release; confirm compatibility per version |
| Manual install on the host | Short-lived or single-server setups where no pipeline exists yet | Whoever has host access, often with no change record | Usually lost or silently overwritten during upgrades or host rebuilds; hard to reproduce on a new server |
| Ask your vendor or team first | Before choosing, confirm the n8n release you run and the node's build tooling | Engineering lead with security sign-off | Confirm each option against the n8n release notes for the version you plan to adopt |
What the license and public npm mean for internal nodes
n8n is source-available under the Sustainable Use License, not an OSI open source license, and that changes what you can do with an internal node. The license allows use or modification only for your own internal business purposes or for non-commercial or personal use. It allows distribution only free of charge for non-commercial purposes. A node written for your own staff and run on your own instance sits inside the permitted use. Publishing that same node to public npm, shipping it inside a product, or handing it to customers is distribution, and that needs a separate review before anyone does it. The license text in the n8n LICENSE.md is the starting point for that review, not a substitute for it.
Publishing to public npm is the step most teams should avoid by default. A private node has no reason to be discoverable, and an npm package is copied, cached and mirrored in ways you cannot take back. Keep the package in a private registry or as a folder in your image build, and confirm that your build pipeline never runs a publish step against a public registry by accident. Also check that the node's package metadata, README and example workflows do not contain internal hostnames, customer names or credentials. Those details often travel with a package even when the code itself is harmless.
Files with .ee in their name or directory are not covered by the Sustainable Use License and require a valid n8n Enterprise License. If your internal node sits beside, imports from, or copies code out of any .ee path, the license position of that node changes. Review every file your build copies into the image, and ask whether any of it came from an enterprise module. Your counsel should then review your specific distribution model, including whether employees of subsidiaries, contractors or customers receive the image, and whether a paid plan or Enterprise License changes the answer. Get that written conclusion before the node leaves your organization in any form.
Every n8n node reaches production as one image built in CI and pulled from a private registry
The flow starts in the node source repository, where CI builds a custom image from the n8n base image with the node extension added. The image is pushed to a private registry such as Harbor, which sits inside the trust boundary. The main instance and every worker and webhook processor then pull the same tagged image, so they run identical node code. Check that the image digest matches across all processes, and treat any upstream n8n upgrade as a trigger for a full rebuild and retest.
Custom node image flows from CI through a private registry to every n8n process.
Build and deploy a private node in a custom n8n image
This sequence takes an internal node from source code to a verified run on every n8n process that needs it. The output is a versioned image in your private registry that the main instance and all workers start from the same way.
Create the node package in a private repository
The engineer who owns the internal API creates a node package in a private Git repository, with the node, its credentials file and a package manifest that declares the node files. Keep the package unpublished and set its registry configuration so that npm publishing is disabled, which keeps the node out of the public npm registry. The step is done when the package builds locally and a test run of the linter passes. Confirm the expected folder layout and file naming for your n8n version in the n8n custom node documentation before you rely on it.
Pin the n8n version the node targets
Choose one n8n release and record it in the package's dependency on the n8n workflow types, and in the base image tag you will use in the build. Pinning both to the same version prevents a silent mismatch between the types the node was compiled against and the server that loads it. The step is done when the version appears in one file in the repository and in the Dockerfile. Confirm which n8n release notes apply to your target version, since breaking changes between versions can affect node code.
Build a custom image on the official base
The platform or DevOps engineer writes a Dockerfile that starts from the official n8n image at the pinned tag, copies the compiled node package into the directory that the N8N_CUSTOM_EXTENSIONS setting points to, and installs it there. Build the image in your CI system so the result is reproducible and tagged with the n8n version and the node version together. The step is done when the image starts locally and the node package is listed in the container's extensions directory. Confirm with the n8n docs for your version exactly which path and variable behavior applies, because this setting is version-specific.
Push the image to a private registry
The engineer pushes the tagged image to a private container registry that your organization operates or controls, such as a self-hosted Harbor instance, and restricts pull access to the service accounts that run n8n. Avoid mutable tags like latest for production so that every deployment references a known build. The step is done when the registry shows the image digest and a test host with registry credentials can pull it. Ask your registry team how image scanning and retention are configured, since both affect how long old node builds remain available for rollback.
Deploy the image to the main instance and workers
The platform team updates the deployment so the main instance and every worker process, and any webhook processors, run the same custom image tag. Queue mode requires that all processes share the same encryption key and database, and a node missing from one process will fail only when a workflow lands there. Roll out in a staging environment first, then production. The step is done when each process reports the same image digest and starts without errors in its logs. Confirm the process types and environment variables your queue mode setup needs in the n8n queue mode documentation.
Verify the node appears and runs
A tester opens the n8n editor, confirms the internal node appears in the node panel with the expected name and icon, and creates a test workflow that calls the internal API with the node's credentials. Run the workflow manually, then trigger it through a webhook or schedule so that a worker, not only the main instance, executes the node. The step is done when the test run completes and the execution log shows the node's output. Keep the test workflow in your records so the same check can be repeated after every rebuild.
Record the rebuild steps for each n8n upgrade
The platform owner writes a runbook that repeats the sequence for every n8n upgrade: repin the version, rebuild the image, rerun the test workflow on staging, then roll out to all processes. Because the node is compiled against a specific n8n release, an upgrade without a rebuild can leave the node unloaded or broken. The step is done when the runbook names an owner for the node and the verification workflow is stored with it. Ask your vendor or internal team how long the node will be maintained after each release, since that effort recurs with every n8n upgrade.
Image-baked nodes versus mounted extensions by environment
In development, a mounted extensions folder usually fits best. Engineers change node code on their workstation, restart the container and test against a live workflow without rebuilding an image for every edit. The folder is pointed to with N8N_CUSTOM_EXTENSIONS, and the speed of this loop matters more here than byte-for-byte reproducibility, because the node is still being written.
- Fast iteration: Edits reach the running container after a restart, so the build step is skipped while the node is unstable.
- Local credentials only: Test credentials and sample data stay on the developer's machine and never enter a shared image.
- Single process: A default development setup runs one n8n process, so there is no worker pool that could drift from the main instance.
- Known limits: A mounted folder is easy to change by hand, so two developers can end up with different code under the same name.
- Promotion point: Once a node stabilizes, move it into the build pipeline before it reaches a shared environment.
Before leaving development, confirm that the node loads from the folder path your production image will use, with the same n8n version you plan to run in production.
Staging should match production as closely as possible, so this is where the baked image is first tested end to end. The build pipeline produces a versioned image that contains the custom nodes, and staging runs that exact artifact. Mounting code into staging would test a setup that production will not use, and the results would not carry over.
- Same artifact: Staging pulls the image tagged for release candidates, not a locally built copy.
- Same topology: Run the main instance and worker processes the way production does, since queue mode workers must load the same nodes as the main instance.
- Same encryption key: Share the main instance's encryption key with every worker and webhook processor in staging, as the queue mode documentation requires, so credential tests reflect production behavior.
- Upgrade rehearsal: Build the image against the next n8n version here, then confirm the custom nodes still load before the production window.
- Separate data: Use non-production credentials and data, even when the image is identical.
Check that a node version deployed to staging can be traced to a commit and a build, so the same image can be promoted without a rebuild.
In production, a baked image is the usual choice. The image is built once, scanned, signed or recorded in your registry, and every container starts from the same contents. Production should not depend on files that someone copied into a host folder, because a host change is hard to audit and easy to miss during an incident.
- Immutable contents: The image digest, not a mutable tag, identifies what runs on the main instance and on each worker.
- Identical main and workers: Use one image reference for every n8n process, so the custom nodes, their versions and their dependencies match across the pool.
- Rebuild on upgrade: Each n8n upgrade needs a new image built on the new base, because nodes compiled against the old version may break.
- Registry control: Store the image in a registry you operate, such as a private Harbor project, so access, scanning and retention follow your own policy.
- Rollback path: Keep the previous image available so a failed release can be reverted to a known state.
Before go-live, confirm that the main instance and every worker report the same node versions, and that the encryption key and database settings match across all of them.
Security risks when internal nodes run inside n8n
A private node is code that runs inside your n8n process, with access to the credentials and networks the workflows use. The risks below sit in the image, the registry, the dependency tree, the outbound paths and the workers, so each one needs a check before the image reaches production.
Secrets baked into image layers
Credentials copied into the build context, a .env file or a build argument can persist in an image layer even when a later step deletes them. Anyone who can pull the image can read those layers. Before release, scan the built image for secrets and confirm that the Dockerfile only receives credentials at runtime through your secret store or environment. Harbor's Trivy integration covers vulnerability scanning of image contents, but you should confirm separately that it flags embedded secrets in your Harbor version.
Unpinned npm dependencies in the node
A custom node pulls in its own npm packages, and each one can change under you when the lockfile is missing or a range floats. A compromised or abandoned transitive package then runs inside every worker. Commit a lockfile, pin the versions your build uses, and review new or changed dependencies before each rebuild. Confirm that your build pipeline installs from the lockfile rather than resolving fresh versions.
Open private registry
If the registry that holds your node image or Helm chart accepts anonymous pulls or lets any project member push, an attacker can replace the image your n8n deployment pulls on the next restart. Set Harbor projects to private, grant pull rights only to the service accounts that deploy n8n, and restrict push rights to the pipeline. Confirm that role-based access control and single sign-on are configured for the registry, not only for the web console.
Harbor READMEBroad outbound access from node code
A node that calls internal APIs with a shared administrator token gives every workflow that uses the node that same reach. Create a dedicated, least-privilege service account for each internal system, store its token as an n8n credential, and restrict the network path so the n8n container can reach only the endpoints the node needs. Ask the owning team to confirm which scopes the token carries and who can rotate it.
Trust in code running on every worker
In queue mode, the node's code runs on every worker and webhook processor, and those processes must share the main instance's encryption key to read stored credentials. A node change therefore reaches every process at once, and a faulty or malicious change affects all of them. Stage the new image on a non-production instance, roll it out to workers in a controlled order, and confirm that every process runs the same image digest before you enable it for production traffic.
Rebuilding the custom image on every n8n upgrade
A custom node image has to be rebuilt whenever n8n changes, because the node is compiled against n8n's packages and may depend on internal interfaces that n8n does not promise to keep stable. n8n uses semantic versioning and ships minor releases roughly weekly, so a node that worked last month can break without any change on your side. Treat every n8n version bump as a new build, never as a runtime swap. As an example of the cadence, n8n 2.43 was released on 6 October 2026. Before each upgrade, read the release notes for that version and confirm any breaking changes that touch nodes, credentials or the node API your extension uses.
The routine starts in staging. Pin the target n8n version in the Dockerfile base image tag, rebuild the custom image, and deploy it to a staging instance that uses the same database, encryption key and environment variables as production. Then run the node's own tests, load the node in the editor, and run the workflows that depend on it, including credential tests and any webhook-triggered flows. Record the image digest that passed, not just the tag, so the build you tested is the build you promote.
Promote that exact digest to production instead of rebuilding there, so the artifact that passed staging is the one that runs. Keep the previous production image digest available in your registry and document how to redeploy it, since rolling back an n8n upgrade may also require restoring the database backup taken before the change. Ask your team to confirm the rollback steps in a rehearsal, and to check whether the registry retains older digests under your retention policy. Set a recurring review so that a missed release does not leave the node running against a version it was never tested with.
Limits to confirm before you commit to image-baked nodes
Baking private nodes into an n8n image ties them to a specific edition, version and deployment shape. The cards below list the points to confirm in your own environment before the image pipeline becomes part of production.
Loading method and edition support
Confirm that the loading method you chose for your private nodes is supported by your n8n edition and the version you run. Ask whether your plan includes the features your build depends on, and record the answer against the exact version you intend to pin. A node that loads on Community edition may still need a review against your license terms before it reaches production.
n8n queue mode docsNode presence on every worker
In queue mode, the node must be present on every worker and webhook processor, not only on the main instance. Test a workflow that uses the node on each process type, because a missing image on one worker shows up as failed executions only under load. Make the image tag identical across all processes.
Encryption key across processes
Queue mode requires the main instance's encryption key on all worker and webhook processor nodes so they can read stored credentials. Confirm how that key is injected into each container, who can read it, and how it rotates. A private node that needs a credential will fail on any process that holds the wrong key.
License terms for internal use
Confirm that the node's own license and your use of it fit internal business purposes. Your n8n license allows internal use, but distributing an image or a node to outside parties may fall outside it. If the node bundles or depends on any file with a .ee path, it needs a valid Enterprise License, so review the dependency tree before you build.
n8n license textRegistry and pipeline access
Confirm that your container registry and CI pipeline are reachable from the networks where n8n runs, including air-gapped or restricted segments. Decide where the base image is pulled from and how it is scanned before it becomes a build input. If the registry is outside your network, plan a mirrored copy and a process to refresh it.
Multi-main availability limits
If you need several main instances for high availability, check that your deployment qualifies. Multi-main setup is restricted to Enterprise self-hosted deployments and is not available in the Community edition or n8n Cloud. Without it, a rebuilt image that fails at the main instance still stops triggers and webhooks, so plan a maintenance window for each upgrade.
Queue mode docsQuestions teams ask before they hire help with private nodes
What does a private custom node project cost, and what drives the effort?
The cost follows from a written scope, and the main drivers are the number of nodes, the complexity of the target API, the authentication model, the number of environments the image must reach and how often you expect to upgrade n8n. Each node needs its operations mapped, credentials handled and tests written, so a single node against a simple API is far less work than several nodes against an API with pagination, token refresh and webhooks. Ask the provider to price one-time work (design, build, image pipeline, documentation, handover) separately from recurring work (rebuilds on each n8n release, dependency updates, retesting). DeployOpen does not publish a price list, so a quote comes from the written scope.
How long does it take to ship an internal n8n node?
Duration depends on the same drivers as cost: how many nodes you need, how well the target API is documented, how many people must review the result and how many environments must be tested. Test accounts and a working sandbox of the internal API shorten the work considerably, while missing documentation or unclear credential rules extend it. Ask for a schedule with phases for design, build, testing in a staging n8n instance, and production rollout, and confirm which of those phases depend on your teams replying. DeployOpen agrees timelines in writing before work starts.
What do we need to provide before the work starts?
Collect the following before a provider starts, because missing items are the most common cause of delay:
- API documentation or an OpenAPI description, plus a list of the endpoints and operations the workflows need
- Test accounts and a non-production environment for the internal system, with the access rules that apply to it
- A container registry where the custom image can be pushed and pulled, and the network path from your n8n hosts to it
- CI access to the repository and pipeline that will build the image
- Named sign-off owners for the design, the security review and the production release
Also confirm who approves credential handling, since internal nodes often store API keys that n8n encrypts with the instance encryption key.
Can our own engineers build and maintain private nodes without a partner?
Yes, a team with working knowledge of n8n, TypeScript or JavaScript, and container images can build and ship a private node without outside help. The skills you need are the n8n node structure and credential files, a build pipeline that packages the node into a Docker image, and enough Linux and container experience to rebuild the image each time n8n is upgraded. Many teams start with an internal pilot to learn the pattern, then decide whether the ongoing rebuild and review work fits their existing staff. A partner is most useful when the team lacks capacity or wants the pipeline and documentation delivered as a set.
Does a private custom node require an n8n Enterprise License?
Not by default. n8n's Sustainable Use License allows use and modification for your own internal business purposes, and a node you write and run for your own organization falls within that. The license terms that matter are the ones about distribution and about files with .ee in their name or directory, which are not covered by the Sustainable Use License and require a valid Enterprise License. Do not copy code from those directories into a node, and have your legal team confirm how the license applies if you plan to distribute the node to customers or outside parties.
Who maintains the node after it goes live?
Someone inside your organization must own the node after release, and the ownership should be written into the engagement. Maintenance covers rebuilding the image on every n8n upgrade, testing the node against each new n8n minor release, updating the node when the internal API changes, rotating credentials and reviewing dependency updates. Name a team, a code owner and a support path before go-live. Ongoing support and upgrade testing can also be contracted as a retainer if your team prefers to hand that work to a partner.
Which parts of the work carry the most risk?
The highest risks are credentials stored with the wrong encryption key, nodes that call internal endpoints with excessive permissions, and images that drift from the n8n version in production. Keep the custom image in your own registry, restrict who can publish to it, and test each rebuild in staging before production. Review every node's outbound calls with your security team, since a node is code that runs inside your n8n instance. Ask any provider how they will test the node against your security policy before release.
How DeployOpen scopes and delivers private n8n nodes
DeployOpen approaches private custom nodes in n8n as a scoped engagement: we agree which internal systems the nodes connect to, build the image in your build pipeline, and hand over a tested, documented setup. Each step is written down so your team can rebuild and upgrade the image without depending on us. Engagements are fixed-scope, with the deliverables agreed in writing before work starts.
How we scope
- List each internal API or system the private nodes must reach, with the authentication method each one uses
- Confirm which n8n version and edition your instance runs, and whether it is Community or a licensed plan
- Agree who owns the node code, the image build and the rebuild step after every n8n upgrade
How we build
- Build a custom Docker image that installs your nodes into the n8n image through a repeatable pipeline
- Load nodes from the folder set by N8N_CUSTOM_EXTENSIONS and verify each node appears in the editor
- Keep node packages in your private registry so no internal code is published to public npm
How we hand over
- Deliver the Dockerfile, build scripts and pipeline definition, stored in your own source control
- Provide a written upgrade runbook covering the image rebuild, node retest and rollback steps
- Document credential handling, the encryption key requirements and where each node's configuration lives
How we support
- Retest the nodes against each n8n minor release you adopt, using the release notes as a checklist
- Offer ongoing support, upgrades and continuous testing as a retainer after handover
- Review node permissions and outbound access as internal APIs change over time

