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 | |
+---------------+-------------+--------------------------+----------------+-----------+
1st way
Log into your onlyoffice container with:
and edit the config file
/etc/onlyoffice/documentserver/default.json. Find the entry"rejectUnauthorized": trueand set it tofalse:After that, exit and restart container:
2nd way
The more elegant way is it to start the container directly with the parameter
-e USE_UNAUTHORIZED_STORAGE=true. Example: