How to Install Collabora Office on Ubuntu 24.04
Collabora Online is an online office suite application based on LibreOffice. Collabora Online is one of the applications that can be integrated with Nextcloud, providing a complete solution for real-time editing of documents, spreadsheets, and presentations. With Collabora Online, teams can collaborate simultaneously on the same document, enhancing productivity and collaboration efficiency.
In this tutorial, we will learn how to install Collabora Online to integrate it into Nextcloud as an online office application.
Tutorial Environment
This tutorial uses:
- VPS: Vultr 1 CPU 1 GB RAM
- OS: Ubuntu 24.04
- Web server: Nginx
- Subdomain: collabora.aminlabs.my.id
- SSL: Let’s Encrypt
- Collabora: Collabora Online Development Edition (CODE) v24.04.4.2 fbf97e9 via package
Notes:
- System requirements for Collabora Online can be found at github.com/CollaboraOnline/richdocumentscode.
- For the Nextcloud installation tutorial, see How to Install Nextcloud with Nginx on Ubuntu 24.04.
- Sign up here to get $100 free credit from Vultr
Install Collabora Online
The steps to install Collabora include installing the package, configuring Collabora, configuring Nginx, and integrating it into Nextcloud.
1. Install CODE
Update and upgrade the Ubuntu system first:
1 2 | sudo apt update sudo apt upgrade -y |
Import the Collabora CODE signing key:
1 2 | cd /usr/share/keyrings sudo wget https://collaboraoffice.com/downloads/gpg/collaboraonline-release-keyring.gpg |
Create a file for the Collabora CODE package repository:
1 | sudo nano /etc/apt/sources.list.d/collaboraonline.sources |
Enter the repository configuration:
1 2 3 4 | Types: deb URIs: https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-deb Suites: ./ Signed-By: /usr/share/keyrings/collaboraonline-release-keyring.gpg |
Install the CODE packages:
1 2 | sudo apt update sudo apt install coolwsd code-brand -y |
2. Configuration of CODE
Make the necessary configurations by modifying the /etc/coolwsd/coolwsd.xml file.
1 2 3 4 5 6 | sudo coolconfig set ssl.enable false sudo coolconfig set ssl.termination true sudo coolconfig set net.proto IPv4 sudo coolconfig set net.listen 127.0.0.1 sudo coolconfig set storage.wopi.host nextcloud.aminlabs.my.id sudo coolconfig set-admin-password |
Restart the coolwsd service:
1 | sudo systemctl restart coolwsd |
3. Nginx Configuration
Install Nginx:
1 | sudo apt install nginx -y |
Create a new Nginx configuration file for the subdomain collabora.aminlabs.my.id:
1 | sudo nano /etc/nginx/sites-available/collabora.aminlabs.my.id.conf |
Enter the configuration:
1 2 3 4 | server { listen 80; server_name collabora.aminlabs.my.id; } |
Enable the Nginx server block configuration:
1 | sudo ln -s /etc/nginx/sites-available/collabora.aminlabs.my.id.conf /etc/nginx/sites-enabled |
Restart the nginx service:
1 | sudo systemctl restart nginx |
Open ports 80 and 443 if UFW firewall is active:
1 2 | sudo ufw allow 80 sudo ufw allow 443 |
Install Certbot for Nginx:
1 | sudo apt install certbot python3-certbot-nginx -y |
Request SSL for the subdomain collabora.aminlabs.my.id:
1 2 3 4 5 6 7 | sudo certbot --non-interactive \ -m admin@aminlabs.my.id \ --agree-tos \ --no-eff-email \ --nginx \ -d collabora.aminlabs.my.id \ --redirect |
Open the previously created Nginx server block configuration file:
1 | sudo nano /etc/nginx/sites-available/collabora.aminlabs.my.id.conf |
Modify the configuration contents for reverse proxy to the Collabora server:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name collabora.aminlabs.my.id; server_tokens off; ssl_certificate /etc/letsencrypt/live/collabora.aminlabs.my.id/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/collabora.aminlabs.my.id/privkey.pem; include /etc/letsencrypt/options-ssl-nginx.conf; ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # static files location ^~ /browser { proxy_pass http://127.0.0.1:9980; proxy_set_header Host $http_host; } # WOPI discovery URL location ^~ /hosting/discovery { proxy_pass http://127.0.0.1:9980; proxy_set_header Host $http_host; } # Capabilities location ^~ /hosting/capabilities { proxy_pass http://127.0.0.1:9980; proxy_set_header Host $http_host; } # main websocket location ~ ^/cool/(.*)/ws$ { proxy_pass http://127.0.0.1:9980; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $http_host; proxy_read_timeout 36000s; } # download, presentation and image upload location ~ ^/(c|l)ool { proxy_pass http://127.0.0.1:9980; proxy_set_header Host $http_host; } # Admin Console websocket location ^~ /cool/adminws { proxy_pass http://127.0.0.1:9980; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $http_host; proxy_read_timeout 36000s; } access_log /var/log/nginx/collabora.aminlabs.my.id_access.log; error_log /var/log/nginx/collabora.aminlabs.my.id_error.log; } server { listen 80; listen [::]:80; server_name collabora.aminlabs.my.id; server_tokens off; return 301 https://$server_name$request_uri; } |
Restart the nginx service:
1 | sudo systemctl restart nginx |
4. Integration with Nextcloud
Log in to Nextcloud as an admin, click the profile > +Apps icon. Click on the Office & Text menu, then click Download and enable for Collabora Online – Built-in CODE Server and Nextcloud Office.
Then click profile > Administration settings > Nextcloud Office.
Select Use your own server, enter the CODE subdomain in URL (and Port) of Collabora Online-server, which is collabora.aminlabs.my.id.
Then enter the IP address of the Collabora Online server in Allow list for WOPI requests.
5. Testing
Test the integration of Collabora Online with Nextcloud by opening one of the Open Document Format files such as .odt, .ods, or .odp.
If you found this article helpful and would like to support my work, consider making a donation through PayPal. Your support helps me continue creating useful content and tutorials. Thank you!
Donate via PayPal: https://paypal.me/musaamin
Mohon maaf ijin bertanya apakah bisa menginstall Collabora office tanpa domain sama SSL ?
belum coba pak, sepertinya bisa.
Kalau disatukan dalam satu server dengan nextcloud nya ada perubahan di settingannya?
tidak ada