wiki/nextcloud-collabora.md

92 lines
2.7 KiB
Markdown
Raw Normal View History

2019-07-01 15:02:37 +00:00
---
title: Nextcloud & Collabora
description: How to configure a properly working setup using Traefik
published: true
2020-04-30 19:21:46 +00:00
date: 2020-04-30T19:21:45.022Z
2019-07-01 15:02:37 +00:00
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.
2020-02-04 21:43:56 +00:00
> This configuration hasn't been updated to Traefik v2 yet
{.is-warning}
2019-07-01 15:02:37 +00:00
# docker-compose.yml
```
version: '3.7'
services:
nextcloud:
2020-04-30 19:21:46 +00:00
image: nextcloud:18
2019-07-01 15:02:37 +00:00
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
2019-07-01 15:03:58 +00:00
- password=eeeeeeeeeeeee
2019-07-01 15:02:37 +00:00
- 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
> 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}