This guide walks you step by step until you get Collabora Online Development Edition published as a service on the Edge that can be accessed on the Internet. From there on, you can configure file mamagement solutions, such as Nextcloud, to open office files (documents, spreadsheets, etc.) using this instance of CODE on the Edge.
Make sure that all of the mandatory prerequisites have been met before progressing further.
Name | Source | Description |
---|---|---|
<CONTAINER_NAME> | User input | The name of the Linux container where the CODE server will run, e.g. code . |
<IP_ADDRESS_INET_GW> | Linux VPS Admin Panel | The static and public IPv4 address of the Internet Gateway. |
<IP_ADDRESS_SERVER__VPN> | User input | The IPv4 address of the server on the Edge in the VPN, e.g. 10.5.5.2 . |
<CODE_WEBSITE_DOMAIN> | User input | The domain name for the A record created with your domain registrar, e.g. mynextcloud42.net . |
Going through all the steps in this guide shall take around 15 min. with decent Internet connection.
Run the following commands on your server on the Edge.
incus launch images:debian/bullseye/cloud <CONTAINER_NAME>
incus exec <CONTAINER-NAME> bash
ip link set dev eth0 mtu 1000
Changing the MTU for the network interface is not persisted. After rebooting the container the old value will be used.
apt update && apt upgrade && apt install wget
cd /usr/share/keyrings
wget https://collaboraoffice.com/downloads/gpg/collaboraonline-release-keyring.gpg
vi /etc/apt/sources.list.d/collaboraonline.sources
Bring the folling configuration as content of the file.
Types: deb
URIs: https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-debian11
Suites: ./
Signed-By: /usr/share/keyrings/collaboraonline-release-keyring.gpg
apt update && apt install coolwsd code-brand
vi /etc/coolwsd/coolwsd.xml
There is a very high number of interesting settings that you can adjust. To the least of it, make sure that you will populate the value of the server_name
element with the public address of your Collabora Online instance. You can find an example below. Substitute the value of the variable with a domain name that you own.
<server_name
default=""
type="string">code.<CODE_WEBSITE_DOMAIN></server_name>
The default configuration is looking for an SSL certificate and key, which are not present, so probably it’s the best to disable SSL, and optionally enable SSL termination, then set up the reverse proxy. Source: CODE Installation Guide
<ssl desc="SSL settings">
<enable default="true" type="bool">false</enable>
<termination default="false" type="bool">true</termination>
...
systemctl restart coolwsd
systemctl status coolwsd
The systemd service shoud be up & running.
On the server on Edge run the following command.
incus config device add <CONTAINER_NAME> code_9980 proxy \
listen=tcp:0.0.0.0:9980 connect=tcp:127.0.0.1:9980
ssh mycelium@<IP_ADDRESS__INET_GW>
sudo su -
Make sure that you have created an "A" domain record for drive.<NEXTCLOUD_WEBSITE_DOMAIN> with your domain registrar and you have waited for this record to become active.
If the "A" record is not updated yet, Caddy will not be able to serve HTTPS requests because of Let's Encrypt (An SSL certificate authority) failing to verify the validity (ownership over) of the domain.
Append the following reverse proxy configuration to /etc/caddy/Caddyfile
.
code.<CODE_WEBSITE_DOMAIN> {
# Use the IP address of the host within the Wireguard VPN.
reverse_proxy http://<IP_ADDRESS_SERVER__VPN>:9980
}
systemctl reload caddy
systemctl status caddy
The systemd service should be up & running. You should be able to send a GET HTTP request to
https://code.<CODE_WEBSITE_DOMAIN>
and it will return "OK".
https://code.<CODE_WEBSITE_DOMAIN>:443
.