From 2c1386a651da439a0513516beeb567fd7b1d8420 Mon Sep 17 00:00:00 2001 From: Administrator Date: Mon, 1 Jul 2019 15:02:37 +0000 Subject: [PATCH] docs: create nextcloud-collabora --- nextcloud-collabora.md | 90 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 nextcloud-collabora.md diff --git a/nextcloud-collabora.md b/nextcloud-collabora.md new file mode 100644 index 0000000..19c82c3 --- /dev/null +++ b/nextcloud-collabora.md @@ -0,0 +1,90 @@ +--- +title: Nextcloud & Collabora +description: How to configure a properly working setup using Traefik +published: true +date: 2019-07-01T15:02:23.722Z +tags: +--- + +# Requirements + +Our setup relies heavily on `traefik` and won't work without it. See our traefik configuration page on how to prepare your system to accept this configuration. + +# docker-compose.yml + +``` +version: '3.7' + +services: + + nextcloud: + image: nextcloud:16 + depends_on: + - postgres + - collabora + - redis + volumes: + - ./nextcloud:/var/www/html + restart: unless-stopped + environment: + - NEXTCLOUD_TRUSTED_DOMAINS=cloud.fosc.space + - POSTGRES_HOST=postgres + - POSTGRES_USER=postgres + - POSTGRES_PASSWORD=aaaaaaaaaaaaa + - POSTGRES_DB=nextcloud + - REDIS_HOST=redis + labels: + - "traefik.frontend.rule=Host:cloud.fosc.space" + - "traefik.frontend.headers.STSSeconds=15552000" + - "traefik.frontend.redirect.regex=https://(.*)/.well-known/(card|cal)dav" + - "traefik.frontend.redirect.replacement=https://$$1/remote.php/dav/" + - "traefik.frontend.redirect.permanent=true" + + postgres: + image: postgres:alpine + restart: unless-stopped + environment: + - POSTGRES_USER=postgres + - POSTGRES_PASSWORD=aaaaaaaaaaaaa + volumes: + - ./db:/var/lib/postgresql/data + labels: + - traefik.enable=false + + collabora: + image: collabora/code + restart: unless-stopped + environment: + - username=admin + - password=Collaboracasta2019 + - DONT_GEN_SSL_CERT=true + - "domain=cloud\\.fosc\\.space" + - "extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:storage.wopi.host[0]=::ffff:[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+ --o:net.post_allow.host[0]=::ffff:[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+ --o:storage.wopi.host[1]=[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+ --o:net.post_allow.host[1]=[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+ --o:storage.wopi.host[2]=cloud.fosc.space" + labels: + - "traefik.frontend.rule=Host:collabora.fosc.space" + - "traefik.port=9980" + + redis: + image: redis + restart: unless-stopped + labels: + - traefik.enable=false +``` + +# Nextcloud configuration +Once everything is up and running, install the Collabora plugin for Nextcloud and configure the following in its settings page: + +> URL (and Port) of Collabora Online-server: +`https://collabora.fosc.space:443` +{.is-info} + +# Quirks +> Due to issues within Nextcloud 16, the installer cannot initialize its database properly in postgres. This setup requires a workaround for a first start, a pre existing database, or another database engine. + + +> The Collabora container is extremely slow to start and seems to work about only half the time. If stuff isn't working, just restart it once or twice. Eventually it will work. + +>This configuration is 100% working and any attempt at touching it will just make it worse. +{.is-warning} + +