Skip to main content

OnlyOffice

Deployment and configuration of OnlyOffice as an optional Docker Compose service.

📋 Prerequisites

⚠️ To enable OnlyOffice integration, first make sure that the reverse proxy configuration is enabled.

⚡ Activation

Follow the steps below to enable OnlyOffice with the Nginx reverse proxy.

Nginx configuration

In ./config/nginx/nginx.conf, uncomment the OnlyOffice include at the end of the file:

include onlyoffice.conf;

In ./config/nginx/docker-compose.nginx.yaml, ensure that the OnlyOffice configuration is mounted in the Nginx container:

services:
nginx:
volumes:
- ./onlyoffice.conf:/etc/nginx/onlyoffice.conf

Docker Compose configuration

In docker-compose.yaml, uncomment the required Docker Compose files:

include:
- ./config/nginx/docker-compose.nginx.yaml
- ./config/onlyoffice/docker-compose.onlyoffice.yaml

Sync-in configuration

In environment.yaml, enable the OnlyOffice integration:

server:
# Optional for now; required in the next major release
publicUrl: 'https://sync-in.domain.com'
applications:
files:
editors:
onlyoffice:
# enable integration
enabled: true
# use the same secret as in docker-compose.yaml
secret: 'REPLACE_WITH_LONG_RANDOM_ONLYOFFICE_SECRET'

Generate a secure value, then make sure it matches the one defined in ./config/onlyoffice/docker-compose.onlyoffice.yaml:

services:
onlyoffice:
environment:
- 'JWT_SECRET=REPLACE_WITH_LONG_RANDOM_ONLYOFFICE_SECRET'
info

docker compose up -d && docker compose restart nginx sync_in to apply the changes

🌐 Access

Sync-in and OnlyOffice run in Docker containers and communicate via the Nginx reverse proxy.

If you configure server.publicUrl, set it to the exact address used to access Sync-in, including any non-standard port. For example, with an Nginx port mapping of 8060:80, use http://your-server:8060. This URL must be reachable from the browser and from the OnlyOffice container. If omitted, Sync-in uses the request origin forwarded by Nginx as a compatibility fallback. For security, server.publicUrl will become required in the next major release so editor endpoints are built from a trusted origin controlled by the administrator rather than from request headers.

warning

Accessing Sync-in via http://localhost or http://127.0.0.1 will prevent OnlyOffice from working properly (documents will neither be displayed nor edited).