Home » n8n» Where are n8n credentials stored? Beginner guide

Where are n8n credentials stored?

n8n stores credentials in the place you configure. By default n8n saves credentials in its database or in a credentials file, depending on the installation and settings. This page explains common storage locations and how to think about credential safety.

Common locations where are n8n credentials stored

Credentials often live in the main n8n database. For simple installs that uses SQLite, they are stored in the SQLite file. For production, Postgres or MySQL hold the credential data in tables. Some setups export credentials as files like credentials.json or use an external secret manager.

How n8n saves credentials

Credentials are linked to workflows and nodes. n8n encrypts credential data using an encryption key when configured. The encrypted blob is what ends up in the database or file. If you use environment variable settings, keys and secrets may be referenced instead of stored directly in the UI.

Credentials storage: database vs file system

Database storage centralizes data and suits multi-instance and Docker setups. File-based storage can be simpler for single-node or testing setups. External secret managers add separation of duties and stronger controls for production systems.

Best practices for managing n8n credentials

  • Enable encryption with a strong key and keep that key safe.
  • Use a managed database for production and restrict access by network rules.
  • Prefer external secret managers for high-security needs.
  • Back up your database and test restores to avoid data loss.

Summary

n8n credentials are typically stored in the configured database or in credential files, with encryption available when set up. Choose the storage that fits your scale and security needs, and follow best practices for secrets management.


Neil
Written by Neil

Neil is a true n8n geek who lives and breathes workflow automation. He dives deep into nodes, triggers, webhooks, custom logic, and self-hosting setups, sharing everything he learns about n8n on AutomationCompare.com. As part of a broader team of automation specialists, Neil focuses purely on mastering n8n and helping others unlock its full potential.

Keep Reading

Scroll to Top