Problem with selfhosted database

I made a misstake and put an user: “0” in the docker-compose so I could use the runwayml SDK.

After that… hell broke loose.

I couldnt log in at all and I needed to restore everything.

I have the database, no problem, but no user there and if I make one, it can anyway not ready the Workflow_entity table. and other relevant like credentials.

I tried to export and import it to the database after restore, but no luck.
Last resort is to export all workflows, wich I did, and transform it to json, but its a no good way…

Any suggestions ?

Information on your n8n setup

  • n8n version: 1.93
  • Database (default: SQLite): SQLITE
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: mac ofcourse
2 Likes

Hey,

you could try see what who the owner is with ‘‘ls -la’’ on the sqllite db file, try change back to node user, do you have ure encryption key? automatically created in stored in .n8n folder if none provided as env var?

Did you manage to fix it?

I dont have any encryption so thats not an issue…
and the db is readable

1 Like

@Lasse_Woien Hey,

Did you manage to fix it? I fixed a similar issue today, when you install n8n it creates an encryption if one isn’t set.

If you have the enviroment stiil, if you look in the /home/node/.n8n/ and open the config file “vi config” it should be located there, you need to ensure your using this same key when restoring the db file

If you still need help feel free to reach out and we can see what maybe causing this still.

Best regards,

Samuel

Thanks for helping!

Sadly i dont have any encryption… or thats good in this case, no file with that name anyway in my folders.

I just gonna copy paste the database, its working but i failed 2 times and database crashed.
Using datagrip to do it.

So solution on my problem is :

Since I had the original database without any encryption I could copy the
Fields from the workflow_entity table
The fields needed is nodes and connections, nothing more.

Copy all field, not only text.

then upload the database and restart n8n.

1 Like

Nice @Lasse_Woien thanks for sharing. I may have todo this one day. Good to know thanks very much.