Trusting internal certificate authorities in n8n

Make self-hosted n8n trust your corporate certificate authority for internal APIs without disabling TLS verification, using PEM files, the custom certificates mount and Kubernetes secrets.

On this page

How n8n trusts an internal certificate authority

n8n can call internal APIs signed by a corporate certificate authority (CA) without turning certificate verification off. The fix is to give the n8n container the CA certificate that signed your internal services, so the Node.js process that runs n8n accepts the chain. When a workflow's HTTP Request node, credential test or community node fails with an unknown or self-signed certificate error, the failure is almost always a missing trust anchor, not a broken API. Teams under deadline pressure often set a flag that skips verification, or disable TLS checks for the whole instance. That removes the protection that stops a workflow from sending a bearer token or customer record to a server impersonating your internal API, and it hides the same problem from every future workflow.

Before you change anything, confirm three things with your security and PKI teams: which CA issued the certificate on each internal endpoint, whether the chain includes an intermediate that the server does not send, and whether you need to trust one root for all services or separate roots per environment. Ask who owns renewal of the root and intermediates, because a CA rotation will break n8n just as it breaks every other client. Keep the CA files in version control or your secrets system so that a rebuilt container gets the same trust set. Also check that the certificate file is PEM encoded, since the container mechanism described in the setup instructions expects that format.

Plan this change as a configuration decision that a reviewer can audit. Record which CAs are trusted, who approved them, and which endpoints depend on them, and test each internal API from inside the n8n container, not only from your workstation, because the container may not see the same trust store. If a workflow still fails after the CA is added, the next suspects are an incomplete certificate chain on the server, a hostname that does not match the certificate, or a proxy that re-signs traffic. Each of those needs a fix on the service or network side. Disabling verification is never the correct final state for a production instance.

Where the CA files go in each deployment model

In a container deployment, the platform team mounts CA files from the Docker host into the n8n container, and the Compose file or run command defines that mount. Keep the PEM files in a version-controlled or secrets-managed location so a CA rotation does not require an image rebuild.

  • Host directory: Store the PEM files in a host directory owned by the team that manages certificates, then mount it into the container at the path your n8n version reads, which is commonly /opt/custom-certificates.
  • Read-only mount: Mount the directory read-only so the container cannot modify trust material.
  • File format: Each file must be PEM encoded. Include the intermediate certificates that your internal services present so the chain validates.
  • Restart window: Confirm whether the container must restart to load new CA files, and schedule that restart into every rotation.
  • Generic image: Avoid baking CA certificates into a custom image unless the same team controls the image pipeline and the CA lifecycle.

Confirm the exact mount path, accepted file extensions and load timing in the n8n Docker documentation for your installed version before you write the Compose file.

Which trust approach fits which situation

This table compares four ways to let n8n call internal services signed by a corporate CA, from adding the root to the trust store to disabling verification. Read each row for when the option fits and what the security owner should sign off before it goes live.

ApproachWhen it fitsTrade-offSecurity owner must approve
Internal root CA in the trust storeInternal APIs and services all chain to one corporate root that the team controlsOne trust anchor covers every internal endpoint, so the root's key protection and scope matter mostThe root's scope, key custody and which hosts the n8n container may reach
Private intermediate chainYour PKI issues day-to-day certificates from an intermediate, and the root stays offlineThe server must send the full chain, and an incomplete chain is a common cause of failuresThe intermediate's issuing policy, its expiry date and who can request certificates for n8n targets
Mutual TLS to specific APIsA particular API requires n8n to present a client certificate, such as a payment or records systemAdds a client identity to manage, rotate and revoke, and it applies only to the calls that need itThe client certificate's subject, lifetime, storage location and revocation process
Disabling certificate verificationOnly as a temporary diagnostic step or a documented exception with a compensating controlRemoves protection against impersonation of the target, so traffic can be intercepted without detectionA written exception with an owner, a scope limited to named hosts, an expiry date and a plan to remove it
Certificate pinning to one endpointA single fixed service with a known certificate and a controlled renewal processRenewals can break the workflow unless the pin is updated in the same changeThe pinned value, the renewal owner and the change process that updates it
Public CA certificate for internal hostsNot a fit for private hostnames, which public CAs generally do not issue for internal namesFails the internal naming and control model and adds cost without adding trust for internal callersConfirm with the certificate policy owner before using any public issuance for internal services

Setting up the custom CA mount step by step

