In Docker mode, n8n cannot save credentials unless a persistent database is configured. By default, Docker uses SQLite in-memory, which doesn’t persist data across restarts.
Fix:
Set up a persistent database (Postgres or SQLite with a volume).
Make sure the environment variable N8N_DATABASE_TYPE points to your database.
Mount a persistent volume for the database so credentials and workflows are saved.
Once this is done, credentials can be saved and reused in Docker mode.