Hello I wanted to install nextcloud from a docker image on debian12, or I generated a script to have postgresql and sqlite in my installation but I got an error message on the nextcloud configuration page I don’t understand not
Error while trying to create admin account: An exception occurred in the driver: SQLSTATE[08006] [7] could not translate host name “db” to address: Name or service not known
We need more context. For example, there are numerous Nextcloud Docker images and stack configurations.
Generically speaking, the error you’re seeing says that you specified the host “db” as your database server, but it’s not resolving in DNS from your app container. There are various possibilities.
Please post the Docker Compose file you’re attempting to use to bring up your stack.
If you’re trying to use the micro-services image here are some examples:
Hello thank you for your answer I finally abandoned the docker image and installed nextcloud from the zip but when I arrived on the configuration page I got an error message that I don’t understand:
my database and create thank you
Erreur
Error while trying to create admin account: An exception occurred in the driver: SQLSTATE[HY000] [1044] Access denied for user 'genicom5'@'localhost' to database 'nextcloud12'
@jtr maybe you can help me. Here is my docker-compose.yml file:
services:
db:
image: postgres:13
restart: always
volumes:
- db_data:/var/lib/postgresql/data
environment:
POSTGRES_DB: nextcloud
POSTGRES_USER: nextcloud
POSTGRES_PASSWORD: # Replace with a strong password
app:
build:
context: . # Path to your cloned Nextcloud repository
# dockerfile: Dockerfile # Specify the Dockerfile.
ports:
- 8080:80
links:
- db
volumes:
- ./nextcloud:/var/www/html
environment:
POSTGRES_HOST: db
POSTGRES_DB: nextcloud
POSTGRES_USER: nextcloud
POSTGRES_PASSWORD: # Same as above
volumes:
db_data:
Here is the error I am getting:
Error while trying to create admin account: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] connection to server at “db” (fd2b:e359:d87b::3), port 5432 failed: FATAL: password authentication failed for user “nextcloud”
This file worked for everyone else on my team but I get this error.
Any chance you previously ran the installer against this db? Since this is a Docker managed volume, even if you tossed the old db container, the volume would be kept around unless you removed explicitly (and associated with the replacement container).