04i
September 23, 2017, 7:40am
1
Hi,
I have issues to get nextcloud => Collabora to work
I have this setup:
I created the network nginx-proxy
Installed the base - reverse proxy (nginx-proxy) and letsencrypt (docker-letsencrypt-nginx-proxy-companion) with docker-compose and the following
.
version: '2'
services:
proxy:
image: jwilder/nginx-proxy
container_name: proxy
ports:
- 80:80
- 443:443
volumes:
- ./proxy/conf.d:/etc/nginx/conf.d
- ./proxy/vhost.d:/etc/nginx/vhost.d
- ./proxy/html:/usr/share/nginx/html
- ./proxy/certs:/etc/nginx/certs:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
networks:
- proxy-tier
restart: always
letsencrypt-companion:
image: alastaircoote/docker-letsencrypt-nginx-proxy-companion
container_name: letsencrypt-companion
volumes_from:
- proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./proxy/certs:/etc/nginx/certs:rw
restart: always
networks:
proxy-tier:
external:
name: nginx-proxy
3.Installed nextcloud using a postgreSQL DB (already existing)
.
sudo docker run --restart=always -d \
-v /data/disk1/nextcloud:/var/www/html \
--link postgres:postgres \
--net nginx-proxy \
-e VIRTUAL_HOST=nextcloud.mydomain.com \
-e VIRTUAL_NETWORK=nginx-proxy \
-e VIRTUAL_PORT=80 \
-e LETSENCRYPT_HOST=nextcloud.mydomain.com \
-e LETSENCRYPT_EMAIL=joacim@mydomain.com \
-e POSTGRES_DB=nextcloud \
-e POSTGRES_USER=nextcloud \
-e POSTGRES_PASSWORD=************ \
-e POSTGRES_HOST=192.168.1.20 \
-p 8080:80 \
nextcloud
nextcloud works fine (some finetuning still needed)
Then I install Collabora with
.
sudo docker run --restart=always -t -d \
--name=collabora \
--net nginx-proxy \
--cap-add MKNOD \
-e domain=nextcloud.mydomain.com \
-p 9980:9980 \
collabora/code
Then I enable Collabora app in nextcloud and set the URL to https://nextcloud.mydomain.com:9980
When accessing an office dokument in nextclooud I get āInternal Server Errorā but cannot see any valuable info in logs.
Do you have any hints on what could be wrong?
jonw
September 23, 2017, 8:47am
2
First you may wish to configure Nextcloud for logging if it isnāt already so. In config/config.php you can add lines such as:
āloglevelā => 2,
ālogfileā => ā/var/log/nginx/nextcloud/nextcloud.logā,
The file is in json format so it is not that easy to read. There is a notepad++ plugin I found useful. I was getting internal server error also due to:
cURL error 60: Peerās certificate has an invalid signature.
My certificate was self-signed. I tried various means to get curl to recognize my root authority without luck. And I suspected that curl was incapable of using SAN certificates. I didnāt feel like mucking about any more and reconfigured my nginx virtual host for both http and https. But the plugin will complain when you use http. It would have been good if there was a configuration option for the colabora App to tell curl to ignore certificate errors.
I still donāt have it working but I hope this helps you get past this problem.
04i
September 24, 2017, 10:53am
3
Thanks for your reply @jonw
I made another try where I had better luck earlier - using nextcloud-fpm instead of apache. The following steps was performed.
Created docker network nginx-proxy
Installed the base - reverse proxy (nginx-proxy) and letsencrypt (docker-letsencrypt-nginx-proxy-companion) with docker-compose and with the following content in docker-compose.yml
.
version: '2'
services:
proxy:
image: jwilder/nginx-proxy
container_name: proxy
ports:
- 80:80
- 443:443
volumes:
- /data/disk1/nginx/proxy/conf.d:/etc/nginx/conf.d
- /data/disk1/nginx/proxy/vhost.d:/etc/nginx/vhost.d
- /data/disk1/nginx/proxy/html:/usr/share/nginx/html
- /data/disk1/nginx/proxy/certs:/etc/nginx/certs:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
networks:
- proxy-tier
restart: always
letsencrypt-companion:
image: alastaircoote/docker-letsencrypt-nginx-proxy-companion
container_name: letsencrypt-companion
volumes_from:
- proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /data/disk1/nginx/proxy/certs:/etc/nginx/certs:rw
restart: always
networks:
proxy-tier:
external:
name: nginx-proxy
Executed # sudo docker-compose up
and let it settled (created all stuff)
Created a nginx.conf file at /data/disk1/nginx-nextcloud/nginx.conf
(in my setup) with the content taken from this https://github.com/nextcloud/docker/blob/master/.examples/nginx.conf
Created another docker-compose.yml for nextcloud + collabora with the following content (note that the database was created before):
.
version: '2'
services:
web:
image: nginx
container_name: nextcloud_webserver
volumes:
- /data/disk1/nginx-nextcloud/nginx.conf:/etc/nginx/nginx.conf:ro
links:
- app
- collabora
volumes_from:
- app
environment:
- VIRTUAL_HOST=office.mydomain.com
- VIRTUAL_NETWORK=nginx-proxy
- VIRTUAL_PORT=80
- LETSENCRYPT_HOST=office.mydomain.com
- LETSENCRYPT_EMAIL=joacim@mydomain.com
networks:
- proxy-tier
restart: always
app:
image: nextcloud:fpm
container_name: nextcloud_fpm
volumes:
- /data/disk1/nextcloud/apps:/var/www/html
environment:
- POSTGRES_DB=nextcloud
- POSTGRES_USER=nextcloud
- POSTGRES_PASSWORD=MyTopSecretDBPassword
- POSTGRES_HOST=192.168.1.20
networks:
- proxy-tier
restart: always
collabora:
image: collabora/code
container_name: collabora
cap_add:
- MKNOD
environment:
- domain=office.mydomain.com
networks:
- proxy-tier
restart: always
networks:
proxy-tier:
external:
name: nginx-proxy
Executed # sudo docker-compose up
on that
Waited a little bit and then started browser to āoffice.mydomain.com ā and it redirected to https://office.mydomain.com
Created an admin account
Went to Settings => Apps => Integration and enabled āCollabora Onlineā
Went to Settings => Admin => Collabora Online and entered the Collabora Online Server: https://office.mydomain.com and saved
Tested to open the default document About.odt and it works
Regards Joacim
1 Like