No declaration volume was found

Hello!

I created the following docker compose file:

version: “3.8” # Specify Docker Compose file version

services:
nextcloud:
image: nextcloud/all-in-one:latest
init: true
container_name: nextcloud-aio-mastercontainer
restart: always
ports:
- “80:80”
- “8080:8080”
- “8443:8443”
volumes:
- nextcloud_aio_mastercontainer:/mnt/docker-aio-config
- /var/run/docker.sock:/var/run/docker.sock:ro

but I get the next error message: Named volume “nextcloud_aio_mastercontainer:/mnt/docker-aio-config:rw” is used in service “nextcloud” but no declaration was found in the volumes section.

I thought: “Maybe if I add that volume in the ‘volumes’ section, it will run!” but it didn’t. I got the same error message. I’m a noob at all of this, so I’m sorry if this is really basic, or I did something else wrong. Thanks in advance.

Hi, see all-in-one/compose.yaml at main · nextcloud/all-in-one · GitHub

Thanks for the help. I used that file and it didn’t work yet. But I found another docker-compose file that says that you have to enable a database in order for this to work. I will try it out tomorrow and let you know my findings. Thanks for the link!

But I found another docker-compose file that says that you have to enable a database in order for this to work.

Don’t assume that other Compose files for other Docker images are the same. The AIO image deployment has the db in it.

Re-look at the link @szaimen sent. I think you’re missing lines 52-54.

1 Like