Project

General

Profile

Collabora on Ubuntu 2004 natively » History » Version 6

Gareth Eaton, 08/23/2024 08:35 AM

1 4 Gareth Eaton
h1. How to Manually Install Collabora Online on Ubuntu 20.04 with Nginx Proxy Manager
2 1 Gareth Eaton
3 4 Gareth Eaton
This guide walks you through the manual installation of Collabora Online on an Ubuntu 20.04 server, with an external Nginx Proxy Manager (NPM) managing SSL and reverse proxy settings on a separate server. This setup provides a secure and efficient way to integrate Collabora Online with services like Nextcloud.
4 1 Gareth Eaton
5 4 Gareth Eaton
h2. Why Use Nginx Proxy Manager on a Separate Server?
6 5 Gareth Eaton
7 4 Gareth Eaton
Using Nginx Proxy Manager on a separate server allows for centralized management of your reverse proxies, which is particularly beneficial when handling multiple services like Nextcloud, Collabora, and others. Nginx Proxy Manager simplifies SSL management with automatic Let's Encrypt certificates and provides an easy-to-use web interface for managing proxy hosts, making it ideal for users who want a straightforward way to secure and manage their web services.
8 1 Gareth Eaton
9 4 Gareth Eaton
h3. *Step 1: Set Up Collabora Online on Ubuntu 20.04*
10
11
1. **Update and Upgrade Your System**:
12
* Before installing Collabora, make sure your system is up to date:
13 1 Gareth Eaton
<pre>
14
sudo apt update
15 4 Gareth Eaton
sudo apt upgrade -y
16 1 Gareth Eaton
</pre>
17 4 Gareth Eaton
   
18 1 Gareth Eaton
19 4 Gareth Eaton
2. **Install Required Dependencies**:
20
* Install the necessary packages for handling HTTPS connections and certificates:
21
     
22
<pre>
23
sudo apt install -y apt-transport-https ca-certificates gnupg2 curl
24
</pre>
25
    
26 1 Gareth Eaton
27 4 Gareth Eaton
3. **Import the Collabora CODE Signing Key**:
28
* Download and install the GPG key needed to verify the Collabora packages:
29
     
30 1 Gareth Eaton
<pre>
31 4 Gareth Eaton
cd /usr/share/keyrings
32
sudo wget https://collaboraoffice.com/downloads/gpg/collaboraonline-release-keyring.gpg
33 1 Gareth Eaton
</pre>
34 4 Gareth Eaton
    
35 1 Gareth Eaton
36 4 Gareth Eaton
4. **Add the Collabora Repository**:
37
* Create a repository source file and add the Collabora repository:
38
  
39
<pre>
40
sudo nano /etc/apt/sources.list.d/collaboraonline.sources
41
</pre>
42 1 Gareth Eaton
43 4 Gareth Eaton
Paste the following content into the file:
44 1 Gareth Eaton
45
<pre>
46 4 Gareth Eaton
Types: deb
47
URIs: https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-ubuntu2204
48
Suites: ./
49
Signed-By: /usr/share/keyrings/collaboraonline-release-keyring.gpg
50 1 Gareth Eaton
</pre>
51
52 4 Gareth Eaton
Save and close the file.
53 1 Gareth Eaton
54 4 Gareth Eaton
5. **Update the Package List**:
55
* Update your package list to include the new repository:
56 6 Gareth Eaton
    
57
<pre>
58
sudo apt update -y
59
</pre>
60 4 Gareth Eaton
61 6 Gareth Eaton
62 4 Gareth Eaton
6. **Install Collabora Online**:
63
* Install Collabora Online and its necessary components:
64 1 Gareth Eaton
     
65 4 Gareth Eaton
<pre>
66 1 Gareth Eaton
sudo apt install -y coolwsd code-brand
67
</pre>
68
69 4 Gareth Eaton
h3. **Step 2: Configure Collabora Online**
70 1 Gareth Eaton
71 4 Gareth Eaton
1. **Disable HTTPS in Collabora**:
72
   - Since Nginx Proxy Manager will handle SSL, disable HTTPS within Collabora:
73
     ```bash
74
     sudo coolconfig set ssl.enable false
75
     sudo coolconfig set ssl.termination true
76
     ```
77
2. **Configure Trusted Domains**:
78
* Allow your Nextcloud instance to communicate with Collabora:
79
     
80
<pre>
81
sudo coolconfig set storage.wopi.host nextcloud.example.com
82
</pre>
83 1 Gareth Eaton
84 4 Gareth Eaton
* Replace `nextcloud.example.com` with your actual Nextcloud domain.
85 1 Gareth Eaton
86 4 Gareth Eaton
3. **Create an Admin Account**:
87
* Set up an admin account to manage your Collabora instance:
88
<pre>
89
sudo coolconfig set-admin-password
90
</pre>
91 1 Gareth Eaton
92 4 Gareth Eaton
* Follow the prompts to enter a username and password.
93 1 Gareth Eaton
94 4 Gareth Eaton
4. **Restart Collabora Service**:
95
* Restart the service to apply the configuration changes:
96
    
97
<pre>
98
     sudo systemctl restart coolwsd
99
     sudo systemctl status coolwsd
100
</pre>
101 1 Gareth Eaton
102
103 4 Gareth Eaton
h3.  **Step 3: Configure Nginx Proxy Manager**
104 1 Gareth Eaton
105 4 Gareth Eaton
1. **Access Nginx Proxy Manager**:
106
* Open your Nginx Proxy Manager dashboard on the server where it’s installed.
107 1 Gareth Eaton
108 4 Gareth Eaton
2. **Add a New Proxy Host**:
109
* **Domain Name**: Enter the subdomain you want to use for Collabora (e.g., `collabora.example.com`).
110
* **Forward Hostname/IP**: Enter the internal IP address of your Collabora server.
111
* **Forward Port**: Use port `9980`, the default for Collabora.
112
* **SSL**: Enable SSL and select "Request a new SSL certificate" using Let's Encrypt.
113
114
3. **Advanced Configuration**:
115
* In the advanced tab, add the following headers to ensure proper proxying:
116
     
117
<pre>
118
     proxy_set_header Upgrade $http_upgrade;
119
     proxy_set_header Connection "Upgrade";
120
     proxy_set_header Host $http_host;
121
     proxy_read_timeout 36000s;
122
</pre>
123
124
125
4. **Save and Apply**:
126
* Save your configuration and ensure that the proxy host is working correctly.
127
128
### **Step 4: Integrate Collabora with Nextcloud**
129
130
1. **Log in to Nextcloud**:
131
* Access your Nextcloud instance and log in with an admin account.
132
133
2. **Configure Collabora Integration**:
134
* Go to **Settings** -> **Administration** -> **Collabora Online**.
135
* Enter the Collabora Online URL (e.g., `https://collabora.example.com`) in the appropriate field.
136
* Save the settings to complete the integration.