Published: October 8, 2025
Last updated: August 5, 2026

Configure OnlyOffice Document Server for document editing.

Basic Configuration

YAML
1
2
3
4
integrations:
  office:
    url: "http://onlyoffice:80"
    secret: "your_secret_here"

Docker Setup

Generate OnlyOffice Secret

Generate a secure secret via OpenSSL

BASH
1
openssl rand -base64 32

Output example:

TEXT
1
TevrjpRNMmKC0JxAwY7iZ2VXLrvG1gue

Docker Compose Example

YAML
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
services:
  filebrowser:
    image: gtstef/filebrowser:stable
    ports:
      - "80:80"
    volumes:
      - ./config.yaml:/home/filebrowser/config.yaml
      - ./data:/home/filebrowser/data
      - ./data:/data
    environment:
      - FILEBROWSER_ONLYOFFICE_SECRET=your_secret_here

  onlyoffice:
    image: onlyoffice/documentserver:latest
    ports:
      - "8080:80"
    environment:
      - JWT_ENABLED=true
      - JWT_SECRET=your_secret_here

HTTPS Configuration

For production, use HTTPS with reverse proxy (nginx example):

NGINX
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
server {
    listen 443 ssl;
    server_name office.yourdomain.com;

    ssl_certificate /path/to/cert.pem;
    ssl_certificate_key /path/to/key.pem;

    location / {
        proxy_pass http://onlyoffice:80;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

External and Internal URLs

YAML
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# v2.0.0+
http:
  externalUrl: "https://files.yourdomain.com"  # Public URL (browser / shares)
  internalUrl: "http://filebrowser:80"         # Docker/LAN URL OnlyOffice uses to reach FileBrowser
  baseURL: "/files"
  trustProxyHeaders: true

integrations:
  office:
    url: "https://office.yourdomain.com"       # Browser → OnlyOffice
    internalUrl: "http://onlyoffice:80"        # FileBrowser → OnlyOffice (optional)
    secret: "your-jwt-secret"
YAML
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# v1.4.x–v1.5.x
http:
  externalUrl: "https://files.yourdomain.com"
  internalUrl: "http://filebrowser:80"
  baseURL: "/files"
  trustedHeaders:
    - X-Forwarded-Proto
    - X-Forwarded-Host
    - X-Forwarded-For
    - X-Real-IP

integrations:
  office:
    url: "https://office.yourdomain.com"
    internalUrl: "http://onlyoffice:80"
    secret: "your-jwt-secret"

Why multiple URLs?

DirectionConfigPurpose
Browser → OnlyOfficeintegrations.office.urlEditor UI loaded in the browser
FileBrowser → OnlyOfficeintegrations.office.internalUrl (or url)Server-side API calls
OnlyOffice → FileBrowserhttp.internalUrlhttp.externalUrl → requestDownload/callback URLs embedded in editor config
  • http.trustProxyHeaders (v2.0.0+) or http.trustedHeaders (v1.4.x–v1.5.x) affects user-facing request flows (cookies, OIDC, activity IP). Neither gates http.internalUrl.
  • http.externalUrl is used for shares and (when internalUrl is unset) OnlyOffice paths — not for OIDC redirects.

Next Steps