This sequence takes an internal certificate authority from exported PEM files to a verified HTTP Request call from n8n, with a check at each stage. Each step closes with an output you can confirm before you move on.

  1. Export the root and intermediate certificates as PEM

    The team that runs the internal CA exports each certificate in the chain that signed the internal API, starting with the intermediate and then the root, as PEM text. Each block begins with a line reading BEGIN CERTIFICATE and ends with END CERTIFICATE. Leave out private keys and, unless your CA team advises otherwise, the server certificate itself. Done means each file opens as plain text, contains complete PEM blocks, and has a name your team recognizes. Keep copies in your PKI records so you can reissue the bundle later.

  2. Confirm the chain validates from an n8n host

    Run openssl from the host or container that runs n8n, so DNS, routing and proxy settings match what n8n will use. For example (illustrative hostname): openssl s_client -connect api.internal.example:443 -CAfile root-and-intermediate.pem. Look for Verify return code 0 (ok) in the output. If verification fails, fix the chain with the CA team first, because n8n will fail the same way. Done means the verify result is 0 for every internal host you plan to call.

  3. Place the PEM files in the custom certificates directory

    Copy the files into the directory n8n reads, which is /opt/custom-certificates inside the container. In Docker Compose this is usually a bind mount from a host folder that holds only your CA files. In Kubernetes it is a volume built from a secret or config map. Do not place private keys in this folder. Done means docker exec or kubectl exec lists the files at that path with names and sizes that match your originals. Rollback: remove the files or the mount definition and move on to step five.

  4. Set ownership and read permissions for the n8n user

    First confirm which user the n8n process runs as inside your image, because the user can differ between images and versions. Make the directory and files readable by that user, with write access limited to the owner. Certificate files are public material, so a read-only mode is appropriate. A common failure is a root-owned directory with restrictive permissions that blocks the n8n process from reading the files. Done means a read test run as that user, such as cat on one certificate, succeeds and ls -l shows the expected owner and mode.

  5. Restart n8n and check the startup logs

    Restart the n8n container, or roll the Kubernetes deployment, so the process reads the directory at boot. Confirm in the documentation for your version that the directory is read at startup, because an in-place file change may not take effect until restart. Watch the logs for errors that mention certificates or the custom certificates path. Done means the instance starts, serves its editor page, and the logs show no certificate-related errors. Rollback: if the instance does not come up, restore the previous mount configuration, restart, and check the logs again.

  6. Test an HTTP Request node against the internal API

    In a test workflow, connect a Manual Trigger to an HTTP Request node that calls a read-only endpoint on the internal API over HTTPS. Keep SSL certificate verification enabled in the node settings. Run the node once. Done means the node returns the expected status code and response body, and the execution shows no TLS error. Rollback: if the call fails, check the chain from step two and the permissions from step four before changing any other setting.

  7. Record the change and document the rollback

    Record which CA files were added, where they came from, the expiry dates shown on each certificate, the mount definition, and the owner responsible for renewal. Write the rollback steps in the same record: remove the files or mount, restart n8n, and confirm the test workflow fails again, which shows the CA files were the cause. Done means the change record names an owner and a renewal trigger. Never disable certificate checks in the HTTP Request node to work around a failure.

How a workflow request reaches an internal API over a corporate CA

The flow starts when a workflow runs an HTTP Request node inside the n8n container. At startup, n8n loads the CA PEM files mounted at /opt/custom-certificates, so the trust store already contains the corporate root before any call is made. The request crosses the trust boundary into the internal network, where the API presents a certificate issued by the same CA. Check that the chain validates against the mounted PEM and that the certificate name matches the host being called.

Corporate CA certificates reach n8n at startup and gate every internal HTTPS call.

Security risks of trusting the wrong certificates

Adding an internal certificate authority to n8n changes who n8n will believe about every host it calls. The risks below connect the trust decision itself to the files, keys and records that surround it, and each one is a place where a weak choice can quietly widen what n8n accepts.

Disabling verification hides the problem

Turning off certificate checks makes an error message disappear, but it also removes the only signal that a request reached a server other than the one intended. A workflow that sends credentials or customer records to a spoofed API will then look healthy. Before any change, confirm the failing error is a missing chain, an expired leaf certificate or a wrong hostname, because each has a narrower fix than turning verification off. Review any setting that relaxes TLS checks as a finding, not a workaround.

A root CA can vouch for any host

A trusted root or intermediate certificate authority can sign a certificate for any hostname within its scope, not only the internal APIs you had in mind. Adding one CA to n8n therefore extends trust to every service that CA could name, including hosts you have never inventoried. Ask whether the CA is dedicated to internal services, whether name constraints limit what it may sign, and whether the bundle contains only the CAs your workflows actually need.

Protect the CA signing key

The security of the trust decision rests on the CA's private key, and that key usually lives on the CA side, not in n8n. If an attacker signs certificates with it, n8n will accept them without any change to its own configuration. Ask where the CA keys are stored and who can use them. The step-ca project can protect CA keys in an HSM, cloud KMS or a YubiKey, which is a question to answer before the CA is trusted anywhere.

