Project

General

Profile

Collabora on Ubuntu 2004 natively » History » Version 12

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

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