Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix(docker): add diagnostic error message when gosu fails in LXC (#2373)

LearningCircuit951a97f37592
diff --git a/scripts/ldr_entrypoint.sh b/scripts/ldr_entrypoint.sh
index 1d5561d144..c09d693759 100755
--- a/scripts/ldr_entrypoint.sh
+++ b/scripts/ldr_entrypoint.sh
@@ -33,5 +33,24 @@ chmod -R 700 /home/ldruser/.config
echo "Starting LDR application as ldruser..."
-# Switch to ldruser and execute the command
+# Switch to ldruser and execute the command.
+# gosu needs CAP_SETUID and CAP_SETGID to call setuid()/setgid() syscalls.
+# These are granted via cap_add in docker-compose.yml, but in restricted
+# environments (e.g. Proxmox LXC) the outer container may block them.
+if ! gosu ldruser true 2>/dev/null; then
+ echo ""
+ echo "ERROR: Failed to switch to non-root user 'ldruser'."
+ echo ""
+ echo " gosu requires CAP_SETUID and CAP_SETGID Linux capabilities."
+ echo " This typically happens in LXC containers (e.g. Proxmox) that"
+ echo " restrict these capabilities."
+ echo ""
+ echo " To fix, ensure your LXC container allows SETUID/SETGID:"
+ echo " - Proxmox: check 'Features' -> 'Nesting' is enabled"
+ echo " - Or add to LXC config: lxc.cap.keep = setuid setgid"
+ echo ""
+ echo " See: https://github.com/LearningCircuit/local-deep-research/issues"
+ echo ""
+ exit 1
+fi
exec gosu ldruser "$@"