Connect Nextcloud to CODE Docker: Setup and Tradeoffs

Connect Nextcloud to Collabora CODE by running the official collabora/code image, restrict its port to the host, route an HTTPS office subdomain through a WebSocket-capable reverse proxy, and set that public URL in Nextcloud’s Collabora integration. Ten minutes is plausible only if Docker, DNS, TLS, and the proxy are ready.

Choose the right office service first. As of October 2026, Nextcloud distinguishes its Euro-Office-powered Nextcloud Office from Collabora Online. CODE is Collabora Online Development Edition, so use the Collabora integration, not the Euro-Office connector. The built-in CODE app is quickest for personal use, but Nextcloud describes it as slower and lacking advanced scalability. A separate container is easier to manage independently but adds proxy and update work. CODE suits home use and testing; choose a supported Collabora Online deployment when a business needs production support.

A terminal window with abstract command lines and a green running-status indicator
Illustration: a terminal view represents starting the CODE container and checking that the process is running.

Before you start: the ten-minute path

Have a working Nextcloud HTTPS address, a separate office hostname with valid TLS, and Docker access on the CODE host. Point the office hostname to a reverse proxy that can route to the container. Both users’ browsers and the Nextcloud server must reach the office URL.

If DNS or TLS is not ready, don’t expose port 9980 publicly as a shortcut. Bind it to loopback and finish the proxy first.

1. Start the CODE Docker container

Replace the sample Nextcloud hostname with the exact HTTPS origin users use to sign in. The aliasgroup1 setting restricts which WOPI host (the file service that supplies documents to the editor) may connect. Do not use a wildcard just to make a failed connection disappear.

docker pull collabora/code

docker run -t -d --name collabora-code -p 127.0.0.1:9980:9980 -e 'aliasgroup1=https://cloud.example.com:443' --restart unless-stopped --cap-add MKNOD collabora/code

Binding to 127.0.0.1 keeps the port private while a proxy on the same host can reach it. If your proxy is elsewhere, allow only that trusted proxy to connect to port 9980.

Check that the container started and that its discovery endpoint answers locally:

docker ps --filter name=collabora-code
docker logs --tail=50 collabora-code
curl -kfsS -o /dev/null -w 'Discovery HTTP %{http_code}\n' https://127.0.0.1:9980/hosting/discovery

-k bypasses certificate validation only for this local self-signed check; it does not fix an invalid public certificate.

2. Put the public office hostname behind HTTPS

Serve https://office.example.com from your reverse proxy with a valid certificate and route requests to CODE. Collabora’s proxy guidance covers editor assets, discovery/capabilities, /cool/, and WebSocket forwarding. Without WebSocket upgrades, the page may load while the editor fails.

Use the maintained configuration for your proxy software. If it terminates TLS before CODE, follow the documented backend TLS settings; don’t disable certificate checks globally.

A reverse-proxy settings screen showing a secured hostname and two traffic routes
Illustration: a proxy configuration screen represents the HTTPS office hostname and the routes that must reach CODE.

3. Connect the Collabora integration in Nextcloud

In Nextcloud, enable or install the Collabora integration app available for your release. Then open the administration area for Office and enter the public Collabora URL, https://office.example.com. Current manuals label the setting “Collabora Online Server”; wording and app labels can vary by release, especially as Nextcloud adds its Euro-Office option. Select Collabora Online for this CODE server. Do not enter the container-only address https://127.0.0.1:9980 unless Nextcloud itself runs on the same host and that address is also the configured service endpoint; in the recommended proxy setup, use the public office hostname.

Save the setting and run the built-in connection check if your release shows one. If it fails, compare the exact Nextcloud origin in aliasgroup1, confirm that both Nextcloud and the browser can resolve and reach the office hostname, and inspect the reverse-proxy logs for denied paths or WebSocket errors.

