docker-nextcloud-collabora-postgresql-letsencrypt
docker-nextcloud-collabora-postgresql-letsencrypt copied to clipboard
Docker-compose based NextCloud installation with LetsEncrypt SSL, PostgreSQL backend, Collabora online office, supervisord cron
= NextCloud on Docker with LetsEncrypt SSL, PostgreSQL backend, Collabora online office, Cron support
In my perception the official examples did not provide a working home production ready Docker example to host a private NextCloud on your own server.
Features
- PostgreSQL backend and nginx Frontend: Based on link:https://github.com/nextcloud/docker/blob/master/.examples/docker-compose/with-nginx-proxy/postgres/apache/docker-compose.yml[NextCloud PostgreSQL Apache example]
- link:https://github.com/nextcloud/docker/blob/master/.examples/dockerfiles/cron/apache/supervisord.conf[Cron-based background Tasks using supervisord]
- Letsencrypt SSL https-support
- Working https://github.com/nextcloud/docker/pull/630[Collabora Online Office (CODE) integration]
How to get it running
To get this running, have an installed docker-compose available and:
- register two dynamic domains i.e. at https://freedns.org
- one for your nextcloud:
mynextcloud.mooo.com - one only to host Collabora:
myoffice.mooo.com
- publicly expose TCP port 80 & 443 of your host in router
- Adjust all
pass:[[##VALUES##]]in the files:docker-compose.ymlanddb.env - Optional: I added/adjusted my
/etc/docker/daemon.jsto define a custom data storage location:{ "data-root": "/srv/dockerdata" }and restarted the docker daemon - Run
sudo docker-compose up --build - Activate Collabora plugin in NextCloud und define pass:[https://[##myoffice.mooo.com##]] as URL. Ignore the Saved with error: Collabora Online should use the same protocol as the server installation message.
- For now and https://github.com/nextcloud/docker/pull/819[until the merge request #819] is merged into upstream you need to run
sudo docker-compose exec --user www-data app php occ config:system:set overwriteprotocol --value="https"once or you will have problems to login i.e. via the Android app as described in my https://github.com/nextcloud/android/issues/4786[ticket for the Android app]
How to upgrade & rebuild your installation
Simply do the following. Due to the persistent Docker volumes this will retain all your data and even your running login sessions.
$ sudo docker-compose down
$ sudo docker-compose build --pull
$ sudo docker-compose up -d
I'm not sure, but after major release upgrade a subsequent sudo docker-compose exec --user www-data app php occ db:add-missing-indices might be necessary or not. At least it won't hurt.
Versions
2020-02-07:: Fix access issues using the Android app due to missing overwriteprotocol setting to https
2019-12-09:: Got Collabora CODE Integration working
2019-11-01:: Initial running version