Restrict permissions on mounted PEM files

The PEM files n8n reads from a mounted directory should be owned by the account that runs n8n and readable only as needed. A certificate file that any local user can replace is a path for injecting a rogue trust anchor into the container. Check ownership and mode after every deployment, and confirm the same rules apply to Kubernetes secret mounts, where default modes and group ownership can differ from what you set in a Docker volume.

Track rotation and expiry

Internal CA certificates expire, and an expired intermediate or root will break every workflow that calls the affected APIs at once. The more dangerous failure is the rotation that never happens, which leaves an old or compromised CA in the bundle long after its replacement is live. Keep an inventory of each trusted certificate with its issuer, subject and expiry date, and set alerts well before those dates so replacement is planned, not urgent.

Audit changes to the trust bundle

The trust bundle is a security control, so every addition or removal should be traceable to a request, an owner and a reason. Changes made by copying files into a running container or editing a Kubernetes secret by hand leave no record of who trusted what and when. Store the PEM files in version control or a managed secret store with change history, require review for new CAs, and keep the audit trail with your other n8n change records.

Mounting CA certificates from Kubernetes secrets

The usual way to give an n8n pod your internal root and intermediate certificates on Kubernetes is to store the PEM content in a Secret and mount it at the path n8n reads, which is /opt/custom-certificates in the container. Each certificate file in the Secret becomes a file in that directory, so the PEM content must be complete, with the full chain where your CA issues intermediates, and each file must be readable by the user the n8n process runs as. Confirm the exact chart values that map a Secret into this path, along with any setting that expects a specific key name, in the n8n Helm chart documentation for your chart version, because the mapping is set by the chart rather than by n8n itself and can change between releases.

Rotation is where teams get surprised. Kubernetes updates the files in a mounted Secret after the object changes, but n8n reads CA files when it starts, so a running pod keeps trusting the old chain until it restarts. Plan the rotation as a rolling restart of the main instance and of every worker and webhook processor, since each of them needs the new roots to call internal APIs. Before you replace a root, add the new CA alongside the old one, restart, confirm that HTTPS calls to each internal API succeed, and only then remove the old certificate. Ask your platform team how they will trigger these restarts when the Secret changes, because a manual restart is easy to forget across several deployments.

Access to the Secret should be narrow. Use Kubernetes RBAC so that only the service account and the people who manage the n8n release can read the Secret, and keep the CA files out of the values files stored in Git. Read access to a Secret that holds only public certificates is a lower risk than access to a private key, so if your internal CA material includes keys or a PKCS#12 bundle, keep those out of this Secret entirely. Review the role bindings after each chart upgrade, and record in your change process which team owns the CA bundle, how it is renewed and who approves a change to it.

Limits to confirm in your environment

Custom certificate authority support in n8n depends on the exact version, the certificate files you supply and the components that make outbound calls. The cards below are the checks to run in a test instance before any internal API is wired into production workflows.

Confirm the custom path on your version

Start by checking that your n8n release loads certificates from the /opt/custom-certificates directory as the documentation describes for that version. Run a workflow that calls an internal HTTPS endpoint signed by your CA, and confirm the request succeeds without any certificate check being disabled. Record the exact version tag you tested so the result can be repeated during upgrades.

Latest version cited
2.43
n8n release notes

Validate the PEM format and chain order

Confirm that every file you mount is PEM encoded and that intermediate certificates appear in the order your TLS stack expects, ending with the root or the trust anchor your servers use. A file that is DER encoded, has stray text or lists the chain backward can fail silently at the first request. Test each CA bundle with a standard command-line TLS client from inside the same container or pod.

Check community nodes and libraries

Verify whether community nodes and outbound libraries read the same trust store as the core HTTP node. Some packages bundle their own certificate handling or pin a runtime store, so a call that works in a built-in node may still fail in a third-party one. Run one request through each node type your workflows use, and document any node that needs a separate configuration.

Test proxy and TLS inspection paths

If outbound traffic passes through a forward proxy or a TLS inspection device, confirm which certificate the n8n container actually receives. The chain presented to n8n may be the inspection CA rather than the internal API's own CA, so both need to be trusted. Check the proxy environment variables your deployment sets, and confirm that internal hostnames bypass the proxy as intended.

Confirm edition and licensing effects

Ask your n8n representative or check the license terms to confirm that the custom certificate behavior applies to the edition you run. Community, Business and Enterprise builds share the core runtime, but files marked with .ee fall under a separate Enterprise License, so confirm that no feature you depend on for certificate handling lives in those files. Record the answer in your change records alongside the version.

n8n license terms

Rehearse rotation and expiry

