I ran docker compose pull and then docker compose up -d to update to the latest version.
After this, accessing my n8n URL showed the “Set up owner account” screen. All my workflows and credentials were gone.
Here is the crucial diagnostic step: To troubleshoot, I edited my docker-compose.yml to force the old, working version again (image: n8nio/n8n:1.102.4) and restarted the container.
The Result: The setup screen persisted. Even the original n8n version could no longer read its data after the failed update attempt.
This leads me to believe that the update process triggered a migration on the database.sqlite file that failed and left the file in a permanently corrupted state. My only way to get back to a working system is by restoring a full server snapshot from my hosting provider.
My Question:
Given that my database works fine in daily use but seems to fail catastrophically during the update’s migration process, is there any known method to “prepare”, “check”, or “fix” a SQLite database before attempting the update to prevent this?
Has anyone else experienced this, and is there a recovery path I’m missing, other than manually exporting/importing all my workflows to a fresh installation?
Hey @Gerbor, is this still an issue for you or you managed to work around it? If it persists, have you tried exporting your workflows and credentials before updating, then importing them back in? Check the steps:
Export/Import workflows and credentials
Exporting from Your Container
To export workflows and credentials from your running Docker container, use these commands:
Your credentials are encrypted with an N8N_ENCRYPTION_KEY that’s auto-generated on first launch. You must preserve this key or your credentials will be unreadable after restoration.
Thanks krisn0x. Yes, I always do that to back up before updating. But it shouldn’t be like that; it should be a clean install. I couldn’t solve that problem, so I did a clean install, and now I can update without any issues.