Project

General

Profile

Collabora on Ubuntu 2004 natively » History » Version 8

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