Author: Tyler Westbrook · Organization: Coolify
29 steps · generated 2026-11-05
Add ONLYOFFICE to an existing Seafile deployment managed through Coolify. Follow the recorded workflow to create the ONLYOFFICE service, configure Seafile with its URL and JWT secret, and open a document to check the integration.
I made this guide with StepForge, a free app I built that turns your clicks into guides like this one. I'm looking for testers, so if you're interested, give it a try and tell me what you think!
In Coolify, open Projects to begin adding ONLYOFFICE to your existing Seafile deployment.

Select the project that contains your Seafile deployment. The recording uses the Drive project.

In the project’s environment, click + New to add a resource.

Under Docker Based, select Docker Compose Empty.

Choose the server where you want to deploy ONLYOFFICE. The recording selects localhost.

Paste the Docker Compose configuration below into the editor, then click Save to create the service.

# documentation: https://helpcenter.onlyoffice.com/docs/installation/docs-community-install-docker.aspx
# slogan: ONLYOFFICE Document Server provides online document editors for documents, spreadsheets, and presentations.
# category: productivity
# tags: onlyoffice,documentserver,documents,office,editor,collaboration
# logo: svgs/onlyoffice.svg
# port: 80
services:
onlyoffice:
image: onlyoffice/documentserver:latest
environment:
- SERVICE_URL_ONLYOFFICE_80
- JWT_ENABLED=true
- JWT_SECRET=${SERVICE_PASSWORD_ONLYOFFICEJWT}
- JWT_HEADER=Authorization
- TZ=${TZ:-America/Chicago}
volumes:
- ./onlyoffice-data:/var/www/onlyoffice/Data
- ./onlyoffice-logs:/var/log/onlyoffice
- ./onlyoffice-lib:/var/lib/onlyoffice
- ./onlyoffice-postgresql:/var/lib/postgresql
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1/healthcheck"]
interval: 5s
timeout: 20s
retries: 20
On the new service’s configuration page, click Environment Variables to review its settings.

Click Developer view to display the environment variables in a single editable field.

Make any required changes, then click Save All Environment Variables. Keep the JWT secret available for the Seafile configuration, then click Deploy.
Keep the JWT secret
Keep the ONLYOFFICE JWT secret available; you will need the same value when configuring Seafile.

In the Confirm Service Deployment? dialog, click Confirm to start deploying ONLYOFFICE.

Wait for the startup logs to show that the ONLYOFFICE container has started. Close the Service Startup panel to return to the configuration page.

Confirm that the service shows Running (healthy), then open the Links menu.

Click the generated ONLYOFFICE link to open the service in a new browser tab. Keep this URL available for the Seafile settings.

Check that the welcome page displays ONLYOFFICE Docs Community Edition installed. Return to the Coolify tab to continue.

Return to the project’s resource list and open the existing seafile service.

Open a terminal and connect over SSH to the server hosting Seafile. Continue from the server’s shell prompt.

Run the command below to locate the running Seafile container. Note its container name for the next step.

docker ps | grep seafile
Run the command below to open a shell inside the Seafile container. Replace the example container name with the name from your own deployment.

docker exec -it seafile-<container_name> sh
Run which nano inside the container. A path such as /usr/bin/nano confirms that the editor is available.
Install nano if needed
Ifwhich nanodoes not return a path, install nano inside the container:apt update && apt upgrade -y && apt install nano

Open seahub_settings.py in nano using the commands below. If you have already entered the conf directory, run only the nano command.

cd conf
nano seahub_settings.py
Add the configuration below at the bottom of the file, replacing the example URL and JWT secret with your ONLYOFFICE values. Save with Ctrl+O, press Enter to confirm the filename, then exit with Ctrl+X.

Use the complete API URL
Replace the example hostname with your ONLYOFFICE hostname, and keep/web-apps/apps/api/documents/api.jsat the end of the URL.
ENABLE_ONLYOFFICE = True
ONLYOFFICE_APIJS_URL = 'https://*onlyoffice-url*.example.com/web-apps/apps/api/documents/api.js'
ONLYOFFICE_FILE_EXTENSION = (
'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx',
'odt', 'fodt', 'odp', 'fodp', 'ods', 'fods',
'csv', 'ppsx', 'pps'
)
ONLYOFFICE_EDIT_FILE_EXTENSION = (
'docx', 'pptx', 'xlsx'
)
ONLYOFFICE_JWT_SECRET = 'PASTE_YOUR_ONLYOFFICE_JWT_SECRET_HERE'
Switch back to Coolify and open the seafile service from the project’s resource list.

Click Restart on the Seafile configuration page to apply the saved settings.

In the Confirm Service Restart? dialog, click Confirm. Wait for the service to return to Running (healthy) before continuing.

On the Seafile configuration page, open the Links menu.

Click the Seafile URL to open its web interface. Sign in if prompted.

Select the library containing the document you want to use for the test.

Click a supported document to open it. The recording uses How to configure Coolify server.docx.

Confirm that the document loads in the ONLYOFFICE editor and that its editing toolbar appears. This completes the guide’s check that Seafile can open documents with ONLYOFFICE.
