Nextcloud Exception: Not installed in /app/www/public/lib/base.php

I will try to provide as much detail as possible here. I created a docker compose file to use on my docker desktop in windows (with the portainer extension). I would like it to store the data in a folder that I can easily get to and backup. After deploying the compose file it lets me start the process but after I enter all the information including the SQL information I got an error saying Internal Server Error with a Request ID: 1YayrycNMIalptISGkwJ. I pulled up the logs and it showed me the following:

Exception: Not installed in /app/www/public/lib/base.php:284
Stack trace:
#0 /app/www/public/lib/base.php(715): OC::checkInstalled()
#1 /app/www/public/lib/base.php(1181): OC::init()
#2 /app/www/public/cron.php(58): require_once(‘…’)
#3 {main}

I am still learning about docker so perhaps I am making things more difficult than they need to be. I have also attached my compose file (with redactions) so there is as much information as possible.

version: "3"

services:
  # Defines the Nextcloud service
  nextcloud:
    image: linuxserver/nextcloud:latest
    container_name: nextcloud
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Boise
      - NEXTCLOUD_UPLOAD_LIMIT=20G
      - NEXTCLOUD_MAX_TIME=3000
      - NEXTCLOUD_MEMORY_LIMIT=4096M
      - MYSQL_HOST=nextcloud-db
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_PASSWORD=securepassword
    volumes:
      - config:/config
      - data:/data
    ports:
      - 443:443
    restart: unless-stopped
    networks:
      - bridge

  # Defines the database service for Nextcloud
  nextcloud-db:
    container_name: nextcloud-db
    image: mysql:latest
    restart: on-failure
    volumes:
      - sql:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=securepassword
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_PASSWORD=securepassword
    networks:
      - bridge

networks:
  bridge:

volumes:
  config:
    driver: local
    driver_opts:
      type: none
      o: bind
      device: "/host_mnt/c/NextCloud/Config"
  data:
    driver: local
    driver_opts:
      type: none
      o: bind
      device: "/host_mnt/c/NextCloud/Data"
  sql:
    driver: local
    driver_opts:
      type: none
      o: bind
      device: "/host_mnt/c/NextCloud/sql"

Update on this. I tried to simplify the script and have more information to add.

I am trying to create a Docker Compose file for Docker Desktop on Windows with WSL2. I am deploying the compose file with the Portainer extension. I would like to be able to access the storage from my windows instance so I can use some of my utilities for offsite backup. My Compose file looks like it works until I run the setup portion of it and then it gives me an error. Here is a copy of my compose file.

version: "3"

services:
  nextcloud:
    image: linuxserver/nextcloud:latest
    container_name: nextcloud
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Boise
    volumes:
      - config:/config
      - data:/data
    ports:
      - 443:443
    restart: unless-stopped
    networks:
      - network

  nextcloud-db:
    container_name: nextcloud-db
    image: mysql:8
    restart: on-failure
    volumes:
      - mysql_data:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=securepassord
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_PASSWORD=securepassword
    networks:
      - network

networks:
  network:
    driver: bridge

volumes:
  config: # Named volume for Nextcloud configuration files.
    driver: local # Managed by Docker's local volume driver.
    driver_opts: # Command to bind the Windows folder to the Linux server
      type: none
      o: bind
      device: "/host_mnt/c/NextCloud/Config"
  data: # Named volume for Nextcloud user data.
    driver: local # Managed by Docker's local volume driver.
    driver_opts: # Command to bind the Windows folder to the Linux server
      type: none
      o: bind
      device: "/host_mnt/c/NextCloud/Data"
  mysql_data:
    driver: local # Managed by Docker's local volume driver.
    driver_opts: # Command to bind the Windows folder to the Linux server
      type: none
      o: bind
      device: "/host_mnt/c/NextCloud/MySQL_Data"

The thing that seemed strange (but may be correct) is the volumes in the volume list are listed like nextcloud_config and not just config but I don’t know if that makes a difference or not. After I deploy the stack it looks like files go in the folders but not all the data ends up in there. Any ideas that I can try?

I’m just going to say up front, you’re using a big mix of things we just don’t test/support our containers on: Windows WSL2 / Docker Desktop / Portainer.

If you must use Windows as a host, you need to use Ubuntu in WSL2 then treat that as a ubuntu VM to install docker engine/compose.