Project

General

Profile

Collabora on Ubuntu 2004 natively » History » Version 9

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