This guide uses Docker Compose to run Collabora Online CODE (Collabora Online Development Edition) in containers. Collabora Online is a collaborative document editor based on LibreOffice technology that integrates with platforms like Nextcloud and ownCloud.
For Docker installation, see Docker.
Create a docker-compose.yml file with the following content:
version: '3.8'
services:
collabora:
image: collabora/code:latest
container_name: collabora-online
restart: unless-stopped
ports:
- "9980:9980"
environment:
- aliasgroup1=https://cloud\.example\.com:443
- username=admin
- password=your-secure-admin-password
- server_name=cloud.example.com
- dictionaries=en_US
- extra_params=--o:ssl.enable=false
- DONT_GEN_SSL_CERT=true
cap_add:
- SYS_CHROOT
- SYS_ADMIN
Security Note: Replace the following before deployment:
cloud.example.com - Your Nextcloud/ownCloud server domainyour-secure-admin-password - Strong admin password for Collabora admin consoledocker compose up -d
Wait for the container to start (approximately 30-60 seconds for first run).
Open https://YOUR-SERVER:9980 and log in with:
adminpassword environment variableIn the admin console, verify that the WOPI host (your Nextcloud/ownCloud URL) is allowed under the “Allowlist for WOPI requests” section.
For production deployments:
aliasgroup1 to match your Nextcloud/ownCloud domain exactlyFor nginx reverse proxy:
server {
listen 443 ssl;
server_name docs.example.com;
ssl_certificate /path/to/cert.pem;
ssl_certificate_key /path/to/key.pem;
location / {
proxy_pass http://localhost:9980;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
To allow multiple Nextcloud/ownCloud instances:
environment:
- aliasgroup1=https://cloud1\.example\.com:443|https://cloud2\.example\.com:443
See Configuration and Security for production hardening.
Any questions?
Feel free to contact us. Find all contact information on our contact page.