OnlyOffice is now integrated in the Nextcloud VM!

I’m happy to announce that I successfully integrated OnlyOffice in the Nextcloud VM. You can find the script here:

It works on Ubuntu 16.04 with Apache and the same server. It’s setup with docker, and the script handles everything for you.


  1. One extra subdomain where OnlyOffice lays.
  2. Nextcloud URL must be SSL (HTTPS)

It’s already integrated in the VM master scripts and will be released pre-packaged in 12.0.1.

Happy Nextclouding!


Stunning; nicely done!

Thanks @JasonBayton! Can you please pin this post so that users can use this script instead of posting in the support forum?


I used the script to setup OO on my existing NC server (not VM). Had to manually add http > https rewriting to the virtual host.

A note for the script: please add a conditional check to not remove nmap if the user already has it installed.

@toby00001 Thanks for confitming that it works in your setup, and also thanks for your suggestion. Though, you are the only one requesting it so far so I’m sorry but I will not implement that. Installing it again is easy. :slight_smile:

1 Like


Thanks for this work :slight_smile:

I’m reading the script. I can see it’s for Apache.

I use Nginx…

I try to use this script but command after command with my keybird for adapting to Nginx congiguration :stuck_out_tongue:


Just replace the Apache stuff with Nginx and you should be good to go.

Would be great if you succeed and posted the result so that it could be used by Nginx users as well.

Yes, I understand it’s not a big issue or a priority, so I understand not spending time to implement it :slight_smile:

Thanks for the script!

I promess…

I try and I Post the result :wink:

@SLB_Info Thanks!

The nmap fix is now implemented. Thanks @toby00001!

1 Like

This is great! Now I just need to make an RHEL version. Thanks for a great head start.

Great! Please share your script once done so that more people can get use of it. I’ll post it in the VM repo. :slight_smile:

Will do. Thanks!

1 Like

Many, many thanks. I’ve tried to install OO with NC on one machine for a year (docker, VM, reverse proxy), but it doesn’t work. Your script made a miracle: few pressed keys and everything works.


Thanks for the feedback!

I am using the NextCloud VM, but it must be a version that was released before OnlyOffice was added since I did not have the script. So, I used wget to download the script and sudo bash to run the script.
It ran and asked me for my subdomain and the script finished successfully.
I now see the option to create office documents from within the Files tab in my NextCloud.
But, after creating a document file (txt, docx, or xlsx) and trying to open it using OnlyOffice, I get the following error message - “ONLYOFFICE cannot be reached. Please contact admin”.
Also, when I type in my sub domain (https://office.[mynextclouddomainname].com I get the following error message - " Forbidden
You don’t have permission to access / on this server.
Apache/2.4.18 (Ubuntu) Server at office.[mynextclouddomainname].com Port 443"
I have a certificate and my server is running smoothly - just not OnlyOffice.

I have the “office” subdomain set up. I rebooted the VM.

Could I get some help with this - any idea what is wrong and how to fix it?


Update… NC version:, mysql version: 10.2.12

@MCS Hi! I wrote you an email.