Nextcloud using https, onlyoffice using http not working

I have nextcloud and onlyoffice running on the same server. Nextcloud is configured to use https, onlyoffice uses http.

If I revert nextcloud to http everything works ok but I want to use https to connect to my nextcloud.

I’ve tried everything I can find in the forums but witout success. See configuration below.

Any assistance would be greatly appreciated.

Server configuration detail

Operating system: Linux 5.3.0-40-generic #32~18.04.1-Ubuntu SMP Mon Feb 3 14:05:59 UTC 2020 x86_64

Webserver: nginx/1.14.0 (fpm-fcgi)

Database: mysql 8.0.19

PHP version: 7.3.15-3+ubuntu18.04.1+deb.sury.org+1

Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, sodium, session, standard, cgi-fcgi, mysqlnd, PDO, xml, bz2, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, iconv, igbinary, imagick, intl, json, exif, msgpack, mysqli, pdo_mysql, Phar, posix, readline, redis, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, zip, memcached, Zend OPcache

Nextcloud version: 18.0.1 - 18.0.1.3

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from: unknown

Signing status

Array
(
)

List of activated apps
Enabled:
 - accessibility: 1.4.0
 - activity: 2.11.0
 - bruteforcesettings: 1.5.0
 - calendar: 2.0.1
 - cloud_federation_api: 1.1.0
 - comments: 1.8.0
 - contacts: 3.1.8
 - dav: 1.14.0
 - deck: 0.8.0
 - federatedfilesharing: 1.8.0
 - federation: 1.8.0
 - files: 1.13.1
 - files_pdfviewer: 1.7.0
 - files_rightclick: 0.15.2
 - files_sharing: 1.10.1
 - files_trashbin: 1.8.0
 - files_versions: 1.11.0
 - files_videoplayer: 1.7.0
 - firstrunwizard: 2.7.0
 - groupfolders: 6.0.1
 - logreader: 2.3.0
 - lookup_server_connector: 1.6.0
 - mail: 1.1.2
 - nextcloud_announcements: 1.7.0
 - notes: 3.1.5
 - notifications: 2.6.0
 - oauth2: 1.6.0
 - onlyoffice: 4.1.4
 - password_policy: 1.8.0
 - photos: 1.0.0
 - privacy: 1.2.0
 - provisioning_api: 1.8.0
 - recommendations: 0.6.0
 - serverinfo: 1.8.0
 - settings: 1.0.0
 - sharebymail: 1.8.0
 - support: 1.1.0
 - survey_client: 1.6.0
 - systemtags: 1.8.0
 - tasks: 0.11.3
 - text: 2.0.0
 - theming: 1.9.0
 - twofactor_backupcodes: 1.7.0
 - updatenotification: 1.8.0
 - viewer: 1.2.0
 - workflowengine: 2.0.0
Disabled:
 - admin_audit
 - encryption
 - files_external
 - spreed
 - user_ldap

Configuration (config/config.php)
{
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "localhost",
        "shazjon.hopto.org",
        "192.168.1.101"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "mysql",
    "version": "18.0.1.3",
    "overwrite.cli.url": "https:\/\/shazjon.hopto.org:443",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "mysql.utf8mb4": true,
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "preview_max_x": "2048",
    "preview_max_y": "2048",
    "jpeg_quality": "60",
    "mail_smtpmode": "smtp",
    "mail_smtpsecure": "tls",
    "mail_sendmailmode": "smtp",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpauthtype": "LOGIN",
    "mail_smtpauth": 1,
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "onlyoffice": {
        "verify_peer_off": true
    }
}

External storages: files_external is disabled

Encryption: no

User-backends:

  • OC\User\Database

Browser: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.122 Safari/537.36

My understanding is, OnlyOffice - in any of its flavours - has to be properly SSL’d for Nextcloud to connect to it…

In the admin area at OnlyOffice you have to change the service address for document processing to “https”.

Thanks for the replies, I’ll have to work out how to SSL onlyoffice

Wherever you use onlyoffice, at least the non-php version, there is a file default.json in /etc/onlyoffice/documentserver. In that file is is key: “rejectUnauthorized”: true

Set that to false.

This should only be used as a temporary fix for testing. I found it simply a lot easier just to assign a FQDN to the installation and letting let’sencrypt do it’s thing.