Plan a test in which the internal CA rotates its intermediate or the leaf certificate for an internal API expires. Confirm how quickly n8n picks up the new file after a restart, whether the container must be recreated, and what error appears in workflow executions. Use the result to set a rotation runbook and an alert on certificate expiry dates.

Questions teams ask before fixing n8n certificate errors

How long does it take to get n8n trusting an internal CA?

The change itself is usually small: export the root and intermediate certificates as PEM files, place them where n8n reads them, and restart the process. The duration is driven by everything around that step. Teams need to locate the correct chain from their PKI owner, confirm which hostnames the internal APIs present, agree on the mount method for each deployment (Docker volume, Kubernetes secret or image build), and get the change through approval. Each n8n instance, including workers and webhook processors in queue mode, needs the same trust, so the number of environments multiplies the testing. Ask any partner to split the work into discovery, change, and verification so you can see where time goes.

Can our internal team set up custom certificate authorities alone?

Often yes, if the team already runs the n8n deployment and has access to the internal CA's root and intermediate certificates. The work is a configuration change and a restart, not a platform build. It becomes harder when the instance runs in several environments, when the CA chain is incomplete or uses unusual formats, or when the team has no one who can read a TLS handshake error. Decide who owns the chain, who owns the deployment manifests, and who verifies the result in staging before production. If one of those gaps exists, a fixed-scope engagement can cover the gap in writing.

What do we need to provide before the work starts?

Three things usually gate the work. First, the CA certificates in PEM format, including any intermediate certificates the internal APIs need, supplied by the team that runs the PKI. Second, network access from the n8n hosts to the internal APIs and to the CA's endpoints if the chain must be checked, plus access to the deployment platform, such as a Compose host, Helm values or cluster namespaces. Third, change approval, since trust changes alter what every workflow can reach. Ask the owner of your change process which records it requires, such as a ticket, a peer review of the manifest, and a rollback step.

Is it ever acceptable to disable certificate verification in n8n?

Disabling verification should not be the production fix. It removes the protection that tells n8n it is talking to the intended API, so credentials and data sent to that API can be intercepted. Adding the internal CA to n8n's trust store keeps verification on and solves the same error. Temporary diagnostics can justify a short test in an isolated environment, but the result should be recorded and reverted. If a vendor or a workflow author proposes turning checks off in a node, treat it as a security finding and review the node's settings and the credentials attached to it.

How does scope change the cost of fixing certificate trust?

Cost follows the number of moving parts, not the single setting. A single Docker host with one internal CA costs far less to change than a Kubernetes cluster with separate staging and production namespaces, queue mode workers, and several private CAs issuing certificates for different services. Scope also includes the testing: confirming that a workflow reaches each internal API, that workers succeed as well as the main instance, and that a rollback works. Ask any quote to list each environment, each CA, each deployment method, and the verification steps, so you can compare it with your own estimate.

Do upgrades to n8n change or remove custom CA settings?

The CA files live outside the n8n image in the mount you configure, so a normal image upgrade should keep them in place. The risk is in the surrounding configuration: a new chart version or Compose file can rename a volume, change a mount path, or drop a secret reference, and the certificates then stop loading without an obvious failure. Keep the CA bundle and its mount in version control, check the release notes for each target version, and include a trust check in your upgrade test. Confirm the exact mount behavior for your version in the n8n documentation before the upgrade window.

How DeployOpen scopes and delivers certificate trust for n8n

DeployOpen plans and implements n8n inside your own infrastructure, including how the instance trusts your internal certificate authority. The work is scoped in writing first, then built, tested and handed over with documentation your platform and security teams can review.

How we scope

  • Inventory every internal API and service n8n must call, and the CA that signs each certificate.
  • Confirm which container images, base images and runtime paths the deployment uses before choosing the mount method.
  • Agree the written scope, deliverables and timeline with your team before any work begins, as engagements are fixed-scope.

How we build

  • Assemble the root and intermediate PEM bundle, check the chain against each internal endpoint, and reject any setting that disables verification.
  • Configure the custom certificate directory, file ownership and permissions, and Kubernetes secret mounts, then restart and confirm n8n loads them.
  • Test a workflow that calls each internal API, plus a failing case with an untrusted certificate, to prove verification still runs.

How we hand over

  • Document the certificate source, bundle contents, mount paths, rotation steps and the owner responsible for each certificate.
  • Record the renewal and expiry checks your team should run before each CA or leaf certificate expires.
  • Walk your platform and security engineers through the configuration so they can operate and audit it without us.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after handover.
  • Re-verify trust after n8n upgrades, base image changes, CA rotations or new internal services are added.
  • Ask for a quote based on the written scope, which covers the environments, endpoints and number of instances involved.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.