← Back to R&D
Security

Encrypting Stored Automation Credentials by Default

Hacroo Technologies · Aug 8, 2026 · 3 min read

To generate and deploy a workflow, Gydmation AI needs to hold a connection to the user's own n8n instance. That connection is, functionally, a set of credentials — and a self-hosted product that mishandles credentials undermines the exact privacy promise self-hosting is supposed to deliver.

Encrypted at rest, not just in transit

Every stored n8n connection is encrypted at rest using Fernet symmetric encryption before it ever touches disk. The distinction matters: TLS in transit protects data on the way to the server, but does nothing for a database file or backup sitting on that server afterward. Encryption at rest is what keeps a leaked backup from also being a leaked credential store.

Manual key setup
  • One line to add to an env file, every deploy
  • An optional step people skip under deadline
  • Real deployment reports confirmed this happened
Auto-generated key
  • Generated automatically on first run
  • An existing key is never touched or overwritten
  • Nothing left for the operator to forget

The gap we closed: key generation

Encryption is only as good as key management, and the original design left the encryption key as a manual setup step — one line to add to an environment file, on every deployment. In practice, an optional manual step is a step a self-hosting operator skips under deadline, and we confirmed exactly that from real deployment reports. The fix generates a real encryption key automatically on first run if none exists, and never touches an existing key afterward — a missing key is a bug worth failing loudly on, but a silently regenerated key would be worse: it would permanently lock every already-saved connection behind a key that can no longer decrypt them.

The same logic, twice

We applied the identical pattern to the admin dashboard's own access secret, which had been falling back to a hardcoded default whenever an operator didn't set one — a default sitting in public source code, protecting an admin panel with a password anyone reading the repository already knew. Same root cause, same fix: generate a real secret automatically, and never fall back to a shared one.

More R&D

Want to see this working, not just described?