- Home
- Connectors
- Nextcloud
Nextcloud
About the ONLYOFFICE and Nextcloud integration
ONLYOFFICE offers an official connector to integrate ONLYOFFICE Docs with Nextcloud and edit office documents within the cloud storage. You can download the ONLYOFFICE connector from the Nextcloud app store or the ONLYOFFICE GitHub page.
Main features
- Creating, editing, and viewing documents, spreadsheets, and presentations.
- Creating and filling out online forms.
- Sharing files with other users.
- Sharing files in a Talk chat with drag & drop.
- Protecting documents with watermarks.
- Co-editing documents in real-time: two co-editing modes (Fast and Strict), Track Changes, comments, and a built-in chat.
- Co-editing between several federated Nextcloud instances connected to one Document Server.
- JWT support to secure your traffic so that no one, besides the users with proper rights, can have access to your documents.
Supported formats
- For editing and viewing: DOCX, XLSX, PPTX, CSV, TXT, PDF form.
- For viewing only: PDF.
- For filling forms: PDF form.
- For editing via OOXML conversion: ODT, ODS, ODP, and RTF.
- For converting to Office Open XML formats using the Convert with ONLYOFFICE option: DOC, DOCM, DOT, DOTX, EPUB, HTM, HTML, ODP, ODT, POT, POTM, POTX, PPS, PPSM, PPSX, PPT, PPTM, RTF, XLS, XLSM, XLT, XLTM, XLTX.
What's new in version 9.7.0
Added
- Added support of hwp, hwpx, pages, numbers and key formats
Changed
- Compatibility with Nextcloud 31
The full change log is available here.
Connecting ONLYOFFICE Docs to Nextcloud
Requirements
-
ONLYOFFICE Document Server v7.0 (server or cloud version) or later
You need an instance of ONLYOFFICE Docs that is resolvable and connectable both from Nextcloud and any end clients. ONLYOFFICE Docs must be able to POST to Nextcloud directly.
Starting from version 4.3.0, ONLYOFFICE Docs and Nextcloud can be installed either on different computers or on the same machine. In case you select the latter variant, you will need to set up a custom port for ONLYOFFICE Docs, as by default both ONLYOFFICE Docs and Nextcloud work on port 80.
Please refer to the official documentation page to learn more about installing ONLYOFFICE Docs. - Nextcloud v27
- ONLYOFFICE Connector v8.2.4 and later for Nextcloud
Installing the ONLYOFFICE connector for Nextcloud
The Nextcloud administrator can install the integration app from the in-built application market. To do it, please follow these steps:
- Click the username and select Apps.
- Go to the Tools category.
- Find ONLYOFFICE in the list of available applications.
- Click the Download and enable button.
Alternatively, the administrator can install the application manually:
-
Get the Nextcloud ONLYOFFICE integration app. There are several ways to do that:
- Download the latest signed version from the official Nextcloud store.
-
Download the latest signed version from the application release page on GitHub. E.g.:
wget https://github.com/ONLYOFFICE/onlyoffice-nextcloud/archive/refs/tags/vX.X.X.tar.gz
Where vX.X.X is the necessary connector version.
Unzip the archive, e.g.:
tar -xvzf vX.X.X.tar.gz
Rename the folder to onlyoffice, e.g.
mv onlyoffice-nextcloud-X.X.X onlyoffice
-
Clone the application source code and compile it yourself:
git clone https://github.com/ONLYOFFICE/onlyoffice-nextcloud.git onlyoffice
cd onlyoffice
git submodule update --init --recursive
-
Move the
onlyoffice
folder to the Nextcloud serverapps/
directory (or some other directory used to connect applications):cp -r /root/onlyoffice/ /var/www/html/apps/
-
Go to the
apps/
directory:cd /var/www/html/apps
-
Change the owner to update the application right from the Nextcloud web interface:
chown -R www-data:www-data onlyoffice
- In Nextcloud, go to Settings > Apps > Disabled apps and click Enable for the ONLYOFFICE application.
ONLYOFFICE Docs and Nextcloud can be installed either on different computers, or on the same machine. In case you select the latter variant, you will need to set up a custom port for Document Server as by default both ONLYOFFICE Docs and Nextcloud work on port 80. You can also use Document Server behind a proxy, please refer to this article to learn how you can configure it.
Configuring the ONLYOFFICE connector for Nextcloud
To configure the ONLYOFFICE application settings, please go to Settings > Administration > ONLYOFFICE.
In the Server settings section, specify the following options:
- ONLYOFFICE Docs address - specify the URL address where the Document Editing Service
is
installed. This field is mandatory. If you install ONLYOFFICE Docs on a custom port, you must
specify the port, e.g.:
http://127.0. 0.1:8081/
The address of ONLYOFFICE Docs must be accessible from Nextcloud, as well as the address of Nextcloud must be accessible from ONLYOFFICE Docs. - Disable certificate verification (insecure) - check this box to disable the certificate verification and allow Nextcloud to establish connection with ONLYOFFICE Docs if you are using a self-signed certificate for your ONLYOFFICE Docs (otherwise, Nextcloud will not validate a self-signed certificate and will not allow connection to/from ONLYOFFICE Docs). This is an insecure solution, and we strongly recommend that you replace the certificate with the one issued by some CA.
- Secret key - specify the secret used to sign the data.
Starting from ONLYOFFICE Docs v7.2, JWT is enabled by default and the secret key is generated automatically. You need to enable it on the Nextcloud side as well: find your secret key in the ONLYOFFICE Docs configuration file, then specify the same secret key in the connector settings. For more details, see the Enabling JWT for the ONLYOFFICE and Nextcloud integration section of this article.
-
The Advanced server settings section can be used if your network configuration does
not allow requests between the installed Nextcloud and ONLYOFFICE Docs using the
public addresses. In this case, specify addresses for internal requests in the corresponding fields:
- In the ONLYOFFICE Docs address for internal requests from the server field, specify the address that is used to access Document Editing Service from Nextcloud.
- In the Server address for internal requests from ONLYOFFICE Docs field, specify the address that is used to access Nextcloud from Document Editing Service.


