ONLYOFFICE Document Server
Self-hosted online office suite for documents, spreadsheets, and presentations — fully compatible with .docx, .xlsx, and .pptx. Running natively on FreeBSD.
| Port | 8080 |
| Registry | ghcr.io/daemonless/onlyoffice |
| Source | https://github.com/ONLYOFFICE/DocumentServer |
| Website | https://www.onlyoffice.com/ |
Version Tags
| Tag | Description | Best For |
|---|---|---|
pkg |
FreeBSD Quarterly. Uses stable, tested packages. | Most users. |
pkg-latest |
FreeBSD Latest. Rolling package updates. | Newest FreeBSD packages. |
Prerequisites
Before deploying, ensure your host environment is ready. See the Quick Start Guide for host setup instructions.
Requirements:
- FreeBSD 15.0 with Podman and ocijail
podman-compose- PostgreSQL — provided by the companion
onlyoffice-postgresqlcontainer below
Deploy
1. Save as compose.yaml:
2. Deploy:
Access the editor at: http://your-host:8080/example/
Using a named network with cni-dnsname
If cni-dnsname is installed (pkg install cni-dnsname), you can use a named network instead. Remove network_mode: host, set DB_HOST=onlyoffice-postgresql, remove HTTP_PORT, and add ports:
Environment Variables
| Variable | Default | Description |
|---|---|---|
DB_HOST |
onlyoffice-postgresql |
PostgreSQL hostname |
DB_PORT |
5432 |
PostgreSQL port |
DB_NAME |
onlyoffice |
Database name |
DB_USER |
onlyoffice |
Database user |
DB_PWD |
onlyoffice |
Database password |
HTTP_PORT |
80 |
Port nginx listens on inside the container. Set to 8080 when using network_mode: host |
EXAMPLE_SERVER_URL |
your-hostname:8080 |
Public hostname:port the browser uses to reach the document server |
AMQP_URI |
amqp://guest:guest@localhost |
RabbitMQ URI (bundled RabbitMQ used by default) |
JWT_ENABLED |
true |
Enable JWT token validation |
JWT_SECRET |
(auto-generated) | JWT secret — randomly generated on first start if not set |
JWT_HEADER |
Authorization |
JWT header name |
WOPI_ENABLED |
false |
Enable WOPI protocol for Nextcloud/SharePoint integration |
TZ |
UTC |
Timezone |
Ports
| Port | Description |
|---|---|
8080 |
Document server + example app at /example/ |
FreeBSD-Specific Notes
PostgreSQL Shared Memory
PostgreSQL requires System V IPC for shared memory. Without the sysvipc annotation the container fails with shmget: Function not implemented. The annotation is already included in the compose file above.
JWT Secret
If JWT_SECRET is not set, a random secret is generated on first start. Set it explicitly for consistent behavior across restarts.
WOPI Integration
Set WOPI_ENABLED=true to enable WOPI for Nextcloud or SharePoint integration. An RSA keypair is generated automatically on first start and stored in /config/data/wopi/.
Nextcloud Integration
ONLYOFFICE Document Server integrates with Nextcloud via the official ONLYOFFICE connector app, enabling in-browser editing of .docx, .xlsx, and .pptx files stored in Nextcloud.
Add Nextcloud to the same compose file:
Connector Setup
Once both containers are running:
- Open Nextcloud at
http://your-host:8082and complete the setup wizard - Go to Apps → search for ONLYOFFICE → install it
- Go to Settings → ONLYOFFICE and set:
- Document Editing Service address:
http://your-host:8080 - Secret key:
your-secret-here(must matchJWT_SECRET)
- Document Editing Service address:
- Save — Nextcloud will verify the connection
Documents in Nextcloud will now open directly in ONLYOFFICE.
JWT Required
JWT must be enabled (JWT_ENABLED=true) when integrating with Nextcloud. Set the same JWT_SECRET in both the Document Server environment and the Nextcloud ONLYOFFICE settings.
Management
View Logs
Restart
Update
Architectures: amd64
User: bsd (UID/GID 1000:1000)
Base: FreeBSD 15.0
Need help? Join our Discord community.