A Nextcloud-style administration panel with an office integration card and server URL field
Illustration: the administration panel represents selecting the Collabora integration and entering its HTTPS server address.

4. Verify editing, then choose whether CODE fits

Open a small test document in Nextcloud and confirm that it opens in the browser editor, accepts a change, saves, and reopens with that change intact. Test from a normal user account as well as an administrator account. A working discovery check alone confirms that CODE responds; it does not prove that WOPI authorization, proxy WebSockets, and document save operations all work.

A browser-based document editor showing a toolbar and an open document page
Illustration: an open document editor is the final check that Nextcloud can launch the editing interface.

For a personal server or small team, CODE Docker separates the editor from Nextcloud’s PHP stack. You also own the proxy, restarts, compatibility checks, and image updates. The built-in CODE app is simpler but shares the host and has fewer scalability features. For an organization that depends on daily editing, evaluate a supported Collabora Online service instead of treating CODE as a production guarantee.

When ready to update CODE, pull the new image and recreate the container with the same options. Review the release notes and test document opening and saving before updating a service users rely on; the latest tag can move. Pin a specific image version when repeatable rollouts matter.

Verification

The setup is working when the public office hostname presents a valid certificate, the Nextcloud connection check succeeds, and a test document opens, saves, and reopens through the editor. If the office landing page loads but editing hangs, check WebSocket forwarding. If Nextcloud reports that the host is not allowed, correct aliasgroup1 to match the actual Nextcloud origin. If CODE responds locally but not from users’ browsers, check public DNS, firewall routing, and the reverse proxy.

References: Nextcloud’s Docker installation example; Nextcloud Office installation options; Nextcloud Collabora configuration; Collabora reverse-proxy settings; official CODE Docker image details; Nextcloud Hub 26 Summer office options.

Leave a Comment

Connect Nextcloud to CODE Docker: Setup and Tradeoffs

Connect Nextcloud to CODE Docker: Setup and Tradeoffs

Compare built-in and Docker-based CODE, then connect Collabora Online to Nextcloud through a secure HTTPS reverse proxy.

Build a Resilient Nextcloud Cluster with Galera

Plan a reliable Nextcloud HA deployment with shared storage, Redis locking, quorum-aware MariaDB routing, and practical failover checks.

Get Nextcloud Talk Calls Through When Direct Media Fails

Get Nextcloud Talk Calls Through When Direct Media Fails

Configure and verify a reachable TURN relay for Nextcloud Talk when firewalls or restrictive NAT block direct call media.

Clear Nextcloud Integrity Warnings by Restoring the Right Files

Use the invalid-file report to identify changed, missing, or extra Nextcloud code, restore trusted files safely, and verify the result.

Connect Gmail or Microsoft 365 to Nextcloud Mail Using OAuth2

Set up OAuth2 for Nextcloud Mail with Gmail or Microsoft 365, verify receiving and sending, and resolve common consent and SMTP failures.

Clear Stuck Nextcloud Maintenance Mode Safely With OCC

Clear Stuck Nextcloud Maintenance Mode Safely With OCC

Use OCC to restore Nextcloud access, verify database migration status, and choose the right command for archive, Docker, or Snap installs.

Set Up Nextcloud LDAP and Active Directory Login

Connect Nextcloud to LDAP or Active Directory, limit access with user and group filters, and verify secure authentication before rollout.

Require Two-Factor Authentication for Nextcloud Users

Enable a supported 2FA provider, prepare account recovery, then require two-factor authentication for everyone or selected Nextcloud groups.

Protect Collabora CODE Documents at Rest with Storage Encryption

Secure files edited in Collabora CODE by encrypting the storage layer, protecting temporary data, and verifying encryption and recovery.

Get Collabora CODE Running on ARM64 With the Correct Image

Get Collabora CODE Running on ARM64 With the Correct Image

Check your host architecture, confirm the CODE tag publishes ARM64, remove forced AMD64 settings, and separate image errors from permissions or memory issues.