# Datadir not there

**URL:** <https://help.nextcloud.com/t/datadir-not-there/220901>\
**Category:** ℹ️ Support\
**Tags:** docker, docker\_101, aio, cloudflare\
**Created:** [March 23, 2025, 5:59pm UTC](https://help.nextcloud.com/t/datadir-not-there/220901 "2025-03-23T17:59:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jumima68](https://help.nextcloud.com/user_avatar/help.nextcloud.com/jumima68/32/70405_2.png) [@Jumima68](https://help.nextcloud.com/u/Jumima68)\
**Post date:** [March 23, 2025, 5:59pm UTC](https://help.nextcloud.com/t/datadir-not-there/220901/1 "2025-03-23T17:59:01Z")

</div>

## The Basics

- Nextcloud Server version _(e.g., 29.x.x)_:
  - `10.7.0`

- Operating system and version _(e.g., Ubuntu 24.04)_:
  - `Debian`

- Web server and version _(e.g, Apache 2.4.25)_:
  - `Latest Docker container`

- Reverse proxy and version \_(e.g. nginx 1.27.2)
  - `Latest Docker container`

- PHP version _(e.g, 8.3)_:
  - `Latest Docker container`

- Is this the first time you’ve seen this error? (Yes / No):
  - `Yes`

- When did this problem seem to first start?
  - `Today`

- Installation method _(e.g. AlO, NCP, Bare Metal/Archive, etc.)_
  - `Docker`

- Are you using CloudfIare, mod\_security, or similar? _(Yes / No)_
  - `Yes, cloudflare tunnel`

### Summary of the issue you are facing:

Basically my [nextcloud-aio-nextcloud] container fails to start, which causes some sub container to not start as well.

### Steps to replicate it (hint: details matter!):

1. Start all containers

### Log entries

#### Nextcloud

```auto
Connection to nextcloud-aio-database (172.18.0.3) 5432 port [tcp/postgresql] succeeded!

              now              

-------------------------------

 2025-03-23 17:12:05.067262+00

(1 row)

+ '[' -f /dev-dri-group-was-added ']'

++ find /dev -maxdepth 1 -mindepth 1 -name dri

+ '[' -n '' ']'

+ set +x

Connection to nextcloud-aio-redis (172.18.0.4) 6379 port [tcp/redis] succeeded!

Appdata is not present. Did you maybe change the datadir after the initial Nextcloud installation? This is not supported!

See https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir

If you adjusted the datadir to be located on an external drive, make sure that the drive is still mounted!

In the datadir was found:

total 4

drwxr-x--- 2 www-data root 40 Mar 23 17:12 .

drwxr-xr-x 1 root root 4096 Mar 23 16:47 ..

```

### Configuration

#### Nextcloud

```auto
services:
  app:
    image: nextcloud/all-in-one:latest
    restart: unless-stopped
    container_name: nextcloud-aio-mastercontainer
    volumes:
      - nextcloud_aio_mastercontainer:/mnt/docker-aio-config
      - //var/run/docker.sock:/var/run/docker.sock:ro
    ports:
      - 80:80
      - 8080:8080
      - 8443:8443
    environment:
      - APACHE_PORT=11000
      - APACHE_IP_BINDING=0.0.0.0
      - NEXTCLOUD_DATADIR=/run/desktop/mnt/host/d/ncdata

  tunnel:
    image: cloudflare/cloudflared:latest
    restart: unless-stopped
    command: tunnel run
    environment:
      - TUNNEL_TOKEN=

volumes:
  nextcloud_aio_mastercontainer:
    name: nextcloud_aio_mastercontainer

```

Additional info:  
I did not change the directory or change drives or anything, it was working before and now just stopped working.

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [March 24, 2025, 8:43am UTC](https://help.nextcloud.com/t/datadir-not-there/220901/2 "2025-03-24T08:43:50Z")

</div>

> [@Jumima68](#):
>
> `- NEXTCLOUD_DATADIR=/run/desktop/mnt/host/d/ncdata`

this doesn’t sound right - I bet you don’t have `/run/desktop..` in your AIO container. as you mount the mastercontainer volume into `/mnt/docker-aio-config` likely this is the value you want to use there…

Please familiarize yourself with [Docker volumes](https://docs.docker.com/engine/storage/volumes/)

---

<div class="post-metadata">

**Author:** ![szaimen](https://help.nextcloud.com/user_avatar/help.nextcloud.com/szaimen/32/63019_2.png) [@szaimen](https://help.nextcloud.com/u/szaimen)\
**Post date:** [March 24, 2025, 10:57am UTC](https://help.nextcloud.com/t/datadir-not-there/220901/3 "2025-03-24T10:57:53Z")

</div>

Hi, @wwe, please check [GitHub - nextcloud/all-in-one: 📦 The official Nextcloud installation method. Provides easy deployment and maintenance with most features included in this one Nextcloud instance.](https://github.com/nextcloud/all-in-one?tab=readme-ov-file#how-to-change-the-default-location-of-nextclouds-datadir). This is actually the correct apporach because the sibling nextcloud-aio-nextcloud container will have the chosen directory mounted as volume.

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [March 24, 2025, 12:09pm UTC](https://help.nextcloud.com/t/datadir-not-there/220901/4 "2025-03-24T12:09:41Z")

</div>

OMG I will never understand this tool! It’s really way too complicated for me.

but still wrong:

> [@Jumima68](#):
>
> `- NEXTCLOUD_DATADIR=/run/desktop/mnt/host/d/ncdata`

when the system is running

> [@Jumima68](#):
>
> Operating system and version _(e.g., Ubuntu 24.04)_:
> 
> - `Debian`

---

<div class="post-metadata">

**Author:** ![Jumima68](https://help.nextcloud.com/user_avatar/help.nextcloud.com/jumima68/32/70405_2.png) [@Jumima68](https://help.nextcloud.com/u/Jumima68)\
**Post date:** [April 26, 2025, 4:46pm UTC](https://help.nextcloud.com/t/datadir-not-there/220901/6 "2025-04-26T16:46:02Z")

</div>

So like what do I need to change now, in order that it mounts the right volume?

---

<div class="post-metadata">

**Author:** ![system](https://help.nextcloud.com/user_avatar/help.nextcloud.com/system/32/29333_2.png) [@system](https://help.nextcloud.com/u/system)\
**Post date:** [July 25, 2025, 4:46pm UTC](https://help.nextcloud.com/t/datadir-not-there/220901/7 "2025-07-25T16:46:19Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