Click the Save button. After saving the Server settings, the Common settings, Editor customization settings, Common templates, and Secure view settings sections will appear.
In the Common settings section, you can specify the following options:
- Restrict access to the editors to following groups - check this box and select user groups that will not be allowed to use the ONLYOFFICE editors in Nextcloud.
- Use ONLYOFFICE to generate a document preview - check this box for thumbnail generation via ONLYOFFICE. It will take up some disk space.
- Open file in the same tab - check this box to open a file in the current browser tab. If this option is unchecked, a file will be opened in a new browser tab.
- Provide advanced document permissions using ONLYOFFICE Docs - check this box to be able to specify extra permissions in the Advanced tab of the document panel: Review and Comment for documents, Custom filter for spreadsheets. For more details, see the Start using ONLYOFFICE Docs within Nextcloud section of this article.
- Keep metadata for each version once the document is edited This function allows metadata to be preserved and changes to be displayed for each document version in the version history. It will take up some disk space. You can use the Clear button to remove the metadata and free up disk space.
- The default application for opening the format - allows you to specify which formats to
associate with the ONLYOFFICE editors. The docx, xlsx, and pptx formats are selected by default.
Opening in ONLYOFFICE editors will be performed only for the formats selected in this section.
- Open the file for editing - allows administrators to choose the document formats to edit by
converting them to OOXML formats. The csv and txt formats are selected by default.
Due to format restrictions, some data might be lost when saving to the formats from the list (csv, odp, ods, odt, rtf, txt).
After you enable the corresponding option, documents in the specified formats will be immediately converted and opened in the ONLYOFFICE editor for editing after clicking on them. If a format is unchecked, the file will be opened for viewing.
In the Editor customization settings section, you can specify the following options:
- Keep intermediate versions when editing (forcesave) function allows you to send all changes to the storage directly when clicking the Save button in the ONLYOFFICE editors' interface if you want to prevent data loss. When this option is disabled, your changes are saved to the editors' cache automatically.
- Select the interface elements of the editors that you want to hide / show (Chat, More compact header, Feedback & Support , Help, Monochrome toolbar header).
- Review mode for viewing function allows you to set the default document review display mode:
- Markup - for highlighting the proposed changes,
- Final - for showing with changes applied,
- Original - for showing the original document without any changes.
- Default editor theme function allows you to set the default theme: Light, Classic Light, or Dark.


