You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Learn how to set up and run Collabora Online Development Edition (CODE) with Nextcloud for collaborative document editing
4
+
---
5
+
6
+
# Running Collabora
7
+
8
+
## Introduction
9
+
10
+
The **Collabora Online Development Edition (CODE)** is a server that provides online document editing. It allows collaborative editing of common office documents and serves as an open-source alternative to Office365.
11
+
12
+
This guide demonstrates the installation using a Nextcloud example – from initial setup to creating and opening your first document.
13
+
14
+
### Requirements
15
+
16
+
1. Installed and configured Nextcloud version 29 or higher, with [Nextcloud Office](https://apps.nextcloud.com/apps/richdocuments) installed
17
+
2. mStudio with a hosting plan that supports [containerized workloads](/docs/v2/platform/workloads/containers)
18
+
3. Sufficient free RAM (see dashboard)
19
+
4. An already existing subdomain for CODE (e.g. `code.my-domain.tld`)
We assume that a working Nextcloud is already installed and configured. It is important that the [Nextcloud Office](https://apps.nextcloud.com/apps/richdocuments) app is also installed in the backend of Nextcloud. If it's not installed yet, you can add it via the Nextcloud App Store.
31
+
32
+
Collabora/CODE can be operated either as a separate instance in its own project or per Nextcloud instance, depending on your use case. Both setups are possible: either one CODE instance per Nextcloud or one centralized CODE instance for multiple Nextclouds.
33
+
34
+
:::
35
+
36
+
## How do I start the container?
37
+
38
+
### Using the mStudio UI
39
+
40
+
In mStudio, go to your project and select **“Create container”**. A guided dialog will open to assist you with the container setup.
41
+
42
+
First, enter a description – this is a free text field used to identify the container. For example, enter **“collabora/code”** and click **“Next”**.
43
+
44
+
Next, you'll be asked for the image name. You can find this on [Docker Hub](https://hub.docker.com/r/collabora/code), in this case it is `collabora/code`. Enter this value and confirm with **“Next”**.
45
+
46
+
#### Entrypoint and Volume
47
+
48
+
- The **Entrypoint** can remain unchanged → **“Next”**
49
+
- In the next step, you can create a **Volume** (persistent storage). This is not strictly required for `collabora/code`, so you can skip this step → **“Next”**
50
+
51
+
#### Environment Variables
52
+
53
+
In the next step **“Add environment variables”**, we need to make some adjustments. Click **“Add variable”** – two input fields (Key & Value) will appear.
54
+
55
+
Now it depends on whether `collabora/code` will be used for **a single** Nextcloud instance in the same project or for **multiple** Nextcloud instances. Replace `code.my-domain.tld` with your actual subdomain.
56
+
57
+
**For a single Nextcloud instance in the same project:**
`aliasgroup1=https://.*:443` allows access from **all** external domains. For better security, you can use a more restrictive domain pattern – see the [documentation](https://sdk.collaboraonline.com/docs/installation/CODE_Docker_image.html#how-to-grab-the-code-image-from-docker-image).
72
+
73
+
:::
74
+
75
+
Once you've entered the desired value, click **“Next”**. In the final dialog, you’ll be asked for the **port** – you can leave this unchanged. Click **“Create container”** to create and start the container.
76
+
77
+
### Alternative: Using the `mw container run` command
78
+
79
+
You can also use the `mw container run` command to directly create and start a Collabora container from the command line. This approach is similar to using the Docker CLI and allows you to specify all container parameters in a single command.
80
+
81
+
For a single Nextcloud instance in the same project:
82
+
83
+
```bash
84
+
mw container run \
85
+
--name collabora \
86
+
--description "Collabora Online Development Edition" \
Make sure to replace `code.my-domain.tld` with your actual subdomain. The `--publish` flag exposes port 9980, which is the default port used by Collabora. The `--name` flag sets the container name, which will also be used as the internal DNS name.
104
+
105
+
After creating the container, you'll still need to assign a domain to it as described in the "Assign Domain" section below.
106
+
107
+
### Alternative: Using the `mw stack deploy` command
108
+
109
+
Alternatively, you can use the `mw stack deploy` command, which is compatible with Docker Compose. This approach allows you to define your container configuration in a YAML file and deploy it with a single command.
110
+
111
+
First, create a `docker-compose.yml` file with the following content:
112
+
113
+
```yaml
114
+
services:
115
+
collabora:
116
+
image: collabora/code
117
+
ports:
118
+
- "9980/tcp"
119
+
environment:
120
+
# For a single Nextcloud instance in the same project:
Make sure to replace `code.my-domain.tld` with your actual subdomain. Choose the appropriate `extra_params` configuration based on your use case (single or multiple Nextcloud instances).
127
+
128
+
Then, deploy the container using the `mw stack deploy` command:
129
+
130
+
```bash
131
+
mw stack deploy
132
+
```
133
+
134
+
This command will read the `docker-compose.yml` file from the current directory and deploy it to your default stack. If you want to specify a different file or stack, you can use the following options:
After deploying the container, you'll still need to assign a domain to it. You can do this through the mStudio UI as described in the "Assign Domain" section above.
141
+
142
+
### Assign Domain
143
+
144
+
Now switch to the **Domains** section and link `code.my-domain.tld` with your container. Select the domain and set the target to the container you just created.
145
+
146
+
Alternatively, use the `mw domain virtualhost create` CLI command with the `--path-to-container` flag.
147
+
148
+
## Integration in Nextcloud
149
+
150
+
In order for Nextcloud to communicate with `collabora/code`, you need to configure it in the backend of Nextcloud. Log in to your Nextcloud as an **admin user** (admin rights required!).
151
+
152
+
Navigate to **Administration Settings** > **Office**. Select **“Use your own server”** and fill in the field as follows:
153
+
154
+
### Single instance in the same project
155
+
156
+
In the **“URL (and port) of Collabora Online server”** field, enter the container hostname – for example `http://collabora:9980` (the hostname matches the container name). Enable the checkbox **“Disable certificate verification”**.
157
+
158
+
You should now see a green confirmation message:
159
+
160
+
```
161
+
Collabora Online server is reachable.
162
+
Collabora Online Development Edition 24.04.13.2 ded56d8ff7
163
+
URL used by browser: https://code.your-domain.tld
164
+
Nextcloud URL used by Collabora: https://nextcloud.your-domain.tld
165
+
```
166
+
167
+
### Instance for multiple Nextclouds
168
+
169
+
Enter the publicly accessible URL of the Collabora server, e.g., `https://code.my-domain.tld`. The certificate verification checkbox **does not need to be enabled** if a valid SSL certificate (e.g. Let’s Encrypt) is in place.
170
+
171
+
You'll also get the green success message if everything is correct:
172
+
173
+
```
174
+
Collabora Online server is reachable.
175
+
Collabora Online Development Edition 24.04.13.2 ded56d8ff7
176
+
URL used by browser: https://code.my-domain.tld
177
+
Nextcloud URL used by Collabora: https://nextcloud.other-domain.tld
178
+
```
179
+
180
+
## Create a document
181
+
182
+
You can create a new document directly within Nextcloud: go to the **Files** section and click **“+ New”** to create and start editing your first document.
183
+
184
+
If you want to collaborate with other users on the same document, you can do so directly in the browser – simply open the document.
Copy file name to clipboardExpand all lines: docs/platform/databases/opensearch.mdx
+169-5Lines changed: 169 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,11 +11,19 @@ import PlanCompatibility from "@site/src/components/PlanCompatibility";
11
11
12
12
## What is OpenSearch?
13
13
14
-
OpenSearch is a community-driven, open-source search engine forked from Elasticsearch. It is a distributed, RESTful search and analytics engine capable of solving a growing number of use cases. As a fork of Elasticsearch, OpenSearch is fully compatible with Elasticsearch APIs and plugins.
14
+
OpenSearch is a distributed, community-driven, Apache 2.0-licensed, 100% open-source search and analytics suite used for a wide range of use cases such as real-time application monitoring, log analytics, and website search. OpenSearch provides a highly scalable system for fast access and response to large volumes of data, with an integrated visualization tool, OpenSearch Dashboards, which makes it easy for users to explore their data. OpenSearch is built on the Apache Lucene search library and supports a variety of search and analytics features.
15
+
16
+
OpenSearch originated as an open-source fork of ElasticSearch after the latter stopped offering a fully open-source version. Using OpenSearch has the advantage that, among other things, full-text search and many other features are available that can extend the search and analytics capabilities of a CMS. For Magento >=2.4, OpenSearch is a prerequisite for installation.
17
+
18
+
As a fork of Elasticsearch, OpenSearch is fully compatible with Elasticsearch APIs and plugins.
15
19
16
20
## Creating an OpenSearch database
17
21
18
-
You can provision an OpenSearch database in your mittwald hosting environment using [containers](../../workloads/containers). The most convenient way to do this is using [Terraform](../../deployment/terraform) using our [OpenSearch module](https://registry.terraform.io/modules/mittwald/opensearch/mittwald/latest). The following example shows how you can use this module in your own Terraform deployment:
22
+
You can provision an OpenSearch database in your mittwald hosting environment using [containers](../../workloads/containers). There are two main approaches:
23
+
24
+
### Using Terraform (Recommended)
25
+
26
+
The most convenient way to provision an OpenSearch database is using [Terraform](/docs/v2/guides/deployment/terraform) with our [OpenSearch module](https://registry.terraform.io/modules/mittwald/opensearch/mittwald/latest). The following example shows how you can use this module in your own Terraform deployment:
19
27
20
28
```hcl
21
29
resource "random_password" "opensearch_admin" {
@@ -37,10 +45,166 @@ output "opensearch_url" {
37
45
38
46
After this, you can access your OpenSearch backend using the URL returned by the module. Usually, the URL should be `https://opensearch:9200`. The default username is `admin`, and the password is the one generated by the `random_password` resource.
39
47
48
+
### Using the mStudio UI
49
+
50
+
Alternatively, you can set up an OpenSearch container manually:
51
+
52
+
1. Go to **Containers** in your project in mStudio and create a new one. You can choose any name you like.
53
+
54
+
2. Enter the image `opensearchproject/opensearch`. You can keep the entrypoint and command as suggested.
55
+
56
+
3. To make your OpenSearch data persistent, create a volume under **Volumes** as follows:
57
+
58
+
- Volume: Create new volume
59
+
- Path in container (Mount Point): `/usr/share/opensearch/data`
60
+
61
+
4. Set the following environment variables for the container:
62
+
63
+
```dotenv
64
+
OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m # limits OpenSearch RAM usage - extremely important, otherwise 32 GB RAM will be consumed
65
+
bootstrap.memory_lock=true # together with the previous line ensures no swapping occurs
66
+
cluster.name=opensearch-cluster # name for the OS cluster
67
+
discovery.seed_hosts=opensearch-test # specifies which node should be used in the cluster
68
+
node.name=opensearch-test # name for the OS node
69
+
plugins.security.ssl.http.enabled=false # enables connection via HTTP, since containers cannot handle HTTPS
70
+
discovery.site=single-node
71
+
OPENSEARCH_INITIAL_ADMIN_PASSWORD=SuperSecurePassword123 # sets the admin password. Since version 2.12 this is mandatory
72
+
```
73
+
74
+
The default user for OpenSearch is `admin`.
75
+
76
+
The suggested port values are standard in the OpenSearch context and can be accepted as is.
77
+
78
+
### Using the CLI with `mw container run`
79
+
80
+
You can also deploy an OpenSearch container using the mittwald CLI with the `mw container run` command:
This command creates a new container named "opensearch" using the OpenSearch image, sets all the necessary environment variables, and mounts a volume for persistent data storage.
98
+
99
+
### Using the CLI with `mw stack deploy`
100
+
101
+
If you prefer using Docker Compose, you can create a `docker-compose.yml` file and deploy it using the `mw stack deploy` command:
102
+
103
+
1. Create a `docker-compose.yml` file with the following content:
"tagline": "The OpenSearch Project: https://opensearch.org/"
160
+
}
161
+
```
162
+
163
+
## Operation
164
+
165
+
OpenSearch runs as long as the container is running. When using OpenSearch as a search engine for your CMS, the search indices need to be populated by your application. For this, most CMS platforms offer integrations.
166
+
167
+
The volume is automatically included in the regular backup of your project.
168
+
40
169
## Setting up common applications
41
170
42
-
:::important[Call for contributors!]
171
+
To integrate OpenSearch into applications, an entry is usually required in the configuration file of the CMS. In this section, you will find examples for various CMS platforms.
172
+
173
+
### Magento 2
174
+
175
+
For Magento 2, the hostname is simply entered in the app's installation menu. The setup automatically handles the configuration.
176
+
177
+
### Shopware 6
43
178
44
-
This section is currently empty. Please use this projects [issue tracker](https://github.com/mittwald/developer-portal/issues) to request documentations for specific integrations. If you yourself have experience setting up OpenSearch with common open-source applications, we will also gladly accept [Pull Requests](https://github.com/mittwald/developer-portal) to add respective tutorials.
179
+
In Shopware, the `.env` or `.env.local` files already contain lines where connection data must be stored:
USERNAME is always `admin` in our case. The PASSWORD is the `OPENSEARCH_INITIAL_ADMIN_PASSWORD` we set.
190
+
191
+
Afterwards, the index must be populated via the Shopware console using this command:
192
+
193
+
```bash
194
+
php bin/console es:admin:index
195
+
```
196
+
197
+
To make it visible in the frontend, the consumer must be running and the cache cleared.
198
+
199
+
### TYPO3
200
+
201
+
TYPO3 does not natively support OpenSearch, so an extension is required. One possible integration would be [`pluswerk/elasticsearch`](https://github.com/pluswerk/elasticsearch).
202
+
203
+
### WordPress
204
+
205
+
WordPress cannot natively connect to OpenSearch, but you can use the [ElasticPress](https://wordpress.org/plugins/elasticpress/) plugin for this. The connection settings must be adjusted in the plugin backend because the CLI extension of ElasticPress cannot handle the initial setup.
206
+
Afterwards, indexing can be enabled using the command:
Copy file name to clipboardExpand all lines: docs/platform/workloads/nodejs.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,7 +57,7 @@ import TerraformResourceHint from "@site/src/components/TerraformResourceHint";
57
57
58
58
After you have created your Node.js app, you can deploy your code by moving it into the designated application directory. You may use any method that you prefer to deploy your code, such as a local Git clone, rsync or SFTP.
59
59
60
-
Have a look at our collection of [deployment guides](/docs/v2/category/deployment-guides) for more information on how to deploy your code.
60
+
Have a look at our collection of [deployment guides](/docs/v2/category/guides/deployment/) for more information on how to deploy your code.
0 commit comments