Nextcloud

High-Performance Nextcloud & MariaDB Deployment (CasaOS)

Status: Verified Deployment
Environment: Ubuntu (CasaOS) | Synology DS1522+ Backend
Core Architecture: Dedicated Mini PC for compute; "GoonersNAS" for muscle storage.


1. Preparation: The Network Bridge

To allow Nextcloud and MariaDB to communicate securely without using public IP addresses, they must reside on the same Docker network.


2. Database Setup (MariaDB)

We use the LinuxServer image for consistency and PUID/PGID support, which is vital for permission management.

Category Setting / Value
Image linuxserver/mariadb
Network big-bear-nextcloud-ls
Port Host 3306 -> Container 3306
Volume /DATA/AppData/mariadb/config -> /config

Environment Variables:

MYSQL_ROOT_PASSWORD = [YourSecretRootPassword]
MYSQL_DATABASE = nextcloud
MYSQL_USER = nc_user
MYSQL_PASSWORD = [YourSecretUserPassword]
PUID = 1000
PGID = 1000
TZ = America/Chicago

3. Application Setup (Nextcloud LS)

The Nextcloud LS (LinuxServer.io) version is preferred for its robust handling of PUID/PGID variables when mapping to NAS-based storage.

Category Setting / Value
Image linuxserver/nextcloud
Port Host 10443 -> Container 443
Web UI HTTPS (Required for Authentik)
Volume 1 /DATA/AppData/nextcloud/config -> /config
Volume 2 (NAS) /mnt/synology/nextcloud_data -> /data

4. Initial Configuration (The Setup Screen)

Navigate to https://nc.goonersnas.com to complete the wizard.


5. Troubleshooting & Critical Fixes

The "Access Denied" Loop: If the installer rejects your credentials, MariaDB likely initialized with old variables.
Fix: Stop MariaDB, delete all contents of /DATA/AppData/mariadb/config, and restart. It will re-generate the database with the correct PUID/PGID and credentials.

The "App Unavailable" Error: This is a protocol mismatch in CasaOS.
Fix: Manually use https:// in the browser and update the App Settings to use the HTTPS dropdown.


6. Post-Install Checklist

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


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).

Step 2: Reverse Proxy Configuration (Crucial)

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


Step 3: Integration in Nextcloud

  1. Install the App: Go to Apps > Office & text. Find ONLYOFFICE, click 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, navigate to your Files app and create a new Document. If the editor loads the Word-style interface, the integration is successful.