# Docker-compose examples \[redis, collabora, letsencrypt\]

**URL:** <https://help.nextcloud.com/t/docker-compose-examples-redis-collabora-letsencrypt/4245>\
**Category:** 📦 Appliances (Docker, Snappy, VM, NCP, AIO)\
**Created:** [October 17, 2016, 8:55am UTC](https://help.nextcloud.com/t/docker-compose-examples-redis-collabora-letsencrypt/4245 "2016-10-17T08:55:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Snowyo](https://help.nextcloud.com/user_avatar/help.nextcloud.com/snowyo/32/631_2.png) [@Snowyo](https://help.nextcloud.com/u/Snowyo)\
**Post date:** [October 17, 2016, 8:55am UTC](https://help.nextcloud.com/t/docker-compose-examples-redis-collabora-letsencrypt/4245/1 "2016-10-17T08:55:13Z")

</div>

Hello,

starting with the great [work](https://github.com/indiehosters/nextcloud) of @pierreozoux, I’ve put together a few docker-compose examples for nextcloud installations with different additional containers. All examples use the [official nextcloud docker container](https://hub.docker.com/r/indiehosters/nextcloud/).

- minimal example
- reverse proxy + letsencrypt
- redis
- collabora

I’m planning to add more examples (for example [wonderfalls AiO](https://hub.docker.com/r/wonderfall/nextcloud/) container) in the future.

I hope I can help a few people to get started with their dockerized nextcloud installation. 🙂

Here’s my Github:

> **[SnowMB/nextcloud](https://github.com/SnowMB/nextcloud)**
>
> nextcloud - Nextcloud docker-compose examples

---

<div class="post-metadata">

**Author:** ![amitkumarj441](https://help.nextcloud.com/user_avatar/help.nextcloud.com/amitkumarj441/32/1384_2.png) [@amitkumarj441](https://help.nextcloud.com/u/amitkumarj441)\
**Post date:** [October 17, 2016, 12:25pm UTC](https://help.nextcloud.com/t/docker-compose-examples-redis-collabora-letsencrypt/4245/2 "2016-10-17T12:25:22Z")

</div>

Hey @Snowyo,

That’s really great!  
I’m an intermediate hacker in docker and an open source contributor to Mozilla, Fedora, Docker and KDE.  
I would like to contribute to dockerized nextcloud, Please let me know the pending issues/backlogs so that I can assist this part as a contributor.

Cheers,  
Amit Kumar Jaiswal

---

<div class="post-metadata">

**Author:** ![Snowyo](https://help.nextcloud.com/user_avatar/help.nextcloud.com/snowyo/32/631_2.png) [@Snowyo](https://help.nextcloud.com/u/Snowyo)\
**Post date:** [October 17, 2016, 12:46pm UTC](https://help.nextcloud.com/t/docker-compose-examples-redis-collabora-letsencrypt/4245/3 "2016-10-17T12:46:20Z")

</div>

Hey @amitkumarj441,

Your work would be very welcome. The official repository is [here](https://github.com/nextcloud/docker). @pierreozoux submitted a PR to the official docker images repo. There are no official recommendations/examples for docker-compose, so I made my own.

The biggest problem I’m facing right now is the best way to include cronjobs to the setup. There are 3 possibilities that all have there downsides. Maybe you have a word on that?

- Run Cron on host -\> very “ugly” solution in my eyes. It requires additional configuration on the host and depends on that to run properly.
- Start an extra container install docker and cron and run cron there. -\> as stated here [http://serverfault.com/a/799596](http://serverfault.com/a/799596)
- Use supervisor (or anything similar) to run cron and nextcloud in one container -\> feels like the cleanest solution to me. It violates one process per container but keeps the dependencies together.

I made a container for the 3rd solution based on the official image here: [https://github.com/SnowMB/docker](https://github.com/SnowMB/docker)

Any words on that? 🙂

---

<div class="post-metadata">

**Author:** ![pierreozoux](https://help.nextcloud.com/user_avatar/help.nextcloud.com/pierreozoux/32/49990_2.png) [@pierreozoux](https://help.nextcloud.com/u/pierreozoux)\
**Post date:** [October 17, 2016, 5:15pm UTC](https://help.nextcloud.com/t/docker-compose-examples-redis-collabora-letsencrypt/4245/4 "2016-10-17T17:15:21Z")

</div>

> [@Snowyo](#):
>
> Start an extra container install docker and cron and run cron there. -\> as stated here [cron - Docker: Run Cronjob for different Container - Server Fault](http://serverfault.com/a/799596)

As discussed [here](https://github.com/indiehosters/nextcloud/issues/3), I do it slightly differently, it is just an extra container, but it doesn’t need docker and cron installed inside.

---

<div class="post-metadata">

**Author:** ![skepticatgit](https://help.nextcloud.com/letter_avatar/skepticatgit/32/6_449c533f586939b6e5f246632a46421f.png) [@skepticatgit](https://help.nextcloud.com/u/skepticatgit)\
**Post date:** [August 14, 2017, 2:25pm UTC](https://help.nextcloud.com/t/docker-compose-examples-redis-collabora-letsencrypt/4245/5 "2017-08-14T14:25:19Z")

</div>

Hi @Snowyo ,

EDIT: solved it for now - needed to run with `root` db credential on the first launch… However I don’t know how to replace not maintained `alastaircoote/docker-letsencrypt-nginx-proxy-companion` with `jrcs/letsencrypt-nginx-proxy-companion` without breaking the install. I’m getting error 503 now…

I am trying to deploy your docker-compose with letsencrypt but running into an issue with 16.04 LTS VM.  
I get this error in the browser `App directory "/var/www/html/custom_apps" not found! Please put the Nextcloud apps folder in the Nextcloud folder or the folder above. You can also configure the location in the config.php file`.

I am using your .env, [install.sh](http://install.sh) and nginx.conf. What do I need to update to make this work? Is it on line 57 in docker-compose.yml?  
`volumes: - ./nextcloud/apps:/var/www/html/apps` I believe `apps` should be `custom_apps`.

Also I am getting the db connection error after I fixed the `apps` above: `SQLSTATE[HY000][1045] access denied for user nextcloud@x.x.x.x (using password: YES)`

I am providing this info  
Database Server: db:3306  
Login: nextcloud  
Password:   
Database Name: nextcloud

Thank you in advance for your assistance.

---

<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:** [November 6, 2024, 8:51pm UTC](https://help.nextcloud.com/t/docker-compose-examples-redis-collabora-letsencrypt/4245/6 "2024-11-06T20:51:57Z")

</div>

wwe: close old topics

---

<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:** [December 9, 2024, 1:10pm UTC](https://help.nextcloud.com/t/docker-compose-examples-redis-collabora-letsencrypt/4245/7 "2024-12-09T13:10:41Z")

</div>


