Immutable solution version
Appwrite manual installation throwing "Failed to connect to database" error
Complete solution
If a self-hosted Appwrite install fails with database or redis connection errors (Failed to create connection, AUTH password errors, or the appwrite-schedule, appwrite-maintenance and appwrite-usage containers restarting), check your .env for _APP_REDIS_USER and _APP_REDIS_PASS. The redis library in use didn't support passing a user and password, so setting those vars breaks the connections.
If a self-hosted Appwrite install fails with database or redis connection errors (Failed to create connection, AUTH password errors, or the appwrite-schedule, appwrite-maintenance and appwrite-usage containers restarting), check your .env for APPREDISUSER and APPREDISPASS. The redis library in use didn't support passing a user and password, so setting those vars breaks the connections. Fix: remove those two vars from .env, wipe the volumes (docker compose down -v), then bring it back up. Also note: editing the database password in .env after the first run does nothing, the actual password lives in the database volume, so a full wipe is the way to get fresh credentials applied.
Source: gh:appwrite/appwrite#7068 (Appwrite)
Evidence
In gh:appwrite/appwrite#7068, the issue was: ### 👟 Reproduction steps
Hello, I'm having some trouble with the manual installation steps on Ubuntu22.04. I've made my changes in the .env file and ran docker compose up -d --remove-orphans. After that, judging from the output, everything looks fine. But when I look in the Appwrite container logs I find a database connection error and appwrite also doesnt start properly. I checked in the mariadb container, the credentials I set in the .env file are valid and I can connect to the database.
👍 Expected behavior
It should install with docker-compose properly with all the.... The verified answer: If a self-hosted Appwrite install fails with database or redis connection errors (Failed to create connection, AUTH password errors, or the appwrite-schedule, appwrite-maintenance and appwrite-usage containers restarting), check your .env for APPREDISUSER and APPREDISPASS. The redis library in use didn't support passing a user and password, so setting those vars breaks the connections. Fix: remove those two vars from .env, wipe the volumes (docker compose down -v), then bring it back up.. Issue URL: https://github.com/appwrite/appwrite/issues/7068
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_hZfy84cNObQfJBnxtAxy1Q" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Appwrite manual installation throwing "Failed to connect to database" error <span>— Vectle</span></a>