Repository navigation
Description
I've been working on adding possibility of Procfile based deployments so one could deploy to Heroku or Dokku keeping in mind the entrypoints for all required containers e.g. worker-deletes and so fourth.
Ultimately, the Procfile should look like following
web: php -e app/http.php -dopcache.preload=opcache.preload=/usr/src/code/app/preload.php
worker-functions: . worker-functions
worker-audits: ...
worker-deletes: ...
Before I jumped into spinning those containers up, I thought to run deployment through Dockerfile on my Dokku server.
Initially I was getting the following error:
ERROR php_swoole_server_rshutdown() (ERRNO 503): Fatal error: Uncaught Exception: Failed to connect to database: SQLSTATE[HY000] [2002] Connection refused in /usr/src/code/app/http.php:75
After fiddling around, I found out that the error shown is wrong. Redis credentials had issues, not database. I happen to proceed connecting database successfully.
The next roadblock is the following.
Fatal error: Uncaught RedisException: NOAUTH Authentication required. in /usr/src/code/vendor/utopia-php/cache/src/Cache/Adapter/Redis.php:32
Stack trace:
#0 /usr/src/code/vendor/utopia-php/cache/src/Cache/Adapter/Redis.php(32): Redis->get('cache-_console:...')
#1 /usr/src/code/vendor/utopia-php/cache/src/Cache/Cache.php(47): Utopia\Cache\Adapter\Redis->load('cache-_console:...', 86400)
#2 /usr/src/code/vendor/utopia-php/database/src/Database/Database.php(761): Utopia\Cache\Cache->load('cache-_console:...', 86400)
#3 /usr/src/code/vendor/utopia-php/database/src/Database/Database.php(379): Utopia\Database\Database->getDocument(Object(Utopia\Database\Document), 'audit')
#4 /usr/src/code/app/http.php(104): Utopia\Database\Database->getCollection('audit')
#5 {main}
thrown in /usr/src/code/vendor/utopia-php/cache/src/Cache/Adapter/Redis.php on line 32
[2022-05-30 08:43:03 #8.4] ERROR php_swoole_server_rshutdown() (ERRNO 503): Fatal error: Uncaught RedisException: NOAUTH Authentication required. in /usr/src/code/vendor/utopia-php/cache/src/Cache/Adapter/Redis.php:32
Stack trace:
#0 /usr/src/code/vendor/utopia-php/cache/src/Cache/Adapter/Redis.php(32): Redis->get('cache-_console:...')
#1 /usr/src/code/vendor/utopia-php/cache/src/Cache/Cache.php(47): Utopia\Cache\Adapter\Redis->load('cache-_console:...', 86400)
#2 /usr/src/code/vendor/utopia-php/database/src/Database/Database.php(761): Utopia\Cache\Cache->load('cache-_console:...', 86400)
#3 /usr/src/code/vendor/utopia-php/database/src/Database/Database.php(379): Utopia\Database\Database->getDocument(Object(Utopia\Database\Document), 'audit')
#4 /usr/src/code/app/http.php(104): Utopia\Database\Database->getCollection('audit')
#5 {main}
thrown in /usr/src/code/vendor/utopia-php/cache/src/Cache/Adapter/Redis.php on line 32
Could someone please help?
Thanks
👟 Reproduction steps
Spin up a Dokku server, assign environment variables or push the application to Heroku with environment variables all setup.
Dokku
git push dokku master:master
Heroku
git push heroku master:master
👍 Expected behavior
It should connect to Redis as all the configurations are correct. I've tested it through Medis and TablePlus
👎 Actual Behavior
The app crashes upon deployment after the Dockerfile build is succeeded and app is about to release.
🎲 Appwrite version
Version 0.14.x
💻 Operating system
Linux
🧱 Your Environment
N.A
👀 Have you spent some time to check if this issue has been raised before?
- I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
- I have read the Code of Conduct
Activity
stnguyen90 commentedon Jun 10, 2022
I believe the problem is the library Appwrite uses to connect to redis doesn't properly pass the user to authenticate.
The core team is working on replacing the library with one that will support username and password.
usamashafiqs commentedon Dec 28, 2022
Any update on this ?
rome2o commentedon Dec 30, 2022
For me, this was an issue because the REDIS_URL wasn't being parsed properly in the source code of Appwrite.
Try putting Redis credentials in a plain format in your .env, and see if it works.
If you wish to debug this, try to print in console the Redis configuration upon boot and see what changes in .env would be required.
Hopefully this would fix your issue.
adipriyantobpn commentedon May 5, 2023
possibly _APP_REDIS_PASS and _APP_REDIS_USER are not passed into Dockerfile too?
https://github.com/appwrite/appwrite/blob/master/Dockerfile#L86
liudonghua123 commentedon Dec 21, 2023
I have the similar issues when I try to run appwrite using docker compose followed the guidance on https://github.com/appwrite/appwrite?tab=readme-ov-file#unix.
docker run -it --rm \ --volume /var/run/docker.sock:/var/run/docker.sock \ --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \ --entrypoint="install" \ appwrite/appwrite:1.4.12Details logs: logs.txt
aquelegustavo commentedon Jun 28, 2024
Hello everyone, how are you?
I came across the same issue. I noticed that Redis in docker compose installed via script (https://appwrite.io/docs/advanced/self-hosting#install-with-docker) does not set a password. For security reasons, I added line 823 (screenshot below) so that Redis requires a password for connections.
After making this change, I noticed that the services appwrite and appwrite-task-maintenance are unable to connect to Redis. The appwrite-realtime service seems to be working fine.
In the case of the appwrite container, it is unable to open the console, triggering the following error in the log when accessed through port 80:

The appwrite-task-maintenance container throws the following error (a lot of times on terminal):

I hope I have contributed to the discussion and at least saved some time for those investigating this issue =)
andrekutianski commentedon Aug 20, 2024
This also affects environments where an external Redis is used that is not defined in the default docker-compose. Appwrite forces you to use a local Redis with this authentication issue.
robsoncombr commentedon Oct 16, 2024
Just found this to avoid duplicates. Redis connection configuration, to me, looks like not to be considering the configured _APP_REDIS_USER / _APP_REDIS_PASS trying to connect without credentials that fails.
[Error] Message: Failed to create connection: ERR AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct?FaisalMohammadi commentedon Mar 25, 2025
is there any update tot this? i am runnig to the same problem. I have external redis set up and putte the credentials inside .env file and also tried with passing
--requirepass ${_APP_REDIS_PASS}.bingoku commentedon May 9, 2025
This issue has persisted for several years without resolution.
Upon testing, it was observed that the appwrite-task-maintenance service encounters the NOAUTH Authentication required error whenever Redis is configured with a password. This occurs regardless of whether Redis is running inside the docker-compose environment or externally. If the password requirement is removed from the external Redis instance, the appwrite-task-maintenance service starts without issues.
Additionally, Appwrite currently lacks support for Redis Cluster configurations, which limits scalability options
These limitations suggest that Appwrite’s self-hosted version may not yet be suitable for production environments and might be more appropriate for development or testing purposes. 😂
felixlu07 commentedon May 14, 2025
@bingoku Encountered something similar as well. Keep getting persistent issues with
attributescreation where it is perpetually stuck inpendingstate.How I troubleshooted was to attempt to create an attribute, then almost immediately run
docker logs appwrite --since=2mto check the exact error message; I saw --> "NOAUTH Authentication required" errors with Redis in Appwrite 1.6.1". Despite having correct Redis credentials in both .env and docker-compose.yml, the errors continued.The fix was to completely remove Redis authentication by clearing the Redis credentials in
.env(_APP_REDIS_USERand_APP_REDIS_PASS) and removing the--requirepassparameter fromdocker-compose.yml. After restarting withdocker-compose down&&docker-compose up -d, I no longer had the attributes stuck inprocessing, and everything worked perfectly.I could be wrong, but this seems to suggests a bug in how some Appwrite services handle Redis authentication, which appears to be a recurring issue across versions.
keskinonur commentedon May 29, 2025
I came up with the same problem and fix it by supplying like this in the docker-compose.yml :
kodejuice commentedon Feb 9, 2026
I fixed this by creating a Redis proxy: https://github.com/kodejuice/redis-proxy/
ibaraki-douji commentedon Jun 27, 2026
i think i found a part of the issue, some part of the app doesn't use the user to start the redis connection :
https://github.com/appwrite/appwrite/blob/879ba114a32c6241aacd3f7915b4ea3415039e58/app/init/resources.php#L200C1-L213C4
https://github.com/appwrite/appwrite/blob/879ba114a32c6241aacd3f7915b4ea3415039e58/app/worker.php#L67C1-L82C3
https://github.com/appwrite/appwrite/blob/879ba114a32c6241aacd3f7915b4ea3415039e58/app/realtime.php#L232C4-L252C6
and there is apparently others issues as the API container throws NOAUTH even with default password
possible causes :
https://github.com/appwrite/appwrite/blob/879ba114a32c6241aacd3f7915b4ea3415039e58/app/init/registers.php#L363C25-L369C44
fix: authenticate Redis connections with user and password (appwrite#…
HarshMN2345 commentedon Sep 22, 2026
Fixed by 86c34b4. Closing this.
ibaraki-douji commentedon Sep 22, 2026
yes, i can also confirm it's resolved, my 2.2.0 instance don't use a redis-proxy anymore and works fine
see :
HarshMN2345 commentedon Sep 22, 2026
Thankss for confirming