In the Common templates section, you can click the icon and upload docx, xlsx, or
pptx templates for creating new documents.
You can download or delete a template from this list using the corresponding icons.


After adding templates in the admin settings, users will be able to choose a template when creating a
new
document using the add button in the
Nextcloud interface or via the File > Create new menu in the ONLYOFFICE editors'
interface.
In the Security section, you can protect documents by embedding a watermark, as well as disable or enable running macros.
After making changes to the application settings, click the Save button located below each section to save the changes.
Checking the connection
You can check the connection to ONLYOFFICE Docs by using the following occ command:
occ onlyoffice:documentserver --check
You will see a text, either with information about the successful connection or the cause of the error.
How it works
The ONLYOFFICE integration follows the API documented here.
- When creating a new file, the user navigates to a document folder within Nextcloud and clicks the Document, Spreadsheet or Presentation item in the new (+) menu.
- The browser invokes the create method in the /lib/Controller/EditorController.php controller. This method adds a copy of a file from the assets folder to the folder the user is currently in.
- When opening an existing file, the user navigates to it within Nextcloud and selects the Open in ONLYOFFICE menu option.
- A new browser tab is opened and the index method of the /lib/Controller/EditorController.php controller is invoked.
-
The app prepares a JSON object with the following properties:
- url - the URL that ONLYOFFICE Docs uses to download the document;
- callbackUrl - the URL that ONLYOFFICE Docs uses to inform about status of the document editing;
- documentServerUrl - the URL that the client needs to use to communicate with the ONLYOFFICE Document Server. (can be set at the administrative settings page);
- key - the UUID+Modified Timestamp to instruct ONLYOFFICE Docs whether to download the document again or not.
- Nextcloud takes this object and constructs a page from templates/editor.php template, filling in all of those values so that the client browser can load up the editor.
- The client browser makes a request to the JavaScript library from ONLYOFFICE Docs and sends ONLYOFFICE Docs the DocEditor configuration with the above properties.
- Then ONLYOFFICE Docs downloads the document from Nextcloud and the user begins editing.
- ONLYOFFICE Docs sends a POST request to callbackUrl to inform Nextcloud that a user is editing the document.
- When all users and client browsers are done with editing, they close the editing window.
- After 10 seconds of inactivity, ONLYOFFICE Docs sends a POST to callbackUrl letting Nextcloud know that the clients have finished editing the document and closed it.
- Nextcloud downloads a new version of the document, replacing the old one.
Enabling JWT for the ONLYOFFICE and Nextcloud integration
To protect documents from unauthorized access, ONLYOFFICE editors use the JSON Web Token (JWT). The token is added in the configuration when the Document Editor is initialized and during the exchange of commands between inner ONLYOFFICE Docs services. The secret key is used to sign the JSON web token and validate the token upon the request to ONLYOFFICE Docs.
Starting from ONLYOFFICE Docs v7.2, JWT is enabled by default and the secret key is generated automatically. You need to find your secret key in the ONLYOFFICE Docs configuration file, then specify the same secret key in the connector settings.
Step 1: Find your secret key in the ONLYOFFICE Docs configuration file
-
Open the local.json file with any available text editor.
- For Linux -
/etc/onlyoffice/documentserver/local.json
-
For Windows -
%ProgramFiles%\ONLYOFFICE\DocumentServer\config\local.json
-
For Docker – enter the ONLYOFFICE Docs container using the
docker exec -it <containerID> bash
command and open/etc/onlyoffice/documentserver/local.json
Alternatively, you can use the following command to find the default secret key without opening local.json:
sudo docker exec <containerID> /var/www/onlyoffice/documentserver/npm/json -f /etc/onlyoffice/documentserver/local.json 'services.CoAuthoring.secret.session.string'
The local.json file should look like this:
{"services": {"CoAuthoring": {"token": {"enable": {"request": {"inbox": true,"outbox": true},"browser": true}},"secret": {"inbox": {"string": "yoursecret"},"outbox": {"string": "yoursecret"},"session": {"string": "yoursecret"}}}}}
- For Linux -
-
The
true
value is specified in three sections. It means that token validation is enabled.services.CoAuthoring.token.enable.browser
services.CoAuthoring.token.enable.request.inbox
services.CoAuthoring.token.enable.request.outbox
-
The automatically generated secret key is specified in three sections. You can replace the
default secret value with your own secret key. The secret key must be the same in three
sections.
services.CoAuthoring.secret.inbox.string
services.CoAuthoring.secret.outbox.string
services.CoAuthoring.secret.session.string
-
If you make changes, save them and restart the services for the config changes to take effect.
supervisorctl restart all
Step 2: Specify the same secret key in the connector settings
In the connector settings, specify the same secret in the Secret key field and save the settings.
Connecting to the demo ONLYOFFICE Docs
Starting from ONLYOFFICE connector version 3.0.0, you can try the ONLYOFFICE online editors within Nextcloud without installing ONLYOFFICE Docs.
To turn the connection on, click the Connect to demo ONLYOFFICE Docs server checkbox and click the Save button.
Installing ONLYOFFICE Docs with Nextcloud using Docker Compose
Using Docker Compose, you can quickly and easily deploy the preconfigured version of ONLYOFFICE Docs connected to Nextcloud with all the required dependencies in the Docker containers.
Installing Docker and Docker Compose
- Follow this instruction to download and install Docker to your computer. Docker is a program for automating application development and management in container-enabled environments.
- Then follow this instruction to download and install the Docker Compose package manager, which allows you to describe and run multi-container applications.
Installing ONLYOFFICE Docs and Nextcloud servers
-
Download the latest version of the docker-onlyoffice-nextcloud
repository. To do so, insert the following line into the Command line interface:
git clone https://github.com/ONLYOFFICE/docker-onlyoffice-nextcloud
-
Once the repository is downloaded, go to the docker-onlyoffice-nextcloud folder:
cd docker-onlyoffice-nextcloud
-
Launch Docker Compose:
sudo docker-compose up -d
You might need to wait a couple of minutes until all the containers are up and running after the command above.
In the browser address bar, enter http://localhost
to open the Nextcloud setup page and
create your admin account. Specify your Login ;and Password.
Once you're finished with the Wizard, go to the docker-onlyoffice-nextcloud folder and run the configuration script:
sudo bash set_configuration.sh
Now you can create and edit documents in Nextcloud using ONLYOFFICE Docs without configuring any settings.
Server settings are specified during the deployment, but you can adjust Common settings, Editor customization settings, Common templates, and Secure view settings. Please refer to the Configuring the ONLYOFFICE connector for Nextcloud section to learn more about the available connector settings.
Installing ONLYOFFICE Docs with Nextcloud on a virtual machine using UCS
App appliances introduced by Univention are a distribution format that allows installing systems already packed with components such as ONLYOFFICE Docs and Nextcloud.
Univention, an open-source corporate infrastructure developer, introduced a handy method of installing systems already equipped with third-party components – virtual app appliances. These are VirtualBox or VMware images that include the app, UCS management system and the UCS runtime environment.
The following virtual images contain Univention Corporate Server, Nextcloud and ONLYOFFICE. The apps work out of the box with the additionally created auto-configuration that makes sure that the required ONLYOFFICE add-on in Nextcloud is configured correctly. The installation process is far easier than a classic manual method: no manual steps by the administrator are needed.
Download the necessary components
First, you need to install the hypervisor for the virtual machine. Choose between VMware Workstation Pro or VirtualBox and follow the documentation for detailed installation instructions.
Then download ONLYOFFICE-Nextcloud VM for the hypervisor that you’ve chosen.

