Skip to main content

Installing ONLYOFFICE on Nextcloud (CasaOS/Ubuntu)

Overview

This guide covers deploying ONLYOFFICE Document Server as a backend engine via CasaOS and integrating it with Nextcloud. This setup provides a high-performance office suite capable of handling Microsoft Office formats (.docx, .xlsx, .pptx) directly within the browser.


Prerequisites

  • Nextcloud running on Ubuntu (via Docker/CasaOS).
  • Reverse Proxy (e.g., Nginx Proxy Manager) already configured for your main domain (nc.goonersnas.com).
  • A dedicated subdomain (e.g., office.goonersnas.com) with an SSL certificate.

Step 1: Deploy ONLYOFFICE Document Server (Backend)

We use a separate Docker container for the rendering engine to ensure stability and performance.

  1. Open CasaOS and click the + icon to install a customized app.
  2. Click Import in the top right and paste the following Docker Compose snippet:
name: onlyoffice services: onlyoffice: image: onlyoffice/documentserver:latest container_name: onlyoffice-docs environment: - JWT_ENABLED=true - JWT_SECRET=SecretGoonersKey123 ports: - "8888:80" restart: unless-stopped
  1. Submit and Install.
  2. Optional: Change the Network setting in CasaOS to match your Nextcloud bridge (e.g., big-bear-nextcloud-ls) to allow internal container communication.

Step 2: Reverse Proxy Configuration (Crucial)

To avoid the Mixed Active Content error, ONLYOFFICE must be served over HTTPS.

  • Point your subdomain (e.g., office.goonersnas.com) to your server IP.
  • In your Reverse Proxy manager, create a new host:
    • Domain: office.goonersnas.com
    • Scheme: http
    • Forward IP: Your local server IP (e.g., 192.168.0.152)
    • Forward Port: 8888
  • Enable SSL (Let's Encrypt) and force SSL.

Step 3: Integration in Nextcloud

  1. Install the App:
    • Log in to Nextcloud as an Admin.
    • Go to Apps > Office & text.
    • Find ONLYOFFICE, then download and enable.
  2. Configure Settings:
    • Go to Administration settings > ONLYOFFICE.
    • Document Editing Service address: https://office.goonersnas.com/
    • Secret key: SecretGoonersKey123
    • Click Save.

IMPORTANT: If you see a red error banner stating "Mixed Active Content is not allowed," it means your Nextcloud (https) is trying to talk to an insecure ONLYOFFICE address (http). Always use the secure public subdomain URL in the Nextcloud settings to resolve this.

Verification

To verify the installation, open your Files app, tap the + icon, and create a new Document. If the editor loads the Word-style interface, the integration is successful.