Reputation: 114
I have running Nextcloud in docker-compose from this example docker-compose
sudo docker compose exec --user www-data app php occ -V
Nextcloud 26.0.3
sudo docker compose exec --user www-data app php occ app:list
- documentserver_community: 0.1.13
- onlyoffice: 7.8.0
OnlyOffice and Community Document work fine without SSL certificate
After that, I generate signed SSL certificate
OnlyOffice and Community Document work fine with signed SSL certificate
But in my case, I need to work with self-signed SSL certificate
But I still have the problem
sudo docker compose exec --user www-data app php occ onlyoffice:documentserver --check
Error connection: cURL error 7: Failed to connect to localhost port 443: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://localhost/apps/documentserver_community/healthcheck
curl --insecure https://localhost/apps/documentserver_community/healthcheck
true
I try to add to nextcloud/config/config.php
'onlyoffice' =>array(
'verify_peer_off'=>true
),
and also try add my certificate to nextcloud
sudo docker compose exec --user www-data app php occ security:certificates
+---------------+-------------+--------------------------+----------------+-----------+
| File Name | Common Name | Organization | Valid Until | Issued By |
+---------------+-------------+--------------------------+----------------+-----------+
| localhost.crt | | Internet Widgits Pty Ltd | March 12, 2029 | |
+---------------+-------------+--------------------------+----------------+-----------+
Upvotes: 0
Views: 908
Reputation: 17
Log into your onlyoffice container with:
docker exec -it <container> bash
and edit the config file /etc/onlyoffice/documentserver/default.json
. Find the entry "rejectUnauthorized": true
and set it to false
:
},
"requestDefaults": {
"rejectUnauthorized": false
}
After that, exit and restart container:
docker container <container> stop && docker container <container> start
ATTENTION: The Parameter must be set to true (not 'false')! It's a little bit confusing at this point.
The more elegant way is it to start the container directly with the parameter
-e USE_UNAUTHORIZED_STORAGE=true
. Example:
docker run -i -t -d -p 8888:80 -p 8443:443 --name=onlyoffice --restart=always -e USE_UNAUTHORIZED_STORAGE=true onlyoffice/documentserver:latest
Upvotes: 0