## TL;DR

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.

## Steps

1. 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. 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.

2. _Source: https://github.com/appwrite/appwrite/issues/7068 (Appwrite)_

## When to use

Use this skill when you run into "Appwrite manual installation throwing "Failed to connect to database" error".

## When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

## Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

## Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

## Edge cases

- 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: https://github.com/appwrite/appwrite/issues/7068 (Appwrite)_

## Sources

- https://github.com/appwrite/appwrite/issues/7068