Import the virtual appliance
Now open the hypervisor and import the ONLYOFFICE-Nextcloud virtual appliance. This guide describes how to do this in both platforms.
Install the application
Once the image is successfully imported, start the Virtual Machine. Go through the booting process via the installation wizard, following the steps below.
-
Choose your language and enter the nearest city.
The wizard will obtain the default system locale, timezone, and keyboard layout.
-
Set up your domain and network settings. By default, you obtain an IP address automatically.
Alternatively, you can specify your IP address, net mask, and gateway manually. Enter the
address of the preferred DNS server.
-
Select your domain settings. The Manage users and permissions directly on this system
option is selected by default. It allows creating a new domain in this system. Alternatively,
you can connect to the existing UCS or Microsoft Active Directory domain.
-
Enter your Company name, admin email address for activating ONLYOFFICE (the license file will be
sent to this email address), create and confirm a new password for your administrator account.
-
Specify the fully qualified domain name for this system and the LDAP base:
-
Review your settings and make sure everything is filled out correctly. Then click
the Configure System button.
-
Once everything is configured, ONLYOFFICE is ready to start in a newly created UCS platform.
- Enter your IP address in the browser address bar and upload your ucs.license file received via email.
-
To log in to your ONLYOFFICE Docs and Nextcloud appliance, click Nextcloud
in the Applications section.
To log in to your Univention Management Console, click LOGIN on the top or System and domain settings in the Administration section.
Enter Administrator in the login field and the password specified during the registration (see step 4).
Start using ONLYOFFICE Docs within Nextcloud
To create a document:
- Open the needed folder within Nextcloud.
- Click the
add button.
-
Choose the needed file type: Document, Spreadsheet, or Presentation.
- Type in the document name and press Enter.
-
Optional. If some templates are added by the administrator, select the necessary template and click
Create.
To open a document for editing or viewing:
- Open the folder with the needed document.
- Click the document title.
To convert a document to the Office Open XML format:
- Open the folder with the needed document.
-
Click the
more button.
-
Click the Convert with ONLYOFFICE option.
See the full list of the formats which can be converted into OOXML.
To create a form template:
- Open the needed folder within Nextcloud.
- Click the
add button.
-
Choose the New form template option.
- Type in the document name and press Enter.
- Choose whether you want to create a form From text document or start from scratch with the Blank option.
- You will be redirected to the corresponding ONLYOFFICE Editor.
- Save the form template as .pdf to have future access to editing, revising or collaborating.
To create a fillable form and restrict file editing by other users:
-
Click the Actions icon to the right of the file and choose the Create form option.
To fill in a form:
-
Click the Actions icon to the right of the file and choose the Fill in form in ONLYOFFICE
option.
To share a document with a Nextcloud user:
-
Open the needed folder within Nextcloud and find the necessary file. Click the
Share icon to the right of the file name.
Alternatively, you can open the file for editing, switch to the Collaboration tab in the editor interface and click the Sharing button on the top toolbar.
The Sharing tab on the right will open.
- In the Name, email, or Federated Cloud ID … field, enter the necessary data and select the necessary user.
-
Click the
icon to the right of the username to open the pop-up menu.
- To provide the Full access permissions, leave the Allow editing option checked. The user will have Full access rights and will be able to edit the file.
- To provide the Read only permissions, uncheck the Allow editing option. The user will have Read only rights and will not be able to edit the file.
- To provide the ability to reshare the file, leave the Allow resharing option checked. The user will be able to share the file with other users.
-
To provide extra permissions only for users who cannot reshare the file, uncheck the
Allow
resharing
option (you might also need to uncheck the Allow editing option).
The Provide advanced document permissions using ONLYOFFICE Docs must be enabled in the Common settings section of the ONLYOFFICE application.
Switch to the Advanced tab and click the
icon to the right of the user name. Choose the necessary option depending on the file type and the Allow editing option checked/unchecked in the Sharing tab.
- for the docx. files and users with Read only permissions, you can choose the following permissions: Review or Comment.
- for the xlsx. files and users with Full access permissions, you can uncheck the Custom filter permissions.
- for the xlsx. files and users with Read only permissions, you can choose the following permissions: Comment.
- for the pptx. files and users with Read only permissions, you can choose the following permissions: Comment.
Connecting ONLYOFFICE Desktop Editors to Nextcloud
ONLYOFFICE allows you to edit the files stored in your Nextcloud account and collaborate on them using both online and desktop editors. Thereby, you can use not only online collaboration tools but also the features available in your desktop application only:
- protecting documents with a password or a digital signature,
- sending the currently edited file right from the editor using the Send plugin,
- inserting audio and video via the Presentation Editor.
Launch ONLYOFFICE Desktop Editors. To connect Desktop Editors to your Nextcloud server, perform the following actions:
- Switch to the Connect to cloud section on the left side panel.
-
Click the Nextcloud cloud service button. Alternatively, you can use the Connect now link at the
bottom.
-
If you pressed the Nextcloud service button, the Connect to cloud office window opens with
the
Nextcloud selected. If you used the Connect now link, choose the Nextcloud cloud storage
from the
drop-down list.
-
in the Cloud office URL field, enter your Nextcloud server domain name or IP address.
When ready, click the Connect now button.
The Nextcloud sign in page will open in a new tab of the Desktop Editors interface.
- Specify your Username or email and the Password you use to access your Nextcloud account,
- Click the Log in button.
-
in the Cloud office URL field, enter your Nextcloud server domain name or IP address.
When ready, click the Connect now button.
The Files section of your Nextcloud account will open. Now you can edit your existing files and create new ones, share your documents and collaborate on them with Nextcloud users using ONLYOFFICE editors.
Connecting ONLYOFFICE Documents to Nextcloud on iOS or Android
You can connect Nextcloud to the ONLYOFFICE Documents mobile app to work on your Nextcloud documents, spreadsheets, and presentations and edit them collaboratively on-the-go.
To connect ONLYOFFICE to Nextcloud on your mobile device, download and install the latest version of the ONLYOFFICE Documents app for iOS or ONLYOFFICE Documents application for Android and perform the following actions:
- Go to the Clouds section.
- Choose Nextcloud.
- Insert the URL address of your Nextcloud server in the Connection URL field.
- Enter the login and password of your Nextcloud account.
- Press Next.
To edit documents from your Nextcloud using ONLYOFFICE Docs on your mobile device, tap the necessary file name in the file list.
Known issues
- Connecting external storages. Adding the storage using the External storages app has issues with the co-editing in some cases. If the connection is made using the same authorization keys (the Username and password or Global credentials authentication type is selected), then the co-editing is available for the users. If different authorization keys are used ( Log-in credentials , save in database or User entered, store in database authentication options), the co-editing is not available. When the Log-in credentials, save in session authentication type is used, the files cannot be opened in the editor.
- Validating certificate. If you are using a self-signed certificate for your Document Server,
Nextcloud will not validate such a certificate and will not allow connection to/from Document Server. This
issue can be solved in two ways:
- Check the Disable certificate verification (insecure) box on the ONLYOFFICE administration page, Server settings section, within your Nextcloud.
-
Change the Nextcloud config file manually. Locate the Nextcloud config file
(/nextcloud/config/config.php) and open it. Insert the following section to it:
'onlyoffice' => array ( 'verify_peer_off' => true )
This will disable the certificate verification and allow Nextcloud to establish connection with Document Server.
Please remember that this is a temporary insecure solution, and we strongly recommend that you replace the certificate with the one issued by some CA. Once you do that, do not forget to uncheck the corresponding setting box or remove the above section from the Nextcloud config file.
- Federated Cloud Sharing. If the document is shared using the Federated Cloud Sharing app, the co-editing between the Nextcloud instances connected to different ONLYOFFICE servers will not be available. The users from one and the same Document Server can edit the document in the co-editing mode, but the users from two (or more) different Document Servers will not be able to collaborate on the same document in real time.
- Converting files. ONLYOFFICE Docs uses Office Open XML format as a basis when opening and editing files. If the file format is different from OOXML, it will still be converted to the corresponding OOXML for the Document Server efficient operation and faster performance. After that you can edit the file, making any changes available for the base OOXML format and save the file to this base OOXML format.
- In case the source Nextcloud file format was different from the base one, and you still want to save it to the original format, the file will be converted to this format from OOXML. As the formats are fundamentally different, some data (such as charts, tables, autoshapes or images) and formatting can be lost due to the simple reason that some formats (csv, txt, etc.) do not support them or treat them differently than OOXML standard does. That is why all the non-OOXML files by default are opened for viewing only, although there is an option to convert the file in the context menu. If you realise the data/formatting loss risks after the conversion, but still want to open non-OOXML files for editing, you can check them in the list in the settings. Editing for csv and txt files is available by default.
- When accessing a document without download permission, file printing and using the system clipboard are not available. Copying and pasting within the editor is available via buttons in the editor toolbar and in the context menu.