Clear Nextcloud’s File Locking Warning with Redis
Enable reliable Nextcloud file locking, choose the right Redis or Valkey backend, and verify the warning clears without risking concurrent file changes.
When Collabora Online CODE reports “Unauthorized WOPI host,” add the actual file-storage host—usually your Nextcloud origin—to CODE’s WOPI host allow-list. The host must match the origin CODE receives in the WOPI request, not the public URL of the Collabora server. In Docker, that is commonly configured with the aliasgroup1 environment variable.

WOPI means Web Application Open Platform Interface, the protocol an office server uses to open and save files through a storage platform. The WOPI host is that storage platform, such as Nextcloud. CODE checks the host named in the WOPI request against the hosts it trusts. If the request names cloud.example.com but CODE is configured to trust only office.example.com, the editor can refuse the session before it opens.
For a self-hosted setup, the hostname in the request may be an internal Docker name such as nextcloud rather than the browser-facing hostname. A reverse proxy, a different port, or separate public and internal URLs can also make the origin differ. Configure what the request actually uses, not what seems like the “main” server name.
docker compose logs --since=10m collabora, replacing collabora with your service name.No acceptable WOPI hosts found matching the target host [cloud.example.com] in config. Record the target host shown in brackets. Do not copy or share a full WOPI URL: it can contain a short-lived access token.WOPISrc host, if available in your integration logs, while keeping any query-string token private.![Terminal window showing an illustrative log pattern: No acceptable WOPI hosts found matching the target host [cloud.example.com] in config.](https://www.webtech360.com/resources_cts/images2/fix-codes-wopi-host-check-by-matching-the-host_247889815.webp)
For the official CODE Docker image, set aliasgroup1 to the exact trusted WOPI origin. For a single Nextcloud installation, a Compose service can include:
services:
collabora:
image: collabora/code
environment:
aliasgroup1: "https://cloud.example.com:443"Replace the example with your real Nextcloud host and the scheme and port that the WOPI request uses. Keep the existing image tag, administrator settings, network, and other service options in your Compose file. The example uses an HTTPS origin with port 443; a different deployment may use another port or an internal origin.

After editing the Compose file, recreate the CODE container so it receives the updated environment:
docker compose up -d --force-recreate collaboraUse your actual Compose service name in place of collabora. A plain restart may not load changed container environment values; recreating the service applies the updated configuration. If you configure CODE through its XML file, check the storage.wopi alias groups in the effective configuration instead. The official Collabora SDK manual documents Docker alias groups and WOPI host aliases; follow the syntax for the CODE version you run.
Collabora and Nextcloud can each enforce a WOPI-related restriction, but they answer different questions:
| Setting | What it checks | Typical correction |
|---|---|---|
CODE WOPI host allow-list (aliasgroup1) | Which storage host name CODE accepts in a WOPI request | Allow the actual Nextcloud origin sent to CODE |
| Nextcloud “Allow list for WOPI requests” | Which source IP addresses may send WOPI requests to Nextcloud | Allow the address Nextcloud sees for the CODE container or proxy |

Changing Nextcloud’s source-IP allow-list will not correct CODE rejecting a hostname. Conversely, adding a hostname to CODE does not authorize CODE’s source IP at Nextcloud. Nextcloud’s documentation recommends restricting WOPI requests to the Collabora server’s IP addresses; use the address observed by Nextcloud, which can differ when containers or a reverse proxy are involved.
cloud.example.com: allow that Nextcloud host and the appropriate origin in CODE.nextcloud: CODE is probably receiving a Docker-network hostname; decide whether that internal origin is intended, then configure the corresponding trusted host and ensure DNS/network reachability.Do not solve a mismatch by trusting every host or using an unrestricted wildcard in a production deployment. Keep the allow-list limited to known storage origins. If multiple storage hosts are intentional, configure the documented alias groups for your installed CODE version rather than guessing at wildcard behavior.
Open a document through the same Nextcloud integration that failed. Then check fresh CODE logs: the “No acceptable WOPI hosts” rejection should be gone. Confirm that the document loads and can be saved; if a new error appears, use its message to identify the next layer. For the two host checks and the Nextcloud troubleshooting flow, consult Nextcloud Office troubleshooting and Nextcloud Office configuration. For CODE Docker alias groups, see the Collabora Online SDK 25.04 manual; use the documentation matching your installed release if its configuration differs.
Enable reliable Nextcloud file locking, choose the right Redis or Valkey backend, and verify the warning clears without risking concurrent file changes.
Fix common Nextcloud scan findings with current updates, HTTPS and HSTS, precise reverse-proxy trust, and checks against the public server.
Back up Nextcloud’s files and MariaDB together, schedule encrypted Restic snapshots with cron, and verify recovery without risking the live server.
Configure Nextcloud SSE for the storage that needs it, protect encryption keys, and measure transfer and CPU impact before encrypting existing files.
Connect Nextcloud’s file search to Elasticsearch, index document contents, and choose a setup that fits your server and security needs.
Configure Nextcloud to remove deleted files after a defined retention period, schedule background jobs reliably, and avoid commands that purge every user’s trash.
Run Nextcloud’s OCC repair safely, preview the database changes, and check why the warning might remain.
Allow larger Nextcloud browser uploads by aligning PHP, Nginx or Apache, temporary storage, and timeout settings—and verify which limit is blocking the file.
Set the PHP memory limit Nextcloud actually uses, restart the right service, and confirm the 512 MB setting in Admin Overview.
Mount a compatible object-storage bucket in Nextcloud using its S3 backend, with the right endpoint, credentials, access scope, and verification steps.