Help Needed: PostgreSQL Role "postgres" Does Not Exist Error

Hello everyone,

I’m facing an issue with PostgreSQL while trying to set up my Nextcloud instance. I recently created a new Docker image for Nextcloud and ever since then, I’ve been unable to recreate it due to a PostgreSQL authentication error.

The Problem:
When I attempt to create the required PostgreSQL role “oc_rene-next,” I encounter the following error: “createuser: error: connection to server on socket ‘/var/run/postgresql/.s.PGSQL.5432’ failed: FATAL: role ‘postgres’ does not exist.” This issue is preventing me from recreating my Nextcloud setup.

What I’ve Tried:

  1. Manually starting PostgreSQL using the command pg_ctl -D /var/lib/postgresql/data -l /var/log/postgresql/postgresql.log start.
  2. Attempting to create the “oc_rene-next” user using the createuser command with the --username=postgres option. I also granted superuser privileges when prompted.
  3. Granting all privileges on the Nextcloud database to the “oc_rene-next” user using the GRANT command.

Additional Information:

  • My Nextcloud setup is running in Docker containers (Nextcloud, PostgreSQL, and Redis).
  • I’m using the following Compose file to configure the containers:
version: '3.8'

services:
  nextcloud:
    image: nextcloud-custom-28:latest
    container_name: nextcloud
    hostname: nextcloud-server
    volumes:
      - /home/docker-projects/nextcloud:/var/www/html
    restart: always
    environment:
      - POSTGRES_HOST=postgres
      - POSTGRES_DB=nextcloud
      - POSTGRES_USER=nextcloud
      - POSTGRES_PASSWORD=securepassword
      - REDIS_HOST=redis
      - PHP_MEMORY_LIMIT=1024M
      - NEXTCLOUD_TRUSTED_DOMAINS=localhost 192.168.178.36 nipogi nipogi.fritz.box
      - NEXTCLOUD_ADMIN_USER=rene-next
      - NEXTCLOUD_ADMIN_PASSWORD=rene-next#_1
      - NEXTCLOUD_DEFAULT_PHONE_REGION=DE
    ports:
      - "8811:80"

    depends_on:
      - postgres
      - redis

  postgres:
    image: postgres:latest
    restart: always
    environment:
      - POSTGRES_DB=nextcloud
      - POSTGRES_USER=nextcloud
      - POSTGRES_PASSWORD=securepassword
    hostname: nextcloud-db
    container_name: nextcloud-db
    volumes:
      - /home/docker-projects/nextcloud/postgres:/var/lib/postgresql/data

  redis:
    image: redis:alpine
    restart: always
    hostname: nextcloud-redis
    container_name: nextcloud-redis

I’m reaching out to the community for assistance in resolving this issue. Any help or suggestions would be greatly appreciated. Thank you!

I don’t know how to fix the problem.

I have created a new image and started the stack. But it still seems to have problems.

Maybe this is helpful:
I start the stack in Portainer, the stack file is at the top.

I create the latest Nextcloud image with a .sh file and a Dockerfile

$ cat create-nextcloud-image-28.sh

#!/bin/bash

# Setze den Namen des Docker-Images
IMAGE_NAME="nextcloud-custom-28"
OLD_IMAGES_LIMIT=2

# Alte Images umbenennen und auf maximal $OLD_IMAGES_LIMIT beschränken
# Hole die IDs der letzten zwei Images mit dem Namen $IMAGE_NAME
old_images=$(docker images --format "{{.ID}}" --no-trunc $IMAGE_NAME | head -n $OLD_IMAGES_LIMIT)

# Zähler für den Tag der alten Images
count=1

# Gehe jedes alte Image durch und benenne es um
for img in $old_images; do
  new_tag="${IMAGE_NAME}-backup-${count}"
  echo "Tagging image $img with $new_tag"
  docker tag $img $new_tag
  count=$((count + 1))
done

# Entferne alle alten Images, die nicht in den letzten $OLD_IMAGES_LIMIT sind
docker images --format "{{.ID}}" --no-trunc $IMAGE_NAME | tail -n +$((OLD_IMAGES_LIMIT + 1)) | xargs -r docker rmi

# Baue das Docker-Image mit der angegebenen Dockerfile und ohne Cache
docker build --no-cache -f Dockerfile-28 -t $IMAGE_NAME .

$ cat Dockerfile-28

# Basis-Image
FROM nextcloud:28-apache

