Skip to main content

Nextcloud

Self-hosted collaboration platform with file sync, sharing, and browser-based document editing via OnlyOffice.

CategoryApplications
Deploy./uis deploy nextcloud
Undeploy./uis undeploy nextcloud
Verify./uis verify nextcloud
Depends onPostgreSQL, Redis
Helm chartnextcloud/nextcloud (pinned: 9.0.3)
Default namespacenextcloud

What It Does

Nextcloud provides a self-hosted collaboration platform with:

  • File Sync and Sharing -- upload, organize, and share files via browser or desktop client
  • Document Editing -- browser-based editing of DOCX, XLSX, PPTX, and PDF via OnlyOffice Document Server
  • Calendar and Contacts -- CalDAV and CardDAV support
  • Cron -- background jobs run via sidecar container

OnlyOffice Document Server is deployed alongside Nextcloud in the same namespace, connected via JWT-authenticated API.

Deploy

# Deploy dependencies first (if not already running)
./uis deploy postgresql
./uis deploy redis

# Deploy Nextcloud + OnlyOffice
./uis deploy nextcloud

First boot takes 1-5 minutes (database migrations, file copy). The playbook waits for readiness.

Verify

# Run all 8 E2E tests
./uis verify nextcloud

# Manual checks
kubectl get pods -n nextcloud
curl -H "Host: nextcloud.localhost" http://nextcloud.localhost/status.php

The verify playbook tests:

  • Health endpoint, admin WebDAV login, wrong credentials rejected
  • Traefik routing, OnlyOffice health, JWT enforcement
  • OnlyOffice editor endpoint (file handlers registered), config clean (no errors)

Access

URLDescription
http://nextcloud.localhostNextcloud web UI
http://onlyoffice.localhostOnlyOffice Document Server

Login with admin and the password from ./uis secrets show (look for NEXTCLOUD_ADMIN_PASSWORD).

Configuration

Nextcloud configuration is in manifests/620-nextcloud-config.yaml. Key settings:

SettingValueNotes
Imagenextcloud:33-apachePinned version
DatabasePostgreSQL (existing UIS instance)Database: nextcloud
CacheRedis (existing UIS instance)Session locking and caching
Document editingOnlyOffice Document Server 9.3.1JWT-authenticated
Upload limit512MPHP upload_max_filesize
Storage10Gi PVC (local-path)File storage
CronSidecar containerRuns /cron.sh alongside main container
Service port80Required for OnlyOffice connector compatibility

Secrets

VariableSourcePurpose
NEXTCLOUD_ADMIN_USERadminAdmin login username
NEXTCLOUD_ADMIN_PASSWORDGeneratedAdmin login password
NEXTCLOUD_DATABASE_USERpostgresPostgreSQL username
NEXTCLOUD_DATABASE_PASSWORDPGPASSWORDPostgreSQL password
REDIS_PASSWORDREDIS_PASSWORDRedis authentication
ONLYOFFICE_JWT_SECRETGeneratedShared JWT secret for OnlyOffice

Key Files

FilePurpose
manifests/620-nextcloud-config.yamlHelm values (database, redis, probes, PHP)
manifests/621-nextcloud-ingressroute.yamlNextcloud IngressRoute
manifests/622-onlyoffice-config.yamlOnlyOffice Deployment + Service
manifests/623-onlyoffice-ingressroute.yamlOnlyOffice IngressRoute
ansible/playbooks/620-setup-nextcloud.ymlDeployment playbook
ansible/playbooks/620-remove-nextcloud.ymlRemoval playbook
ansible/playbooks/620-test-nextcloud.ymlE2E verification (8 tests)

Undeploy

./uis undeploy nextcloud

Note: The PostgreSQL database nextcloud is NOT deleted. On redeploy, the setup playbook detects and drops any stale database automatically.

Troubleshooting

First boot is slow (1-5 minutes): Nextcloud runs database migrations and copies files on first boot. The startup probe allows up to 5 minutes. Check progress:

kubectl logs -n nextcloud -l app.kubernetes.io/name=nextcloud --tail=50

OnlyOffice image pull takes several minutes: The OnlyOffice Document Server image is ~1.5 GB. First pull may take 3-5 minutes.

Documents download instead of opening in OnlyOffice: File handlers may not be registered. Re-run deploy or visit http://nextcloud.localhost/settings/admin/onlyoffice and click Save.

Database permission errors on redeploy: The deploy playbook handles this automatically by dropping stale databases. If you encounter permission denied for table oc_migrations, redeploy:

./uis undeploy nextcloud && ./uis deploy nextcloud

Pod won't start:

kubectl describe pod -n nextcloud -l app.kubernetes.io/name=nextcloud
kubectl logs -n nextcloud -l app.kubernetes.io/name=nextcloud --tail=50

Learn More