Project

General

Profile

Collabora on Ubuntu 2004 natively » History » Version 5

Gareth Eaton, 08/23/2024 08:33 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
     ```bash
57
     sudo apt update -y
58
     ```
59 1 Gareth Eaton
60 4 Gareth Eaton
6. **Install Collabora Online**:
61
* Install Collabora Online and its necessary components:
62
     
63 1 Gareth Eaton
<pre>
64 4 Gareth Eaton
sudo apt install -y coolwsd code-brand
65 1 Gareth Eaton
</pre>
66
67
68 4 Gareth Eaton
h3. **Step 2: Configure Collabora Online**
69 1 Gareth Eaton
70 4 Gareth Eaton
1. **Disable HTTPS in Collabora**:
71
   - Since Nginx Proxy Manager will handle SSL, disable HTTPS within Collabora:
72
     ```bash
73
     sudo coolconfig set ssl.enable false
74
     sudo coolconfig set ssl.termination true
75
     ```
76
2. **Configure Trusted Domains**:
77
* Allow your Nextcloud instance to communicate with Collabora:
78
     
79
<pre>
80
sudo coolconfig set storage.wopi.host nextcloud.example.com
81
</pre>
82 1 Gareth Eaton
83 4 Gareth Eaton
* Replace `nextcloud.example.com` with your actual Nextcloud domain.
84 1 Gareth Eaton
85 4 Gareth Eaton
3. **Create an Admin Account**:
86
* Set up an admin account to manage your Collabora instance:
87
<pre>
88
sudo coolconfig set-admin-password
89
</pre>
90 1 Gareth Eaton
91 4 Gareth Eaton
* Follow the prompts to enter a username and password.
92 1 Gareth Eaton
93 4 Gareth Eaton
4. **Restart Collabora Service**:
94
* Restart the service to apply the configuration changes:
95
    
96
<pre>
97
     sudo systemctl restart coolwsd
98
     sudo systemctl status coolwsd
99
</pre>
100 1 Gareth Eaton
101
102 4 Gareth Eaton
h3.  **Step 3: Configure Nginx Proxy Manager**
103 1 Gareth Eaton
104 4 Gareth Eaton
1. **Access Nginx Proxy Manager**:
105
* Open your Nginx Proxy Manager dashboard on the server where it’s installed.
106 1 Gareth Eaton
107 4 Gareth Eaton
2. **Add a New Proxy Host**:
108
* **Domain Name**: Enter the subdomain you want to use for Collabora (e.g., `collabora.example.com`).
109
* **Forward Hostname/IP**: Enter the internal IP address of your Collabora server.
110
* **Forward Port**: Use port `9980`, the default for Collabora.
111
* **SSL**: Enable SSL and select "Request a new SSL certificate" using Let's Encrypt.
112
113
3. **Advanced Configuration**:
114
* In the advanced tab, add the following headers to ensure proper proxying:
115
     
116
<pre>
117
     proxy_set_header Upgrade $http_upgrade;
118
     proxy_set_header Connection "Upgrade";
119
     proxy_set_header Host $http_host;
120
     proxy_read_timeout 36000s;
121
</pre>
122
123
124
4. **Save and Apply**:
125
* Save your configuration and ensure that the proxy host is working correctly.
126
127
### **Step 4: Integrate Collabora with Nextcloud**
128
129
1. **Log in to Nextcloud**:
130
* Access your Nextcloud instance and log in with an admin account.
131
132
2. **Configure Collabora Integration**:
133
* Go to **Settings** -> **Administration** -> **Collabora Online**.
134
* Enter the Collabora Online URL (e.g., `https://collabora.example.com`) in the appropriate field.
135
* Save the settings to complete the integration.