Nextcloud with collabora / onlyoffice not working on i-MSCP

  • Hello guys,

    I've been trying to install an Office Server to run with Nextcloud for the past 2 days, every type of install or software I choose I run into the same problem. It just doesn't work on a Nextcloud instance which is setup on a i-MSCP server.

    I have the following config :

    1. Nextcloud installed on i-MSCP server as a client. (working ok, but complaining much due to php restrictions)

    2. Collabora and Onlyoffice installed with Docker and working on remote servers without i-MSCP

    Now the problem :

    Every time I try to open a document from the Nextcloud installation on i-MSCP i get either a "connection refused" from the onlyoffice server or "Failed to load Collabora Online" from the Collabora server.

    Luckily, I have other Nextcloud installations as well which are not on i-MSCP servers and from those Nextclouds both OnlyOffice and Collabora work perfectly and I can edit documents.

    I cannot seem to find one log file to find why in the name of God the i-MSCP Nextcloud install refuses to "talk" to office servers, i disabled the firewalls, i tried with curl, works both ways, I've edited HSTS settings thinking they could be a problem, I disabled all php restrictions thinking that maybe they could be a problem, NOTHING WORKS !

    From what I can tell so far, there is something in the i-MSCP php or vhost settings that blocks the exchange of information between the nextcloud server and the office server(s) but I have no idea what and I've spent hours browsing through logs end enabling debug tools.

    If anyone has a solution, please help !! If I can't make it work i have to give up hosting Nextclouds on i-MSCP servers and that is not something that I want.

    Thank you!

  • I don't know what to tell you, on my box NextCloud works perfectly.

    I just had to modify open_basedir as follows:

    1. 'open_basedir' => '{HOME_DIR}/:/usr/share/php/:/dev/random:/dev/urandom:/usr/bin/animate:/usr/bin/compare:/usr/bin/composite:/usr/bin/conjure:/usr/bin/convert:/usr/bin/display:/usr/bin/identify:/usr/bin/import:/usr/bin/mogrify:/usr/bin/montage:/usr/bin/stream:/usr/bin/gm:/proc/meminfo'

    and a couple of other options:

    1. php_admin_value[memory_limit] = 512M
    2. php_admin_flag[allow_url_fopen] = on

    The rest is absolutely standard…

    NextCloud has his own log file with EVERYTHING written. If there's a problem it will be written there...

  • kess

    Thank you very much for the tip, it wasn't open_basedir, it was the shell_exec function which stopped the OnlyOffice from working, in case someone else runs into this problem, just disable all disable_functions and the connection between NextCloud and OnlyOffice will work.