N8n SQLITE Error

Hi everyone,

I am facing a critical issue after attempting to update my n8n Docker instance to the latest version. I am running n8n on Windows via Docker. I have a significant amount of production data in my SQLite database and I am currently unable to access it.

My Setup:

  • OS: Windows (Docker Desktop)

  • Database: SQLite (Default)

  • Deployment: Docker (docker run)

  • Previous Version: Working fine (approx v1.9x)

  • Target Version: latest (v1.93+)

The Issue: After pulling the latest image, the container enters a crash loop with the following error appearing repeatedly in the logs:

Plaintext

Initializing n8n process
There was an error initializing DB
SQLite package has not been found installed. Try to install it: npm install sqlite3 --save
Last session crashed

The Docker Command I am using: (I have tried both with --user=node and --user=root)

Bash

What I have tried so far (and failed):

  1. Permissions Fix: I ran chown -R 1000:1000 /home/node/.n8n on the volume.

  2. Running as Root: I removed --user=node and tried running with --user=root to bypass permission issues. The “SQLite package not found” error persists.

  3. Downgrading: I tried downgrading to 1.92.2. However, since the latest image apparently started a DB migration before crashing, the older version now gives the error: QueryFailedError: SQLITE_ERROR: no such column: User.role. So I am forced to move forward.

  4. New Volume / Local Mount: I backed up my database.sqlite file. And most importantly I need to save my all workflows.

    • I tried creating a fresh Docker volume (n8n_data_v2) and copying the DB there with correct permissions.

    • I tried mounting a local Windows folder (C:/n8n_local) directly to /home/node/.n8n to eliminate Docker Volume locking issues.

    • Result: In all cases, the container logs immediately show “SQLite package has not been found installed” and crashes.

Current Status: I have a backup of my database.sqlite. The file size looks correct (not 0 bytes). It seems n8n cannot read/recognize the file or the environment is failing to load the SQLite driver for some reason.

Any help to recover my database and get the instance running would be greatly appreciated.