Deploy ONLYOFFICE Docs Enterprise with Its Official Compose File

For a single-host deployment, use ONLYOFFICE’s official docker-compose.enterprise.yml from the Docker-DocumentServer repository and start it with Docker Compose v2. Before bringing the stack online, replace example credentials, set a stable JWT secret for your integration, and mount the directory that will hold your Enterprise license and persistent data. A running container is only the first check: confirm the Compose health status and open the Docs welcome page before connecting a production platform.

What does the Enterprise Compose file start?

The official file defines the Document Server Enterprise service plus PostgreSQL, RabbitMQ, and Redis dependencies. It publishes the editor’s HTTP and HTTPS ports and includes a health check for the internal Docs information endpoint. Those dependencies make this Compose file convenient for a small, single-host installation; it does not by itself configure your platform connector, public DNS, or a production TLS certificate.

As checked on October 9, 2026, the official file uses PostgreSQL 15, RabbitMQ 3, and Redis 7. Repository files can change, so review the current Enterprise Compose file before deployment and upgrades.

1. Check the host and install Docker Compose

ONLYOFFICE’s Enterprise Docker requirements list an amd64 Linux host with kernel 3.10 or later, Docker supported by its maintainers, at least 4 GB RAM, 40 GB free disk, and at least 4 GB swap. Its reference sizing also varies with concurrent open documents and document type, so use these figures as a starting point, not a capacity guarantee. A production portal with heavier workloads may need more resources.

Install Docker Engine and the Compose plugin from Docker’s official instructions for your Linux distribution. Confirm that both commands work before you clone the repository:

docker --version
docker compose version

If the host has an existing web server, confirm that ports 80 and 443 are available or plan a reverse proxy and a different host-side port mapping. The Compose file also starts the database, queue, and cache services; they should remain on the private Compose network rather than being published as public ports.

2. Get the official Compose file

Clone ONLYOFFICE’s repository and move into its directory:

git clone https://github.com/ONLYOFFICE/Docker-DocumentServer
cd Docker-DocumentServer

Check that docker-compose.enterprise.yml is present. The repository README gives this command for the Enterprise Edition:

docker compose -f docker-compose.enterprise.yml up -d
Linux terminal showing the Docker-DocumentServer clone command and the docker-compose.enterprise.yml filename
The repository directory contains the Enterprise Compose file used by the installation command.

3. Set credentials, JWT, and a persistent license location

Do not launch the sample Compose configuration unchanged on an Internet-facing host. The published file contains example database credentials and comments out explicit JWT values. Replace the PostgreSQL password in both the database service and the Document Server’s DB_PWD setting with the same strong value. Keep database, RabbitMQ, and Redis ports private.

For an integration, set one stable JWT secret in the Document Server service and configure the same secret in your platform’s ONLYOFFICE connector. A simple approach is to keep the value in a local .env file that you do not commit to Git, then use Compose variable substitution. Add these entries to the Document Server environment section, adapting the existing environment format as needed:

- JWT_ENABLED=true
- JWT_SECRET=${JWT_SECRET}

Put a long, unique value in .env as JWT_SECRET=.... Do not copy the literal placeholder into a live configuration. ONLYOFFICE documents JWT as enabled by default in Docs 7.2 and later with an automatically generated secret; specifying your own stable value avoids a mismatch when the container is recreated. See the JWT configuration guide.

To register Enterprise with a purchased license.lic, bind-mount a host directory to /var/www/onlyoffice/Data in the Document Server service. For example, replace its anonymous data mount with ./documentserver-data:/var/www/onlyoffice/Data, create that host directory, and place license.lic inside it before startup. Preserve the file’s permissions and keep the directory in your backup plan. The Enterprise registration instructions confirm that the license file must be in a mounted folder for Docker.

Compose editor showing HTTP and HTTPS ports, a mounted data directory, and JWT_ENABLED with a variable-based secret
The Document Server service needs a persistent data mount for its license and a stable JWT secret for the connector.

4. Start the Enterprise stack

From the repository directory, validate the Compose configuration quietly so expanded secrets are not printed, then start the services. Quiet validation checks the Compose model; it does not prove the containers will start. Docker documents this option in its Compose config reference:

