# Docker compose not working,trying to setup nextcloud

**URL:** <https://forums.docker.com/t/docker-compose-not-working-trying-to-setup-nextcloud/90520>\
**Category:** Docker Desktop\
**Created:** [March 13, 2020, 10:50am UTC](https://forums.docker.com/t/docker-compose-not-working-trying-to-setup-nextcloud/90520 "2020-03-13T10:50:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![erikthegamer1242](https://avatars.discourse-cdn.com/v4/letter/e/edb3f5/32.png) [@erikthegamer1242](https://forums.docker.com/u/erikthegamer1242)\
**Post date:** [March 13, 2020, 10:50am UTC](https://forums.docker.com/t/docker-compose-not-working-trying-to-setup-nextcloud/90520/1 "2020-03-13T10:50:00Z")

</div>

Hello, I’m new to docker and find it quite hard to learn…I am currently trying to setup nextcloud with mysql but am also adding nginx-reverse proxy and letsencrypt because I am not sure how to modify the .yml file.The guide I’m following: [https://blog.ssdnodes.com/blog/installing-nextcloud-docker/](https://blog.ssdnodes.com/blog/installing-nextcloud-docker/)  
The error:  
nextcloud-proxy is up-to-date  
Starting nextcloud-mariadb …  
Starting nextcloud-mariadb … error  
ERROR: for nextcloud-mariadb Cannot start service db: OCI runtime create failed: container\_linux.go:346: starting container process caused “process\_linux.go:449: container init caused “rootfs\_linux.go:58: mounting \”/etc/localtime\” to rootfs \"/var/lib/docker/overlay2/aa349bb52d1e7896f368c876b0715fd737263e33fdf90500dee7adc1c28eeb4d/merged\" at \"/var/lib/docker/overlay2/aa349bb52d1e7896f368c876b0715fd737263e33fdf90500dee7adc1c28eeb4d/merged/usr/share/zoneinfo/UCT\" caused \“not a directory\”"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

ERROR: for db Cannot start service db: OCI runtime create failed: container\_linux.go:346: starting container process caused “process\_linux.go:449: container init caused “rootfs\_linux.go:58: mounting \”/etc/localtime\” to rootfs \"/var/lib/docker/overlay2/aa349bb52d1e7896f368c876b0715fd737263e33fdf90500dee7adc1c28eeb4d/merged\" at \"/var/lib/docker/overlay2/aa349bb52d1e7896f368c876b0715fd737263e33fdf90500dee7adc1c28eeb4d/merged/usr/share/zoneinfo/UCT\" caused \“not a directory\”"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type  
ERROR: Encountered errors while bringing up the project.

The .yml file:  
version: ‘3’

services:

proxy:  
image: jwilder/nginx-proxy:alpine  
labels:  
- “com.github.jrcs.letsencrypt\_nginx\_proxy\_companion.nginx\_proxy=true”  
container\_name: nextcloud-proxy  
networks:  
- nextcloud\_network  
ports:  
- 80:80  
- 443:443  
volumes:  
- ./proxy/conf.d:/etc/nginx/conf.d:rw  
- ./proxy/vhost.d:/etc/nginx/vhost.d:rw  
- ./proxy/html:/usr/share/nginx/html:rw  
- ./proxy/certs:/etc/nginx/certs:ro  
- /etc/localtime:/etc/localtime:ro  
- /var/run/docker.sock:/tmp/docker.sock:ro  
restart: unless-stopped

letsencrypt:  
image: jrcs/letsencrypt-nginx-proxy-companion  
container\_name: nextcloud-letsencrypt  
depends\_on:  
- proxy  
networks:  
- nextcloud\_network  
volumes:  
- ./proxy/certs:/etc/nginx/certs:rw  
- ./proxy/vhost.d:/etc/nginx/vhost.d:rw  
- ./proxy/html:/usr/share/nginx/html:rw  
- /etc/localtime:/etc/localtime:ro  
- /var/run/docker.sock:/var/run/docker.sock:ro  
restart: unless-stopped

db:  
image: mariadb  
container\_name: nextcloud-mariadb  
networks:  
- nextcloud\_network  
volumes:  
- db:/var/lib/mysql  
- /etc/localtime:/etc/localtime:ro  
environment:  
- MYSQL\_ROOT\_PASSWORD=root  
- MYSQL\_PASSWORD=example  
- MYSQL\_DATABASE=cloudnext  
- MYSQL\_USER=nextcloud  
restart: unless-stopped

app:  
image: nextcloud:latest  
container\_name: nextcloud-app  
networks:  
- nextcloud\_network  
depends\_on:  
- letsencrypt  
- proxy  
- db  
volumes:  
- nextcloud:/d/Erik/Docker/containers/nextcloud/nextcloud/var/www/html  
- ./app/config:/d/Erik/Docker/containers/nextcloud/nextcloud/var/www/html/config  
- ./app/custom\_apps:/d/Erik/Docker/containers/nextcloud/nextcloud/var/www/html/custom\_apps  
- ./app/data:/d/Erik/Docker/containers/nextcloud/nextcloud/var/www/html/data  
- ./app/themes:/d/Erik/Docker/containers/nextcloud/nextcloud/var/www/html/themes  
- /etc/localtime:/etc/localtime:ro  
environment:  
- VIRTUAL\_HOST=nextcloud.pc.local  
- LETSENCRYPT\_HOST=nextcloud.pc.local  
- LETSENCRYPT\_EMAIL=example@mydomain.hr  
restart: unless-stopped

volumes:  
nextcloud:  
db:

networks:  
nextcloud\_network:

If possible I don’t need the reverse proxy or letsencrypt

---

<div class="post-metadata">

**Author:** ![tekki](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/tekki/32/21884_2.png) [@tekki](https://forums.docker.com/u/tekki)\
**Post date:** [March 14, 2020, 7:05am UTC](https://forums.docker.com/t/docker-compose-not-working-trying-to-setup-nextcloud/90520/2 "2020-03-14T07:05:00Z")

</div>

> [@erikthegamer1242](#):
>
> ```
> - /etc/localtime:/etc/localtime:ro
> 
> ```

There is no `/etc/localtime` on Windows. Delete these lines or comment them out.