# Installiere notwendige Pakete
RUN apt-get update && \
    apt-get install -y libbz2-dev nano ffmpeg && \
    rm -rf /var/lib/apt/lists/*

# Installiere PHP-Erweiterungen
RUN docker-php-ext-install bz2

I’m not entirely clear why you’re manually creating credentials, but I did notice this which if you’ve updated Nextcloud Server even once since building this environment may mean your database was blown away:

You do not want to do the above. The volumes should be independent. Right now you have your entire database stashed in your /var/www/html directory within Nextcloud’s install folder. That’s going to have several problems:

  • The db folder will get deleted when Nextcloud updates (!)
  • it exposes your raw database to your web server which is probably not your intention

Try something more like this:

    volumes:
      - /home/docker-projects/nextcloud/nc-data:/var/www/html
   [...]
   volumes:
      - /home/docker-projects/nextcloud/postgres-data:/var/lib/postgresql/data

Alternatively, you could use named volumes, which are Docker managed and would be entirely independent.[1]

[1] GitHub - nextcloud/docker: ⛴ Docker image of Nextcloud

Sounds bad

i change my stack file to:

volumes:
      - /home/docker-projects/nextcloud/nc-data:/var/www/html
   [...]
   volumes:
      - /home/docker-projects/nextcloud/postgres-data:/var/lib/postgresql/data
$ ll
total 16
drwxr-x---  4 www-data www-data 4096 Feb  6 15:42 ./
drwxr-xr-x 10 rene     rene     4096 Feb  6 13:34 ../
drwxr-xr-x 14 root     root     4096 Feb  6 15:42 nc-data/
drwx------  3 lxd      root     4096 Feb  6 15:38 postgres-data/

the user and password entries are just for testing

if i start the stack i get the same issue:

nextcloud logs

Configuring Redis as session handler
=> Searching for scripts (*.sh) to run, located in the folder: /docker-entrypoint-hooks.d/before-starting
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.19.0.4. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.19.0.4. Set the 'ServerName' directive globally to suppress this message
[Tue Feb 06 14:56:36.313552 2024] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.57 (Debian) PHP/8.2.15 configured -- resuming normal operations
[Tue Feb 06 14:56:36.313583 2024] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
192.168.178.146 - rene-next [06/Feb/2024:14:56:36 +0000] "PROPFIND /remote.php/dav/files/rene-next/SofortUpload HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - xxxxxxx [06/Feb/2024:14:56:39 +0000] "PROPFIND /remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01 HTTP/1.1" 500 702 "-" "-"
192.168.178.166 - - [06/Feb/2024:14:56:39 +0000] "GET / HTTP/1.1" 500 702 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36"
192.168.178.146 - rene-next [06/Feb/2024:14:56:40 +0000] "PROPFIND /remote.php/dav/files/rene-next/SofortUpload HTTP/1.1" 500 702 "-" "-"
192.168.178.166 - - [06/Feb/2024:14:56:40 +0000] "GET / HTTP/1.1" 500 702 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36"
192.168.178.146 - xxxxxxx [06/Feb/2024:14:56:42 +0000] "PROPFIND /remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01 HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - xxxxxxx [06/Feb/2024:14:56:46 +0000] "PROPFIND /remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01 HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - xxxxxxx [06/Feb/2024:14:56:49 +0000] "PROPFIND /remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01 HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - xxxxxxx [06/Feb/2024:14:56:52 +0000] "PROPFIND /remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01 HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - xxxxxxx [06/Feb/2024:14:56:56 +0000] "PROPFIND /remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01 HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - xxxxxxx [06/Feb/2024:14:56:59 +0000] "PROPFIND /remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01 HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - xxxxxxx [06/Feb/2024:14:57:03 +0000] "PROPFIND /remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01 HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - xxxxxxx [06/Feb/2024:14:57:06 +0000] "PROPFIND /remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01 HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - xxxxxxx [06/Feb/2024:14:57:09 +0000] "PROPFIND /remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01 HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - xxxxxxx [06/Feb/2024:14:57:13 +0000] "PROPFIND /remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01 HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - rene-next [06/Feb/2024:14:56:43 +0000] "PROPFIND /remote.php/dav/files/rene-next/SofortUpload HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - xxxxxxx [06/Feb/2024:14:57:16 +0000] "PROPFIND /remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01 HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - rene-next [06/Feb/2024:14:57:17 +0000] "PROPFIND /remote.php/dav/files/rene-next/SofortUpload HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - xxxxxxx [06/Feb/2024:14:57:19 +0000] "PROPFIND /remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01 HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - rene-next [06/Feb/2024:14:57:20 +0000] "PROPFIND /remote.php/dav/files/rene-next/SofortUpload HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - xxxxxxx [06/Feb/2024:14:57:23 +0000] "PROPFIND /remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01 HTTP/1.1" 500 702 "-" "-"

redis logs

1:C 06 Feb 2024 14:56:35.776 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
1:C 06 Feb 2024 14:56:35.776 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1:C 06 Feb 2024 14:56:35.776 * Redis version=7.2.4, bits=64, commit=00000000, modified=0, pid=1, just started
1:C 06 Feb 2024 14:56:35.776 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
1:M 06 Feb 2024 14:56:35.776 * monotonic clock: POSIX clock_gettime
1:M 06 Feb 2024 14:56:35.777 * Running mode=standalone, port=6379.
1:M 06 Feb 2024 14:56:35.777 * Server initialized
1:M 06 Feb 2024 14:56:35.777 * Ready to accept connections tcp

postgres-db log

initdb: hint: If you want to create a new database system, either remove or empty the directory "/var/lib/postgresql/data" or run initdb with an argument other than "/var/lib/postgresql/data".
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
initdb: error: directory "/var/lib/postgresql/data" exists but is not empty
initdb: hint: If you want to create a new database system, either remove or empty the directory "/var/lib/postgresql/data" or run initdb with an argument other than "/var/lib/postgresql/data".
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
initdb: error: directory "/var/lib/postgresql/data" exists but is not empty
initdb: hint: If you want to create a new database system, either remove or empty the directory "/var/lib/postgresql/data" or run initdb with an argument other than "/var/lib/postgresql/data".
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
initdb: error: directory "/var/lib/postgresql/data" exists but is not empty
initdb: hint: If you want to create a new database system, either remove or empty the directory "/var/lib/postgresql/data" or run initdb with an argument other than "/var/lib/postgresql/data".
The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
initdb: error: directory "/var/lib/postgresql/data" exists but is not empty
initdb: hint: If you want to create a new database system, either remove or empty the directory "/var/lib/postgresql/data" or run initdb with an argument other than "/var/lib/postgresql/data".
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
initdb: error: directory "/var/lib/postgresql/data" exists but is not empty
The default text search configuration will be set to "english".
initdb: hint: If you want to create a new database system, either remove or empty the directory "/var/lib/postgresql/data" or run initdb with an argument other than "/var/lib/postgresql/data".
Data page checksums are disabled.
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
initdb: error: directory "/var/lib/postgresql/data" exists but is not empty
initdb: hint: If you want to create a new database system, either remove or empty the directory "/var/lib/postgresql/data" or run initdb with an argument other than "/var/lib/postgresql/data".
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
initdb: error: directory "/var/lib/postgresql/data" exists but is not empty
initdb: hint: If you want to create a new database system, either remove or empty the directory "/var/lib/postgresql/data" or run initdb with an argument other than "/var/lib/postgresql/data".
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
initdb: error: directory "/var/lib/postgresql/data" exists but is not empty
initdb: hint: If you want to create a new database system, either remove or empty the directory "/var/lib/postgresql/data" or run initdb with an argument other than "/var/lib/postgresql/data".
The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
initdb: error: directory "/var/lib/postgresql/data" exists but is not empty
initdb: hint: If you want to create a new database system, either remove or empty the directory "/var/lib/postgresql/data" or run initdb with an argument other than "/var/lib/postgresql/data".

Files

✔ root@nipogi 192.168.178.36 15:59 /home/docker-projects/nextcloud/postgres-data/postgres $ ll
total 132
drwx------ 19 lxd root    4096 Feb  6 15:42 ./
drwx------  3 lxd root    4096 Feb  6 15:38 ../
drwx------  6 lxd docker  4096 Feb  6 13:38 base/
drwx------  2 lxd docker  4096 Feb  6 13:45 global/
drwx------  2 lxd docker  4096 Feb  6 13:38 pg_commit_ts/
drwx------  2 lxd docker  4096 Feb  6 13:38 pg_dynshmem/
-rw-------  1 lxd docker  5743 Feb  6 13:38 pg_hba.conf
-rw-------  1 lxd docker  2640 Feb  6 13:38 pg_ident.conf
drwx------  4 lxd docker  4096 Feb  6 15:42 pg_logical/
drwx------  4 lxd docker  4096 Feb  6 13:38 pg_multixact/
drwx------  2 lxd docker  4096 Feb  6 13:38 pg_notify/
drwx------  2 lxd docker  4096 Feb  6 13:38 pg_replslot/
drwx------  2 lxd docker  4096 Feb  6 13:38 pg_serial/
drwx------  2 lxd docker  4096 Feb  6 13:38 pg_snapshots/
drwx------  2 lxd docker  4096 Feb  6 15:42 pg_stat/
drwx------  2 lxd docker  4096 Feb  6 13:38 pg_stat_tmp/
drwx------  2 lxd docker  4096 Feb  6 13:38 pg_subtrans/
drwx------  2 lxd docker  4096 Feb  6 13:38 pg_tblspc/
drwx------  2 lxd docker  4096 Feb  6 13:38 pg_twophase/
-rw-------  1 lxd docker     3 Feb  6 13:38 PG_VERSION
drwx------  3 lxd docker  4096 Feb  6 13:38 pg_wal/
drwx------  2 lxd docker  4096 Feb  6 13:38 pg_xact/
-rw-------  1 lxd docker    88 Feb  6 13:38 postgresql.auto.conf
-rw-------  1 lxd docker 29770 Feb  6 13:38 postgresql.conf
-rw-------  1 lxd docker    36 Feb  6 13:55 postmaster.opts
✔ root@nipogi 192.168.178.36 15:59 /home/docker-projects/nextcloud/postgres-data/postgres $

/home/docker-projects/nextcloud/postgres-data/postgres

initdb: error: directory "/var/lib/postgresql/data" exists but is not empty
initdb: hint: If you want to create a new database system, either remove or empty the directory "/var/lib/postgresql/data" or run initdb with an argument other than "/var/lib/postgresql/data".

When you changed the volume paths are you sure you moved your files to the appropriate place? Shouldn’t the contents of the postgres subfolder be in the parent folder?

For the 500 error, you’ll need to look at your Nextcloud Server log to find the cause. By default that would be nextcloud.log in your Nextcloud data folder. Though right now it’s probably failing because your database container is offline. :slight_smile:

Nextcloud container logs:

192.168.178.146 - rene-next [06/Feb/2024:15:25:33 +0000] "PROPFIND /remote.php/dav/files/rene-next/SofortUpload HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - xxxxxxx [06/Feb/2024:15:25:36 +0000] "PROPFIND /remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01 HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - rene-next [06/Feb/2024:15:25:37 +0000] "PROPFIND /remote.php/dav/files/rene-next/SofortUpload HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - xxxxxxx [06/Feb/2024:15:25:40 +0000] "PROPFIND /remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01 HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - rene-next [06/Feb/2024:15:25:40 +0000] "PROPFIND /remote.php/dav/files/rene-next/SofortUpload HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - xxxxxxx [06/Feb/2024:15:25:43 +0000] "PROPFIND /remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01 HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - rene-next [06/Feb/2024:15:25:44 +0000] "PROPFIND /remote.php/dav/files/rene-next/SofortUpload HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - xxxxxxx [06/Feb/2024:15:25:47 +0000] "PROPFIND /remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01 HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - rene-next [06/Feb/2024:15:25:47 +0000] "PROPFIND /remote.php/dav/files/rene-next/SofortUpload HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - xxxxxxx [06/Feb/2024:15:25:50 +0000] "PROPFIND /remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01 HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - rene-next [06/Feb/2024:15:25:50 +0000] "PROPFIND /remote.php/dav/files/rene-next/SofortUpload HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - xxxxxxx [06/Feb/2024:15:25:53 +0000] "PROPFIND /remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01 HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - rene-next [06/Feb/2024:15:25:54 +0000] "PROPFIND /remote.php/dav/files/rene-next/SofortUpload HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - xxxxxxx [06/Feb/2024:15:25:57 +0000] "PROPFIND /remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01 HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - rene-next [06/Feb/2024:15:25:57 +0000] "PROPFIND /remote.php/dav/files/rene-next/SofortUpload HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - xxxxxxx [06/Feb/2024:15:26:00 +0000] "PROPFIND /remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01 HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - rene-next [06/Feb/2024:15:26:01 +0000] "PROPFIND /remote.php/dav/files/rene-next/SofortUpload HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - xxxxxxx [06/Feb/2024:15:26:03 +0000] "PROPFIND /remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01 HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - rene-next [06/Feb/2024:15:26:04 +0000] "PROPFIND /remote.php/dav/files/rene-next/SofortUpload HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - xxxxxxx [06/Feb/2024:15:26:07 +0000] "PROPFIND /remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01 HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - rene-next [06/Feb/2024:15:26:07 +0000] "PROPFIND /remote.php/dav/files/rene-next/SofortUpload HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - xxxxxxx [06/Feb/2024:15:26:10 +0000] "PROPFIND /remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01 HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - rene-next [06/Feb/2024:15:26:11 +0000] "PROPFIND /remote.php/dav/files/rene-next/SofortUpload HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - xxxxxxx [06/Feb/2024:15:26:14 +0000] "PROPFIND /remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01 HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - rene-next [06/Feb/2024:15:26:14 +0000] "PROPFIND /remote.php/dav/files/rene-next/SofortUpload HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - xxxxxxx [06/Feb/2024:15:26:17 +0000] "PROPFIND /remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01 HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - rene-next [06/Feb/2024:15:26:17 +0000] "PROPFIND /remote.php/dav/files/rene-next/SofortUpload HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - xxxxxxx [06/Feb/2024:15:26:20 +0000] "PROPFIND /remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01 HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - rene-next [06/Feb/2024:15:26:21 +0000] "PROPFIND /remote.php/dav/files/rene-next/SofortUpload HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - xxxxxxx [06/Feb/2024:15:26:24 +0000] "PROPFIND /remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01 HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - rene-next [06/Feb/2024:15:26:24 +0000] "PROPFIND /remote.php/dav/files/rene-next/SofortUpload HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - xxxxxxx [06/Feb/2024:15:26:27 +0000] "PROPFIND /remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01 HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - rene-next [06/Feb/2024:15:26:28 +0000] "PROPFIND /remote.php/dav/files/rene-next/SofortUpload HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - xxxxxxx [06/Feb/2024:15:26:30 +0000] "PROPFIND /remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01 HTTP/1.1" 500 702 "-" "-"
192.168.178.146 - rene-next [06/Feb/2024:15:26:31 +0000] "PROPFIND /remote.php/dav/files/rene-next/SofortUpload HTTP/1.1" 500 702 "-" "-"

no issues

✔ root@nipogi 192.168.178.36 16:29 /home/docker-projects/nextcloud/postgres-data $ ll
total 8
drwx------ 2 lxd      docker   4096 Feb  6 16:29 ./
drwxr-x--- 4 www-data www-data 4096 Feb  6 16:05 ../
✔ root@nipogi 192.168.178.36 16:29 /home/docker-projects/nextcloud/postgres-data $

i clear the folder and move my backup files:
:heavy_check_mark: root@nipogi 192.168.178.36 16:33 /home/docker-projects/nextcloud/postgres-data $ ll
total 2436
drwx------ 19 lxd docker 4096 Feb 6 16:33 ./
drwxr-x— 4 www-data www-data 4096 Feb 6 16:05 …/
drwx------ 6 lxd docker 4096 Feb 6 13:38 base/
drwx------ 2 lxd docker 4096 Feb 6 13:45 global/
drwx------ 2 lxd docker 4096 Feb 6 13:38 pg_commit_ts/
drwx------ 2 lxd docker 4096 Feb 6 13:38 pg_dynshmem/
-rw------- 1 lxd docker 5743 Feb 6 13:38 pg_hba.conf
-rw------- 1 lxd docker 2640 Feb 6 13:38 pg_ident.conf
drwx------ 4 lxd docker 4096 Feb 6 15:42 pg_logical/
drwx------ 4 lxd docker 4096 Feb 6 13:38 pg_multixact/
drwx------ 2 lxd docker 4096 Feb 6 13:38 pg_notify/
drwx------ 2 lxd docker 4096 Feb 6 13:38 pg_replslot/
drwx------ 2 lxd docker 4096 Feb 6 13:38 pg_serial/
drwx------ 2 lxd docker 4096 Feb 6 13:38 pg_snapshots/
drwx------ 2 lxd docker 4096 Feb 6 15:42 pg_stat/
drwx------ 2 lxd docker 4096 Feb 6 13:38 pg_stat_tmp/
drwx------ 2 lxd docker 4096 Feb 6 13:38 pg_subtrans/
drwx------ 2 lxd docker 4096 Feb 6 13:38 pg_tblspc/
drwx------ 2 lxd docker 4096 Feb 6 13:38 pg_twophase/
-rw------- 1 lxd docker 3 Feb 6 13:38 PG_VERSION
drwx------ 3 lxd docker 4096 Feb 6 13:38 pg_wal/
drwx------ 2 lxd docker 4096 Feb 6 13:38 pg_xact/
-rw-r–r-- 1 root root 2359296 Feb 6 16:04 postgres-data-backup.tar.gz
-rw------- 1 lxd docker 88 Feb 6 13:38 postgresql.auto.conf
-rw------- 1 lxd docker 29770 Feb 6 13:38 postgresql.conf
-rw------- 1 lxd docker 36 Feb 6 13:55 postmaster.opts
:heavy_check_mark: root@nipogi 192.168.178.36 16:33 /home/docker-projects/nextcloud/postgres-data $

but it looks bad nothing works :confused:


I’m not sure what happened here and what is broken.

I will probably have to start again. There was some data in Nextcloud that is important, these are the photos.

I will probably back them up

✔ root@nipogi 192.168.178.36 16:35 /home/docker-projects/nextcloud/nc-data/data/rene-next $ ll
total 24
drwxr-x--- 6 www-data www-data 4096 Jan 7 00:38 ./
drwxr-x--- 6 www-data www-data 4096 Jan 12 14:11 ../
drwxr-x--- 2 www-data www-data 4096 Jan 5 21:23 cache/
drwxr-x--- 8 www-data www-data 4096 Jan 7 00:39 files/
drwxr-xr-x 5 www-data www-data 4096 Jan 7 21:31 files_trashbin/
drwxr-xr-x 2 www-data www-data 4096 Feb 4 19:09 uploads/

Do you have any tips on how I can start again? I can copy the photos again afterwards

Nextcloud Server logs. Not Docker container logs.

In your case, the nextcloud.log is likely in /home/docker-projects/nextcloud/nc-data/data/nextcloud.log

I will probably have to start again. There was some data in Nextcloud that is important, these are the photos.

Your Nexcloud files are likely here: /home/docker-projects/nextcloud/nc-data/data/rene-next/files

{"reqId":"iIEkApdAaV0mxYNdBjQw","level":3,"time":"2024-02-06T15:45:22+00:00","remoteAddr":"192.168.178.146","user":"--","app":"core","method":"PROPFIND","url":"/remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01","message":"Exception thrown: Doctrine\\DBAL\\Exception","userAgent":"--","version":"28.0.1.1","exception":{"Exception":"Doctrine\\DBAL\\Exception","Message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] connection to server at \"postgres\" (172.19.0.3), port 5432 failed: FATAL:  password authentication failed for user \"oc_rene-next\"","Code":7,"Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1654,"function":"connect","class":"OC\\DB\\Connection","type":"->","args":[]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1081,"function":"getWrappedConnection","class":"Doctrine\\DBAL\\Connection","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":261,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT * FROM \"oc_appconfig\"",[],[],null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":337,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["SELECT * FROM \"oc_appconfig\"",[],[],null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":377,"function":"executeQuery","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":421,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":187,"function":"loadConfigValues","class":"OC\\AppConfig","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":377,"function":"getApps","class":"OC\\AppConfig","type":"->","args":[]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":734,"function":"getValues","class":"OC\\AppConfig","type":"->","args":[false,"installed_version"]},{"file":"/var/www/html/lib/private/TemplateLayout.php","line":236,"function":"getAppVersions","class":"OC_App","type":"::","args":[]},{"file":"/var/www/html/lib/private/legacy/OC_Template.php","line":142,"function":"__construct","class":"OC\\TemplateLayout","type":"->","args":["error",""]},{"file":"/var/www/html/lib/private/Template/Base.php","line":132,"function":"fetchPage","class":"OC_Template","type":"->","args":[]},{"file":"/var/www/html/lib/private/legacy/OC_Template.php","line":291,"function":"printPage","class":"OC\\Template\\Base","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":88,"function":"printExceptionErrorPage","class":"OC_Template","type":"::","args":[["Doctrine\\DBAL\\Exception"],500]},{"file":"/var/www/html/remote.php","line":174,"function":"handleException","args":[["Doctrine\\DBAL\\Exception"]]}],"File":"/var/www/html/lib/private/DB/Connection.php","Line":139,"CustomMessage":"Exception thrown: Doctrine\\DBAL\\Exception"}}
{"reqId":"Z510d6LvzQny7rXcri7h","level":3,"time":"2024-02-06T15:45:24+00:00","remoteAddr":"192.168.178.146","user":"--","app":"remote","method":"PROPFIND","url":"/remote.php/dav/files/rene-next/SofortUpload","message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] connection to server at \"postgres\" (172.19.0.3), port 5432 failed: FATAL:  password authentication failed for user \"oc_rene-next\"","userAgent":"--","version":"28.0.1.1","exception":{"Exception":"Doctrine\\DBAL\\Exception","Message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] connection to server at \"postgres\" (172.19.0.3), port 5432 failed: FATAL:  password authentication failed for user \"oc_rene-next\"","Code":7,"Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1654,"function":"connect","class":"OC\\DB\\Connection","type":"->","args":[]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1081,"function":"getWrappedConnection","class":"Doctrine\\DBAL\\Connection","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":261,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT * FROM \"oc_appconfig\"",[],[],null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":337,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["SELECT * FROM \"oc_appconfig\"",[],[],null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":377,"function":"executeQuery","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":421,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":187,"function":"loadConfigValues","class":"OC\\AppConfig","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":377,"function":"getApps","class":"OC\\AppConfig","type":"->","args":[]},{"file":"/var/www/html/lib/private/App/AppManager.php","line":128,"function":"getValues","class":"OC\\AppConfig","type":"->","args":[false,"enabled"]},{"file":"/var/www/html/lib/private/App/AppManager.php","line":149,"function":"getInstalledAppsValues","class":"OC\\App\\AppManager","type":"->","args":[]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":231,"function":"getInstalledApps","class":"OC\\App\\AppManager","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php","line":90,"function":"getEnabledApps","class":"OC_App","type":"::","args":[]},{"file":"/var/www/html/lib/base.php","line":700,"function":"runInitialRegistration","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->","args":[]},{"file":"/var/www/html/lib/base.php","line":1200,"function":"init","class":"OC","type":"::","args":[]},{"file":"/var/www/html/remote.php","line":119,"args":["/var/www/html/lib/base.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/DB/Connection.php","Line":139,"message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] connection to server at \"postgres\" (172.19.0.3), port 5432 failed: FATAL:  password authentication failed for user \"oc_rene-next\"","exception":{},"CustomMessage":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] connection to server at \"postgres\" (172.19.0.3), port 5432 failed: FATAL:  password authentication failed for user \"oc_rene-next\""}}
{"reqId":"Z510d6LvzQny7rXcri7h","level":3,"time":"2024-02-06T15:45:24+00:00","remoteAddr":"192.168.178.146","user":"--","app":"core","method":"PROPFIND","url":"/remote.php/dav/files/rene-next/SofortUpload","message":"Exception thrown: Doctrine\\DBAL\\Exception","userAgent":"--","version":"28.0.1.1","exception":{"Exception":"Doctrine\\DBAL\\Exception","Message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] connection to server at \"postgres\" (172.19.0.3), port 5432 failed: FATAL:  password authentication failed for user \"oc_rene-next\"","Code":7,"Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1654,"function":"connect","class":"OC\\DB\\Connection","type":"->","args":[]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1081,"function":"getWrappedConnection","class":"Doctrine\\DBAL\\Connection","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":261,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT * FROM \"oc_appconfig\"",[],[],null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":337,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["SELECT * FROM \"oc_appconfig\"",[],[],null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":377,"function":"executeQuery","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":421,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":187,"function":"loadConfigValues","class":"OC\\AppConfig","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":377,"function":"getApps","class":"OC\\AppConfig","type":"->","args":[]},{"file":"/var/www/html/lib/private/App/AppManager.php","line":128,"function":"getValues","class":"OC\\AppConfig","type":"->","args":[false,"enabled"]},{"file":"/var/www/html/lib/private/App/AppManager.php","line":149,"function":"getInstalledAppsValues","class":"OC\\App\\AppManager","type":"->","args":[]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":231,"function":"getInstalledApps","class":"OC\\App\\AppManager","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php","line":90,"function":"getEnabledApps","class":"OC_App","type":"::","args":[]},{"file":"/var/www/html/lib/base.php","line":700,"function":"runInitialRegistration","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->","args":[]},{"file":"/var/www/html/lib/base.php","line":1200,"function":"init","class":"OC","type":"::","args":[]},{"file":"/var/www/html/remote.php","line":119,"args":["/var/www/html/lib/base.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/DB/Connection.php","Line":139,"CustomMessage":"Exception thrown: Doctrine\\DBAL\\Exception"}}
{"reqId":"Z510d6LvzQny7rXcri7h","level":3,"time":"2024-02-06T15:45:24+00:00","remoteAddr":"192.168.178.146","user":"--","app":"core","method":"PROPFIND","url":"/remote.php/dav/files/rene-next/SofortUpload","message":"Exception thrown: Doctrine\\DBAL\\Exception","userAgent":"--","version":"28.0.1.1","exception":{"Exception":"Doctrine\\DBAL\\Exception","Message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] connection to server at \"postgres\" (172.19.0.3), port 5432 failed: FATAL:  password authentication failed for user \"oc_rene-next\"","Code":7,"Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1654,"function":"connect","class":"OC\\DB\\Connection","type":"->","args":[]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1081,"function":"getWrappedConnection","class":"Doctrine\\DBAL\\Connection","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":261,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT * FROM \"oc_appconfig\"",[],[],null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":337,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["SELECT * FROM \"oc_appconfig\"",[],[],null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":377,"function":"executeQuery","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":421,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":187,"function":"loadConfigValues","class":"OC\\AppConfig","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":377,"function":"getApps","class":"OC\\AppConfig","type":"->","args":[]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":734,"function":"getValues","class":"OC\\AppConfig","type":"->","args":[false,"installed_version"]},{"file":"/var/www/html/lib/private/TemplateLayout.php","line":236,"function":"getAppVersions","class":"OC_App","type":"::","args":[]},{"file":"/var/www/html/lib/private/legacy/OC_Template.php","line":142,"function":"__construct","class":"OC\\TemplateLayout","type":"->","args":["error",""]},{"file":"/var/www/html/lib/private/Template/Base.php","line":132,"function":"fetchPage","class":"OC_Template","type":"->","args":[]},{"file":"/var/www/html/lib/private/legacy/OC_Template.php","line":291,"function":"printPage","class":"OC\\Template\\Base","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":88,"function":"printExceptionErrorPage","class":"OC_Template","type":"::","args":[["Doctrine\\DBAL\\Exception"],500]},{"file":"/var/www/html/remote.php","line":174,"function":"handleException","args":[["Doctrine\\DBAL\\Exception"]]}],"File":"/var/www/html/lib/private/DB/Connection.php","Line":139,"CustomMessage":"Exception thrown: Doctrine\\DBAL\\Exception"}}
{"reqId":"2aWPEHteGwbI9iFY9Lps","level":3,"time":"2024-02-06T15:45:25+00:00","remoteAddr":"192.168.178.146","user":"--","app":"remote","method":"PROPFIND","url":"/remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01","message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] connection to server at \"postgres\" (172.19.0.3), port 5432 failed: FATAL:  password authentication failed for user \"oc_rene-next\"","userAgent":"--","version":"28.0.1.1","exception":{"Exception":"Doctrine\\DBAL\\Exception","Message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] connection to server at \"postgres\" (172.19.0.3), port 5432 failed: FATAL:  password authentication failed for user \"oc_rene-next\"","Code":7,"Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1654,"function":"connect","class":"OC\\DB\\Connection","type":"->","args":[]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1081,"function":"getWrappedConnection","class":"Doctrine\\DBAL\\Connection","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":261,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT * FROM \"oc_appconfig\"",[],[],null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":337,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["SELECT * FROM \"oc_appconfig\"",[],[],null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":377,"function":"executeQuery","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":421,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":187,"function":"loadConfigValues","class":"OC\\AppConfig","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":377,"function":"getApps","class":"OC\\AppConfig","type":"->","args":[]},{"file":"/var/www/html/lib/private/App/AppManager.php","line":128,"function":"getValues","class":"OC\\AppConfig","type":"->","args":[false,"enabled"]},{"file":"/var/www/html/lib/private/App/AppManager.php","line":149,"function":"getInstalledAppsValues","class":"OC\\App\\AppManager","type":"->","args":[]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":231,"function":"getInstalledApps","class":"OC\\App\\AppManager","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php","line":90,"function":"getEnabledApps","class":"OC_App","type":"::","args":[]},{"file":"/var/www/html/lib/base.php","line":700,"function":"runInitialRegistration","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->","args":[]},{"file":"/var/www/html/lib/base.php","line":1200,"function":"init","class":"OC","type":"::","args":[]},{"file":"/var/www/html/remote.php","line":119,"args":["/var/www/html/lib/base.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/DB/Connection.php","Line":139,"message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] connection to server at \"postgres\" (172.19.0.3), port 5432 failed: FATAL:  password authentication failed for user \"oc_rene-next\"","exception":{},"CustomMessage":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] connection to server at \"postgres\" (172.19.0.3), port 5432 failed: FATAL:  password authentication failed for user \"oc_rene-next\""}}
{"reqId":"2aWPEHteGwbI9iFY9Lps","level":3,"time":"2024-02-06T15:45:25+00:00","remoteAddr":"192.168.178.146","user":"--","app":"core","method":"PROPFIND","url":"/remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01","message":"Exception thrown: Doctrine\\DBAL\\Exception","userAgent":"--","version":"28.0.1.1","exception":{"Exception":"Doctrine\\DBAL\\Exception","Message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] connection to server at \"postgres\" (172.19.0.3), port 5432 failed: FATAL:  password authentication failed for user \"oc_rene-next\"","Code":7,"Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1654,"function":"connect","class":"OC\\DB\\Connection","type":"->","args":[]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1081,"function":"getWrappedConnection","class":"Doctrine\\DBAL\\Connection","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":261,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT * FROM \"oc_appconfig\"",[],[],null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":337,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["SELECT * FROM \"oc_appconfig\"",[],[],null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":377,"function":"executeQuery","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":421,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":187,"function":"loadConfigValues","class":"OC\\AppConfig","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":377,"function":"getApps","class":"OC\\AppConfig","type":"->","args":[]},{"file":"/var/www/html/lib/private/App/AppManager.php","line":128,"function":"getValues","class":"OC\\AppConfig","type":"->","args":[false,"enabled"]},{"file":"/var/www/html/lib/private/App/AppManager.php","line":149,"function":"getInstalledAppsValues","class":"OC\\App\\AppManager","type":"->","args":[]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":231,"function":"getInstalledApps","class":"OC\\App\\AppManager","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php","line":90,"function":"getEnabledApps","class":"OC_App","type":"::","args":[]},{"file":"/var/www/html/lib/base.php","line":700,"function":"runInitialRegistration","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->","args":[]},{"file":"/var/www/html/lib/base.php","line":1200,"function":"init","class":"OC","type":"::","args":[]},{"file":"/var/www/html/remote.php","line":119,"args":["/var/www/html/lib/base.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/DB/Connection.php","Line":139,"CustomMessage":"Exception thrown: Doctrine\\DBAL\\Exception"}}
{"reqId":"2aWPEHteGwbI9iFY9Lps","level":3,"time":"2024-02-06T15:45:25+00:00","remoteAddr":"192.168.178.146","user":"--","app":"core","method":"PROPFIND","url":"/remote.php/dav/files/xxxxxxx/SofortUpload/Pictures/2024/01","message":"Exception thrown: Doctrine\\DBAL\\Exception","userAgent":"--","version":"28.0.1.1","exception":{"Exception":"Doctrine\\DBAL\\Exception","Message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] connection to server at \"postgres\" (172.19.0.3), port 5432 failed: FATAL:  password authentication failed for user \"oc_rene-next\"","Code":7,"Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1654,"function":"connect","class":"OC\\DB\\Connection","type":"->","args":[]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1081,"function":"getWrappedConnection","class":"Doctrine\\DBAL\\Connection","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":261,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT * FROM \"oc_appconfig\"",[],[],null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":337,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["SELECT * FROM \"oc_appconfig\"",[],[],null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":377,"function":"executeQuery","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":421,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":187,"function":"loadConfigValues","class":"OC\\AppConfig","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":377,"function":"getApps","class":"OC\\AppConfig","type":"->","args":[]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":734,"function":"getValues","class":"OC\\AppConfig","type":"->","args":[false,"installed_version"]},{"file":"/var/www/html/lib/private/TemplateLayout.php","line":236,"function":"getAppVersions","class":"OC_App","type":"::","args":[]},{"file":"/var/www/html/lib/private/legacy/OC_Template.php","line":142,"function":"__construct","class":"OC\\TemplateLayout","type":"->","args":["error",""]},{"file":"/var/www/html/lib/private/Template/Base.php","line":132,"function":"fetchPage","class":"OC_Template","type":"->","args":[]},{"file":"/var/www/html/lib/private/legacy/OC_Template.php","line":291,"function":"printPage","class":"OC\\Template\\Base","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":88,"function":"printExceptionErrorPage","class":"OC_Template","type":"::","args":[["Doctrine\\DBAL\\Exception"],500]},{"file":"/var/www/html/remote.php","line":174,"function":"handleException","args":[["Doctrine\\DBAL\\Exception"]]}],"File":"/var/www/html/lib/private/DB/Connection.php","Line":139,"CustomMessage":"Exception thrown: Doctrine\\DBAL\\Exception"}}
{"reqId":"Xnn5IvHaZ2kUax17Ql0Q","level":3,"time":"2024-02-06T15:45:28+00:00","remoteAddr":"192.168.178.146","user":"--","app":"remote","method":"PROPFIND","url":"/remote.php/dav/files/rene-next/SofortUpload","message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] connection to server at \"postgres\" (172.19.0.3), port 5432 failed: FATAL:  password authentication failed for user \"oc_rene-next\"","userAgent":"--","version":"28.0.1.1","exception":{"Exception":"Doctrine\\DBAL\\Exception","Message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] connection to server at \"postgres\" (172.19.0.3), port 5432 failed: FATAL:  password authentication failed for user \"oc_rene-next\"","Code":7,"Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1654,"function":"connect","class":"OC\\DB\\Connection","type":"->","args":[]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1081,"function":"getWrappedConnection","class":"Doctrine\\DBAL\\Connection","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":261,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT * FROM \"oc_appconfig\"",[],[],null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":337,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["SELECT * FROM \"oc_appconfig\"",[],[],null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":377,"function":"executeQuery","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":421,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":187,"function":"loadConfigValues","class":"OC\\AppConfig","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":377,"function":"getApps","class":"OC\\AppConfig","type":"->","args":[]},{"file":"/var/www/html/lib/private/App/AppManager.php","line":128,"function":"getValues","class":"OC\\AppConfig","type":"->","args":[false,"enabled"]},{"file":"/var/www/html/lib/private/App/AppManager.php","line":149,"function":"getInstalledAppsValues","class":"OC\\App\\AppManager","type":"->","args":[]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":231,"function":"getInstalledApps","class":"OC\\App\\AppManager","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php","line":90,"function":"getEnabledApps","class":"OC_App","type":"::","args":[]},{"file":"/var/www/html/lib/base.php","line":700,"function":"runInitialRegistration","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->","args":[]},{"file":"/var/www/html/lib/base.php","line":1200,"function":"init","class":"OC","type":"::","args":[]},{"file":"/var/www/html/remote.php","line":119,"args":["/var/www/html/lib/base.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/DB/Connection.php","Line":139,"message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] connection to server at \"postgres\" (172.19.0.3), port 5432 failed: FATAL:  password authentication failed for user \"oc_rene-next\"","exception":{},"CustomMessage":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] connection to server at \"postgres\" (172.19.0.3), port 5432 failed: FATAL:  password authentication failed for user \"oc_rene-next\""}}
{"reqId":"Xnn5IvHaZ2kUax17Ql0Q","level":3,"time":"2024-02-06T15:45:28+00:00","remoteAddr":"192.168.178.146","user":"--","app":"core","method":"PROPFIND","url":"/remote.php/dav/files/rene-next/SofortUpload","message":"Exception thrown: Doctrine\\DBAL\\Exception","userAgent":"--","version":"28.0.1.1","exception":{"Exception":"Doctrine\\DBAL\\Exception","Message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] connection to server at \"postgres\" (172.19.0.3), port 5432 failed: FATAL:  password authentication failed for user \"oc_rene-next\"","Code":7,"Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1654,"function":"connect","class":"OC\\DB\\Connection","type":"->","args":[]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1081,"function":"getWrappedConnection","class":"Doctrine\\DBAL\\Connection","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":261,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT * FROM \"oc_appconfig\"",[],[],null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":337,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["SELECT * FROM \"oc_appconfig\"",[],[],null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":377,"function":"executeQuery","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":421,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":187,"function":"loadConfigValues","class":"OC\\AppConfig","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":377,"function":"getApps","class":"OC\\AppConfig","type":"->","args":[]},{"file":"/var/www/html/lib/private/App/AppManager.php","line":128,"function":"getValues","class":"OC\\AppConfig","type":"->","args":[false,"enabled"]},{"file":"/var/www/html/lib/private/App/AppManager.php","line":149,"function":"getInstalledAppsValues","class":"OC\\App\\AppManager","type":"->","args":[]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":231,"function":"getInstalledApps","class":"OC\\App\\AppManager","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php","line":90,"function":"getEnabledApps","class":"OC_App","type":"::","args":[]},{"file":"/var/www/html/lib/base.php","line":700,"function":"runInitialRegistration","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->","args":[]},{"file":"/var/www/html/lib/base.php","line":1200,"function":"init","class":"OC","type":"::","args":[]},{"file":"/var/www/html/remote.php","line":119,"args":["/var/www/html/lib/base.php"],"function":"require_once"}],"File":"/var/www/html/lib/private/DB/Connection.php","Line":139,"CustomMessage":"Exception thrown: Doctrine\\DBAL\\Exception"}}
{"reqId":"Xnn5IvHaZ2kUax17Ql0Q","level":3,"time":"2024-02-06T15:45:28+00:00","remoteAddr":"192.168.178.146","user":"--","app":"core","method":"PROPFIND","url":"/remote.php/dav/files/rene-next/SofortUpload","message":"Exception thrown: Doctrine\\DBAL\\Exception","userAgent":"--","version":"28.0.1.1","exception":{"Exception":"Doctrine\\DBAL\\Exception","Message":"Failed to connect to the database: An exception occurred in the driver: SQLSTATE[08006] [7] connection to server at \"postgres\" (172.19.0.3), port 5432 failed: FATAL:  password authentication failed for user \"oc_rene-next\"","Code":7,"Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1654,"function":"connect","class":"OC\\DB\\Connection","type":"->","args":[]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Connection.php","line":1081,"function":"getWrappedConnection","class":"Doctrine\\DBAL\\Connection","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":261,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT * FROM \"oc_appconfig\"",[],[],null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":337,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["SELECT * FROM \"oc_appconfig\"",[],[],null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":377,"function":"executeQuery","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":421,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":187,"function":"loadConfigValues","class":"OC\\AppConfig","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":377,"function":"getApps","class":"OC\\AppConfig","type":"->","args":[]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":734,"function":"getValues","class":"OC\\AppConfig","type":"->","args":[false,"installed_version"]},{"file":"/var/www/html/lib/private/TemplateLayout.php","line":236,"function":"getAppVersions","class":"OC_App","type":"::","args":[]},{"file":"/var/www/html/lib/private/legacy/OC_Template.php","line":142,"function":"__construct","class":"OC\\TemplateLayout","type":"->","args":["error",""]},{"file":"/var/www/html/lib/private/Template/Base.php","line":132,"function":"fetchPage","class":"OC_Template","type":"->","args":[]},{"file":"/var/www/html/lib/private/legacy/OC_Template.php","line":291,"function":"printPage","class":"OC\\Template\\Base","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":88,"function":"printExceptionErrorPage","class":"OC_Template","type":"::","args":[["Doctrine\\DBAL\\Exception"],500]},{"file":"/var/www/html/remote.php","line":174,"function":"handleException","args":[["Doctrine\\DBAL\\Exception"]]}],"File":"/var/www/html/lib/private/DB/Connection.php","Line":139,"CustomMessage":"Exception thrown: Doctrine\\DBAL\\Exception"}}```

At the moment those db connection errors are not surprising since the db container logs indicate postgreSQL isn’t even starting. So you may be chasing two layers of issues. Or maybe the original issue was still postgreSQL, such as if the db data was lost.

Okay, I’ll start over and copy the important data from the nc-data to the new instance.

Before I start: Do you have any tips for improving my compose file?
You said I should not specify users there ?
I would like to use postgres, redis and my dockerfile as usual

version: '3.8'

services:
  nextcloud:
    image: nextcloud-custom-28:latest
    container_name: nextcloud-zwei
    hostname: nextcloud-server-zwei
    volumes:
      - /home/docker-projects/nextcloud-zwei/nc-data:/var/www/html
    restart: always
    environment:
      - POSTGRES_HOST=postgres-zwei
      - POSTGRES_DB=nextcloud_zwei
      - POSTGRES_USER=nextcloud_zwei
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
      - REDIS_HOST=redis-zwei
      - PHP_MEMORY_LIMIT=1024M
      - NEXTCLOUD_TRUSTED_DOMAINS=${EXTCLOUD_TRUSTED_DOMAINS}
      - NEXTCLOUD_ADMIN_USER=${NEXTCLOUD_ADMIN_USER}
      - NEXTCLOUD_ADMIN_PASSWORD=${NEXTCLOUD_ADMIN_PASSWORD}
      - NEXTCLOUD_DEFAULT_PHONE_REGION=DE
    ports:
      - "8822:80"
    depends_on:
      - postgres-zwei
      - redis-zwei

  postgres-zwei:
    image: postgres:latest
    restart: always
    environment:
      - POSTGRES_DB=nextcloud_zwei
      - POSTGRES_USER=nextcloud_zwei
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
    hostname: nextcloud-db-zwei
    container_name: nextcloud-db-zwei
    volumes:
      - /home/docker-projects/nextcloud-zwei/postgres-data:/var/lib/postgresql/data

  redis-zwei:
    image: redis:alpine
    restart: always
    hostname: nextcloud-redis-zwei
    container_name: nextcloud-redis-zwei