Hey everyone,
I’ve deployed the self-hosted community edition of n8n on an AWS EC2 instance using Docker with this command:
sudo docker run -d --restart unless-stopped -it
–name n8n
-p 5681:5678
-e WEBHOOK_URL=“https://n8n.domain.com”
-v /home/ubuntu/n8n_backup:/home/node/.n8n
n8nio/n8n:1.107.4
Everything works fine until the server restarts — then all of my workflows disappear. The editor looks completely empty like a fresh instance, even though I’ve mounted /home/ubuntu/n8n_backup for persistence.
Here are some of the logs I see when this happens:
SQLITE_BUSY: database is locked
There was an error running database migrations
Received request for unknown webhook: “POST …/webhook” is not registered.
ENOENT: no such file or directory, open ‘/home/node/.n8n/nodes/node_modules/…/package.json’
ValidationError: The ‘X-Forwarded-For’ header is set but the Express ‘trust proxy’ setting is false
When n8n restarts, it even says:
Start Active Workflows:
Activated workflow “User Authentication”
Activated workflow “Vector Database”
Activated workflow “final agent”
…but the UI still shows no workflows at all.
Has anyone else run into this? Is it a problem with the SQLite database getting locked or not persisting properly across reboots?
Would switching to Postgres or adjusting the volume mount fix this?
Any advice would be really appreciated ![]()