Skip to content

Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors

fix: Error: Unable to inspect existing database #2771 (#2795)

Markus Hartung0c6c5e212e80
diff --git a/Dockerfile b/Dockerfile
index f23cd7b074..8955bced06 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -89,6 +89,10 @@ RUN chown -R node:node /app
EXPOSE 20128
+# Warns if the mounted data volume has wrong ownership
+COPY --chmod=755 scripts/check-permissions.sh /tmp/check-permissions.sh
+ENTRYPOINT ["/tmp/check-permissions.sh"]
+
USER node
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
diff --git a/scripts/check-permissions.sh b/scripts/check-permissions.sh
new file mode 100755
index 0000000000..13eedf45b0
--- /dev/null
+++ b/scripts/check-permissions.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+set -e
+
+if [ -d "/app/data" ] && [ ! -w "/app/data" ]; then
+ echo "WARNING: /app/data is not writable by the current user (UID $(id -u))."
+ echo "Run this on the Docker host to fix:"
+ echo " sudo chown -R 1000:1000 ./data"
+ echo " chmod -R u+rwX ./data"
+ exit 1
+fi
+
+exec "$@"