OnlyOffice Document Server provides real-time collaborative document editing for Word, Excel, and PowerPoint files within RapidPM.
| Feature | Purpose |
|---|---|
| Document Editing | Edit DOCX, XLSX, PPTX in browser |
| Real-time Collaboration | Multiple users editing simultaneously |
| PDF Viewing | View PDF documents |
| Format Conversion | Convert between document formats |
| Track Changes | Review and accept/reject changes |
| Environment | Version |
|---|---|
| Production | 9.0.4 |
| Test | 9.0.4 (shared with prod) |
| Server | IP | Status |
|---|---|---|
| onlyoffice | 204.168.170.0 | Dedicated server |
URL: https://onlyoffice.rapidpm.uk
| Container | Image | Purpose |
|---|---|---|
| onlyoffice-server | onlyoffice/documentserver:9.0.4 | Document editing engine |
| rapidpm-gateway-app | Custom | JWT authentication gateway |
| reverseproxy | Nginx | SSL termination, routing |
1. User opens document in RapidPM
2. Backend generates JWT token with document info
3. Frontend loads OnlyOffice editor with token
4. OnlyOffice validates JWT and loads document
5. Changes saved via callback to RapidPM API
Environment variables:
ONLY_OFFICE_URL=https://onlyoffice.rapidpm.uk
ONLY_OFFICE_SECRET=<jwt-secret>
| Type | Extensions |
|---|---|
| Documents | DOCX, DOC, ODT, RTF, TXT |
| Spreadsheets | XLSX, XLS, ODS, CSV |
| Presentations | PPTX, PPT, ODP |
| View Only |
Type: Commercial (Developer License)
Model: Per-concurrent-connection or unlimited
Renewal: Annual
See Licenses for details.
app/controllers/
├── document_editor.py # OnlyOffice integration
└── artifact_callback.py # Save callback handler
app/services/
└── onlyoffice_service.py # JWT generation, API calls
rpm-ui/src/app/rpm/components/
└── document-editor/
├── document-editor.component.ts
└── onlyoffice-config.ts
URL: GET /api/metrics
Exposes metrics in Prometheus format for scraping.
# View metrics locally
curl http://localhost:8080/api/metrics
# Production
curl https://rapidpm.uk/api/metrics
| Metric | Type | Labels | Description |
|---|---|---|---|
onlyoffice_callback_duration_seconds |
Histogram | - | Time spent processing OnlyOffice callbacks |
onlyoffice_download_duration_seconds |
Histogram | - | Time downloading document from OnlyOffice |
onlyoffice_upload_duration_seconds |
Histogram | - | Time uploading document to SFTP |
onlyoffice_save_total |
Counter | status |
Save operations (success/failure) |
onlyoffice_validation_rejected_total |
Counter | reason |
Validation failures (file_content, zip_integrity, xml_wellformedness) |
onlyoffice_session_events_total |
Counter | event |
Session events (join/leave) |
onlyoffice_active_sessions |
Gauge | - | Current active editing sessions |
onlyoffice_transition_locks |
Gauge | - | Currently held transition locks |
URL: GET /api/v1/onlyoffice/health
Returns JSON with component status and real-time metrics:
curl https://rapidpm.uk/api/v1/onlyoffice/health
Response:
{
"status": "healthy",
"components": {
"redis": {"status": "healthy"},
"onlyoffice": {"status": "healthy"},
"sftp": {"status": "healthy"}
},
"metrics": {
"active_editing_sessions": 2,
"transition_locks_held": 0,
"pending_callbacks": 0
}
}
# Average callback latency (last 5 min)
rate(onlyoffice_callback_duration_seconds_sum[5m]) / rate(onlyoffice_callback_duration_seconds_count[5m])
# Save failure rate
rate(onlyoffice_save_total{status="failure"}[1h])
# Session activity
rate(onlyoffice_session_events_total{event="join"}[1h])
| Metric | Threshold | Severity |
|---|---|---|
| Callback P99 latency | > 5 seconds | Warning |
| Save failures | > 5/hour | Critical |
| Validation rejections | > 10/hour | Warning |
| Issue | Solution |
|---|---|
| JWT validation failed | Check ONLY_OFFICE_SECRET matches |
| Document won't load | Verify network connectivity to onlyoffice server |
| Save callback fails | Check callback URL is accessible from OnlyOffice |