mrxb3nceOriginal post
Web Developer
Hello! We tried to reinstall our main self-hosted appwrite with a new method but the main app 2 mins after launch throw this error:
Plain text
2025/06/22 16:16:14 stdout #2 {main}2025/06/22 16:16:14 stdout #1 [internal function]: {closure}()2025/06/22 16:16:14 stdout #0 /usr/src/code/app/http.php(253): createDatabase(Object(Utopia\App), 'getLogsDB', 'logs', Array, Object(Utopia\Pools\Group))2025/06/22 16:16:14 stdout Stack trace:2025/06/22 16:16:14 stdout Fatal error: Uncaught Exception: └── Failed to connect to database: Failed to create connection: SQLSTATE[HY000] [2002] Connection refused in /usr/src/code/app/http.php:185```
In normal docker (on windows) this error never shown, just on Synology NAS.
Somebody know what is this, and how to fix it?Summary
Main self-hosted appwrite instance running on Synology NAS throws error related to DB connection issue. The app is not able to connect to the logs DB. Error message indicates a failed connection to the database. The issue doesn't occur on Windows.
Solution:
- Check if the database container is properly configured and accessible.
- Ensure correct ports are defined and not conflicting on Synology NAS.
- Verify the environment variables and configurations for the appwrite container.
- Refer to detailed installation guides for container setup on DSM 7.2.
- Troubleshoot the networking setup on Synology NAS that might be causing the connection refusal.