Nextcloud and onlyoffice docker with public addresses do not work together

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 27.1.0 (docker) + 25.0.12 deb
Operating system and version (eg, Ubuntu 20.04): debian 12
Apache or nginx version (eg, Apache 2.4.25): nginx
PHP version (eg, 7.4): 7.4

The issue you are facing:
Trying to connect onlyoffice docs (installed in a docker) with nextcloud, both services are on same server bit with different public addresses and ssl certificates. Both are working separately, but together only if I’m opening nextcloud from local network and enter local ip address of onlyoffice docs. Public address of onlyoffice is being saved but once you try to open any office file onlyoffice is starting but not opening the file and is showing an error message “Download failed”.

image

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. install nextcloud
  2. install onlyoffice in a container
  3. road first public address to nextcloud and get ssl certificate
  4. road second public address to onyloffice and get ssl certificate
  5. open nextcloud in local network
  6. save public address of onlyoffice server in nextcloud settings
  7. Try to open any office file

The output of your Nextcloud log in Admin > Logging:

This is the last error in the log, others are the same. The time is different from the last time I tried to open an office file.

Error	onlyoffice	Exception: Error occurred in the document service: Error while downloading the document file to be converted.
/var/www/html/custom_apps/onlyoffice/lib/DocumentService.php - line 95:

OCA\Onlyoffice\DocumentService->ProcessConvServResponceError("-4")

/var/www/html/custom_apps/onlyoffice/lib/Preview.php - line 269:

OCA\Onlyoffice\DocumentService->GetConvertedUri("http://127. ... g", "ods", "jpeg", "1411137661")

/var/www/html/lib/private/Preview/ProviderV1Adapter.php - line 53:

OCA\Onlyoffice\Preview->getThumbnail("Business model canvas.ods", 4096, 4096, false, [ "OC\\Files\\View"])

/var/www/html/lib/private/Preview/GeneratorHelper.php - line 64:

OC\Preview\ProviderV1Adapter->getThumbnail([ "OC\\Files\\Node\\File"], 4096, 4096)

/var/www/html/lib/private/Preview/Generator.php - line 397:

OC\Preview\GeneratorHelper->getThumbnail([ "OC\\Previ ... "], [ "OC\\Files\\Node\\File"], 4096, 4096)

/var/www/html/lib/private/Preview/Generator.php - line 373:

OC\Preview\Generator->generateProviderPreview([ "OC\\Files ... "], [ "OC\\Files\\Node\\File"], 4096, 4096, false, true, "application ... t", "")

/var/www/html/lib/private/Preview/Generator.php - line 166:

OC\Preview\Generator->getMaxPreview([ "OC\\Files ... "], [], [ "OC\\Files\\Node\\File"], "application ... t", "")

/var/www/html/lib/private/Preview/Generator.php - line 116:

OC\Preview\Generator->generatePreviews([ "OC\\Files\\Node\\File"], [ [ 250,250,false,"fill"]], "application ... t")

/var/www/html/lib/private/PreviewManager.php - line 192:

OC\Preview\Generator->getPreview([ "OC\\Files\\Node\\File"], 250, 250, false, "fill", null)

/var/www/html/core/Controller/PreviewController.php - line 144:

OC\PreviewManager->getPreview([ "OC\\Files\\Node\\File"], 250, 250, false, "fill")

/var/www/html/core/Controller/PreviewController.php - line 113:

OC\Core\Controller\PreviewController->fetchPreview([ "OC\\Files\\Node\\File"], 250, 250, true, false, "fill")

/var/www/html/lib/private/AppFramework/Http/Dispatcher.php - line 230:

OC\Core\Controller\PreviewController->getPreviewByFileId(42, 250, 250, true, false, "fill")

/var/www/html/lib/private/AppFramework/Http/Dispatcher.php - line 137:

OC\AppFramework\Http\Dispatcher->executeController([ "OC\\Core\ ... "], "getPreviewByFileId")

/var/www/html/lib/private/AppFramework/App.php - line 183:

OC\AppFramework\Http\Dispatcher->dispatch([ "OC\\Core\ ... "], "getPreviewByFileId")

/var/www/html/lib/private/Route/Router.php - line 315:

OC\AppFramework\App::main("OC\\Core\\C ... r", "getPreviewByFileId", [ "OC\\AppFr ... "], [ "core.Prev ... "])

/var/www/html/lib/base.php - line 1068:

OC\Route\Router->match("/core/preview")

/var/www/html/index.php - line 36:

OC::handleRequest()

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'instanceid' => 'ocuic1candoc',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'default_phone_region' => 'DE',
  'passwordsalt' => 'XXX'
  'secret' => 'XXX'
  'allow_local_remote_servers' => true,
  'trusted_domains' => 
  array (
    0 => 'cloud.XXXnet',
    1 => 'office.XXXnet',
    2 => 'cloud.ftmh-russia.ru',
  ),
  'onlyoffice' => 
  array (
    'verify_peer_off' => true,
    'jwt_header' => 'Authorization',
    'jwt_secret' => 'XXX',
  ),
  'datadirectory' => '/media/cloud',
  'dbtype' => 'mysql',
  'version' => '25.0.12.0',
  'overwrite.cli.url' => 'https://cloud.XXX.net',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'XXX',
  'dbpassword' => 'XXX',
  'installed' => true,
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'app_install_overwrite' => 
  array (
    0 => 'occweb',
    1 => 'flow_notifications',
  ),
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'info',
  'mail_domain' => 'XXX',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'XXX',
  'mail_smtpport' => '465',
  'mail_smtpname' => 'info@XXX',
  'mail_smtppassword' => 'XXX',
  'updater.secret' => 'XXX'

The output of your Apache/nginx/system log in /var/log/____:
nothing related

PASTE HERE

PASTE HERE


Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

PASTE HERE