Hello
I got an error below when trying to add an AI Agent node in a self-hosted environment
Could not locate the bindings file. Tried: → /usr/local/lib/node_modules/n8n/node_modules/sqlite3/build/node_sqlite3.node → /usr/local/lib/node_modules/n8n/node_modules/sqlite3/build/Debug/node_sqlite3.node → /usr/local/lib/node_modules/n8n/node_modules/sqlite3/build/Release/node_sqlite3.node →
Does anyone have a workaround or fix to resolve the error for self-hosted ?
thank you in advance
Information on your n8n setup
- n8n version: 1.102.3
- Database (default: SQLite): Postgresql
- n8n EXECUTIONS_PROCESS setting (default: own, main): default
- Running n8n via (Docker, npm, n8n cloud, desktop app): pm2
- Operating system: Ubuntu 24.04.2
Hi @Nur_Inayati,
This SQLite binding error usually happens when the native sqlite3 module isn’t built for your environment. You can resolve it by:
- Ensuring your host has the build tools installed (
build-essential, python3, etc.).
-
- Navigating to your n8n installation folder and running:
-
- npm rebuild sqlite3 --build-from-source
-
- or if you’re using yarn:
-
- yarn add sqlite3 --build-from-source
-
-
- Restart n8n so the agent node picks up the newly built bindings.
For hybrid AI-workflow architectures, consider decoupling the Agent execution from core workflow orchestration:
• Host your AI Agent in a microservice (e.g., Docker) that exposes a REST/gRPC endpoint.
• In n8n, use a simple HTTP Request node to invoke the Agent service—this keeps the workflow engine lightweight and isolates dependency management.
• This pattern also lets you swap SQLite for a more robust database (Postgres, MySQL) without impacting n8n’s core.
Hope this helps! Let me know if you hit any other issues.