> For the complete documentation index, see [llms.txt](https://docs.arkannis.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.arkannis.net/storage/nextcloud/set-up-onlyoffice-on-nextcloud.md).

# Set up OnlyOffice on Nextcloud

### [Only Office Github Snap Page](https://github.com/ONLYOFFICE/snap-documentserver)

1. Install Only Office:

```bash
snap install onlyoffice-ds
```

2\. If installed on the same server as Nextcloud, change port

```bash
snap set onlyoffice-ds onlyoffice.ds-port=8888
```

3\. Generate SSL Certificate and PEM file

```bash
cd /var/snap/onlyoffice-ds/current/var/www/onlyoffice/Data/certs

# Generate Key
openssl genrsa -out onlyoffice.key 4096
# Request CSR
openssl req -new -key onlyoffice.key -out onlyoffice.csr
# Sign Certificate
openssl x509 -req -days 3650 -in onlyoffice.csr -signkey onlyoffice.key -out onlyoffice.crt
# Create PEM file
cat onlyoffice.key onlyoffice.crt > onlyoffice.pem
# Restart Service
snap restart onlyoffice-ds
```

4\. Change SSL Port

```bash
snap set onlyoffice-ds onlyoffice.ds-ssl-port=444
```

5\. Allow document server to use unauthorized storage

```bash
snap set onlyoffice-ds onlyoffice.use-unautorized-storage=true
```

6\. Open Firewall port

```bash
sudo ufw allow 444
```

1. Test Link - If you see the following page, it works
2. In nextcloud install & enable OnlyOffice
3. From Settings navigate to OnlyOffice and set up the parameters as follows


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.arkannis.net/storage/nextcloud/set-up-onlyoffice-on-nextcloud.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
