Use this when storing credentials in n8n.
Credentials · n8n
n8n credentials store API keys, OAuth tokens and passwords encrypted in the database, selected in nodes so secrets never appear in workflow JSON or exports.
1. Credentials are stored encrypted with the instance key.
2. Least privilege on target systems.
3. Limit sharing.
4. Back up the encryption key or credentials are lost.
5. Rotate.
credential (encrypted) → node uses → target
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
The negative fixture should deliberately exercise risks such as expression coercion, partial item failure, credential drift, retries duplicating side effects, error workflow recursion and successful node status masking external inconsistency, choosing the cases most relevant to credential type/scope/ID, secure binding, masking, rotation and preventing credentials from leaking into logs/workspaces/artifacts.
Step 2 Common mistakes Narrow the fault
- Losing
N8N_ENCRYPTION_KEYduring migration (credentials become unreadable).
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Credentials are stored encrypted in the n8n database.
- Nodes select credentials by name.
- They are not included in exports.
- Credentials list (not shared broadly) — inventory
- Credential sharing settings — access
- Encryption key backup — recoverability
ReferenceWhy it matters1 section · depth on demand
What it is
n8n credentials store API keys and logins encrypted with the instance encryption key and are referenced by nodes.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
Credentials in n8n store API keys, OAuth tokens and passwords for the services workflows connect to. They are encrypted in the database with the instance's encryption key and referenced by nodes, so workflows can be shared or exported without exposing secrets.
Operational points:
- Set and back up
N8N_ENCRYPTION_KEY; without it, stored credentials cannot be decrypted after moving or restoring the instance. - Share credentials only with the users or projects that need them.
- Prefer OAuth or scoped API tokens over personal passwords.
- External secret stores (Vault, cloud secret managers) can supply credentials in enterprise editions.
Exported workflows contain credential references, not values — the target instance needs matching credentials.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in n8n > Credentials. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.n8n.io/ · confidence 94%Deep reference
Healthy vs suspicious evidence
Output interpretation
For credential type/scope/ID, secure binding, masking, rotation and preventing credentials from leaking into logs/workspaces/artifacts, prefer typed fields and stable IDs over human presentation text.