Project

General

Profile

Collabora on Ubuntu 2004 natively » History » Version 4

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