Project

General

Profile

Collabora on Ubuntu 2004 natively » History » Version 11

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

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