docker compose -f docker-compose.enterprise.yml config --quiet
docker compose -f docker-compose.enterprise.yml up -d

The first start may take longer while images are built or downloaded and dependencies initialize. If configuration validation reports an unset variable, check your .env file and the variable names in the Compose file. Do not add quotation marks around secrets unless they are part of the intended value.

Compose YAML showing the ONLYOFFICE documentserver service and PostgreSQL, RabbitMQ, and Redis dependencies
The Enterprise Compose definition groups Document Server with the database, message broker, and cache it needs.

5. Verify readiness before connecting your platform

Check the services and health status:

docker compose -f docker-compose.enterprise.yml ps

Wait for the Document Server health check to pass. The official Compose file checks http://localhost:8000/info/info.json from inside the container, with a 60-second start period. If the service stays unhealthy, inspect its logs and the dependency status:

docker compose -f docker-compose.enterprise.yml logs --tail=100 onlyoffice-documentserver

Then open http://localhost on the host, or the mapped URL from a browser that can reach the server. ONLYOFFICE’s Compose instructions use the welcome page as an initial installation check. For remote production use, expose the service through HTTPS on your domain rather than leaving editor traffic on plain HTTP. Consult the Enterprise Docker port guide and Docker installation guide when configuring network access and TLS.

Browser displaying the ONLYOFFICE Docs welcome page at localhost beside a terminal running docker compose ps
The welcome page confirms that the browser can reach Docs; use Compose status and health checks to confirm the services are ready.

Finally, configure your platform’s Document Server URL and matching JWT secret, then open, edit, and save a test document through that integration. The welcome page alone does not prove that the connector, reverse proxy, JWT, or callback URL is configured correctly. If the services are healthy but the editor cannot open from the platform, check that the platform can reach the Docs URL and that both sides use the same JWT secret and header. For a multi-host or high-availability deployment, treat this Compose stack as a starting point and review ONLYOFFICE’s deployment guidance rather than assuming one Compose host provides clustering.

Leave a Comment

Clear Nextcloud’s File Locking Warning with Redis

Enable reliable Nextcloud file locking, choose the right Redis or Valkey backend, and verify the warning clears without risking concurrent file changes.

What It Takes to Target an A+ Nextcloud Security Rating

What It Takes to Target an A+ Nextcloud Security Rating

Fix common Nextcloud scan findings with current updates, HTTPS and HSTS, precise reverse-proxy trust, and checks against the public server.

Automate Consistent Nextcloud Backups with Restic and Cron

Automate Consistent Nextcloud Backups with Restic and Cron

Back up Nextcloud’s files and MariaDB together, schedule encrypted Restic snapshots with cron, and verify recovery without risking the live server.

Enable Nextcloud Server-Side Encryption with Measured Impact

Configure Nextcloud SSE for the storage that needs it, protect encryption keys, and measure transfer and CPU impact before encrypting existing files.

Add Elasticsearch Full-Text Search to Nextcloud

Connect Nextcloud’s file search to Elasticsearch, index document contents, and choose a setup that fits your server and security needs.

Set a Reliable Expiration Policy for Nextcloud Deleted Files

Set a Reliable Expiration Policy for Nextcloud Deleted Files

Configure Nextcloud to remove deleted files after a defined retention period, schedule background jobs reliably, and avoid commands that purge every user’s trash.

Clear Nextcloud’s Missing Database Indexes Warning

Clear Nextcloud’s Missing Database Indexes Warning

Run Nextcloud’s OCC repair safely, preview the database changes, and check why the warning might remain.

Raise Nextcloud’s Web Upload Limit Past 2 GB

Raise Nextcloud’s Web Upload Limit Past 2 GB

Allow larger Nextcloud browser uploads by aligning PHP, Nginx or Apache, temporary storage, and timeout settings—and verify which limit is blocking the file.

Clear Nextcloud’s PHP Memory Warning at the Web Server

Set the PHP memory limit Nextcloud actually uses, restart the right service, and confirm the 512 MB setting in Admin Overview.

Connect an S3-Compatible Bucket to Nextcloud External Storage

Mount a compatible object-storage bucket in Nextcloud using its S3 backend, with the right endpoint, credentials, access scope, and verification steps.