Technical Anshu
Tutorials Blog
Nextcloud + OnlyOffice

Nextcloud With OnlyOffice Complete Integration Guide

Your own private cloud where the team can store files and edit Word, Excel and PowerPoint documents together in the browser - no per-user licence, your data on your server.

By Technical AnshuLinux ServerSelf HostedFull setup
Watch the full video - Nextcloud and OnlyOffice setup and integration, step by step

Google Drive style file storage with Office style editing, on a server you control - that is what Nextcloud plus OnlyOffice gives you. This guide covers the complete path: install both servers, connect them correctly, and prove the setup with a real first edit. Watch the video above for the full on-screen process, and use this page as your checklist.

How the two servers talk to each other
Your browser opens the fileNextcloud page
Editor loads inside the pageOnlyOffice Docs
Docs server downloads the fileFrom Nextcloud
You type, changes collectInside Docs server
Saved file sent backCallback to Nextcloud
Rule to remember - the two servers must be able to reach each other, not just your browser.
Example flow of one document from click to save - every step needs both servers reachable
1

What You Are Building and Why Two Servers

Nextcloud stores your files and handles users, sharing and sync - but on its own it can only preview documents, not truly edit them in the browser. OnlyOffice Docs is the editing engine. It is a separate server program that loads inside the Nextcloud page and does the actual Word, Excel and PowerPoint style editing.

So this project always has three parts: install Nextcloud, install OnlyOffice Docs, then connect them with the official connector app and a shared secret key. Skip the connection details and everything looks installed - yet no document opens. That pairing step is where most setups fail, and it is the heart of this guide.

2

Before You Start - Server, Domain and HTTPS

Decide these three things first, because changing them later means redoing the integration.

  1. Server. One Linux server can run both for a small team. OnlyOffice Docs alone wants at least 4 GB RAM, so give a combined box 8 GB if you can. A separate sizing guide is linked in the related pages.
  2. Two addresses. Use a subdomain for each service, for example cloud.example.com for Nextcloud and office.example.com for OnlyOffice. One shared server with a reverse proxy in front is fine.
  3. HTTPS on both. This is not optional polish. If Nextcloud is on HTTPS and the editor is on plain HTTP, the browser blocks the editor as mixed content. Get certificates (Let's Encrypt is free) before you connect the two.
3

Install Nextcloud

Install Nextcloud on your Linux server with a web server (Apache or Nginx), PHP and a real database - MariaDB or PostgreSQL for anything beyond a tiny test. Create the admin account, finish the web installer, and confirm you can log in, upload a file and see it in the Files app.

Two habits from day one: turn on the server-side checks under Settings, Administration, Overview and clear every warning you can, and note your Nextcloud address exactly as users will open it - the connector later needs this address to match.

4

Install OnlyOffice Docs

The official and simplest route is the Docker image. A typical start command looks like this (the secret value is explained in the next step - use your own long random value, never this example):

  1. sudo docker run -i -t -d -p 8080:80 -e JWT_ENABLED=true -e JWT_SECRET=YourLongSecretValue --restart=always onlyoffice/documentserver
  2. Wait a minute for it to start, then open http://your-server:8080/healthcheck - it must answer true. Nothing else matters until this says true.
  3. Put it behind your reverse proxy so it answers on its own HTTPS subdomain, for example https://office.example.com/, and test the healthcheck again on that address.

Do not leave the built-in example page enabled on a public server later - it is a test tool, not part of your office system.

5

Connect Them With the Connector App and the Secret

This is the step the whole setup stands on. The connector app lives inside Nextcloud; the secret proves to both servers that they are talking to their real partner.

  1. In Nextcloud, open Apps, search for ONLYOFFICE and install the official connector app.
  2. Go to Settings, Administration, ONLYOFFICE.
  3. In Document Editing Service address, enter your OnlyOffice address, for example https://office.example.com/.
  4. In Secret key, paste the exact same secret you gave the Docs server (the JWT_SECRET value). One different character and the pairing fails.
  5. Click Save. Nextcloud now checks the connection. A green success message means the handshake worked.

If saving fails, do not reinstall anything - it is almost always the secret, the address, or one server being unable to reach the other. The read-only and error fix guide linked below covers those three causes in order.

6

The First Edit - Prove the Whole Chain

Upload a small test document, then open it. It should load inside the OnlyOffice editor. Type a line, wait a few seconds, close the tab, and open the file again - your line must be there. Also download the file once and confirm the change is inside the real file, not just on screen.

Then test like a real user: share the file with a second account, open it from both accounts at the same time, and watch the co-editing cursors appear. Only when saving, sharing and joint editing all pass is the integration actually done.

Honest note - the editor saves back to Nextcloud when the last editor closes the document or after a short idle delay, not on every single keystroke into the file itself. If the Docs server is killed mid-session, the last moments of work can be lost. Keep the Docs server stable, and back up both halves as explained in the backup guide.

Watch the Complete Video Guide

The video shows the complete installation and integration on screen - both servers, the connector settings and the first document edit.

Watch Full Video
Common Questions (FAQ)

Can Nextcloud and OnlyOffice run on the same server?

Yes, for a home or small office team one Linux server can run both, ideally with the two services on separate subdomains behind a reverse proxy. Give the machine enough RAM - OnlyOffice Docs alone wants at least 4 GB - and move the Docs server to its own machine when editing load grows.

Is OnlyOffice free to use with Nextcloud?

The OnlyOffice Docs Community Edition is free and open source and covers normal document, spreadsheet and presentation editing with co-editing. Paid editions exist for large deployments that need official support and scaling features. For a small team the free edition is the usual starting point.

Why does the document not open after I connected everything?

Almost always one of three causes: the secret key in the Nextcloud connector does not exactly match the secret on the Docs server, the Docs server cannot reach Nextcloud to download the file and send changes back, or the editor is loaded over plain HTTP inside an HTTPS page and the browser blocks it. Check them in that order.

This guide is based on the Technical Anshu video on Nextcloud and OnlyOffice integration. Stuck on a step? Ask in the video comments - you will get an answer there.