ONLYOFFICE Docs (Document Server) is a powerful open-source office suite for real-time document collaboration. It enables you to:
- Create and edit documents, spreadsheets, presentations, and PDFs
- Collaborate with multiple users simultaneously
- Work with all popular office formats (DOCX, ODT, XLSX, ODS, CSV, PPTX, ODP, etc.)
π‘ Why Snap?
The Snap package bundles all dependencies, making installation, updates, and management seamless across Linux distributions.
ONLYOFFICE Docs includes a full set of editors and tools:
- Document Editor β Create, edit, save, and export text documents
- Spreadsheet Editor β Work with spreadsheets in real time
- Presentation Editor β Build and share presentations
- PDF Editor β View and edit PDFs
- Form Creator β Design fillable online forms
- Diagram Viewer β View diagrams embedded in documents
ONLYOFFICE Docs is available in the Snapcraft store. Snap packages contain all dependencies, so setup is simple.
To use Snap packages, you need snapd, a system to install and manage snaps. Most modern Linux distributions include snapd by default; you may only need to enable or install it.
If missing, install it. Example for Ubuntu/Debian:
# apt update
# apt install snapdπ For other distributions, see the official snapd installation guide
Once snapd is ready, install ONLYOFFICE Docs with the following command:
# snap install onlyoffice-dsThe Document Server and all required dependencies are now installed.
After installation, the service starts automatically.
- Open the editor in your browser: http://localhost
- Access the status page: http://localhost/welcome
To check service status:
# snap services onlyoffice-dsTo restart service :
# snap restart onlyoffice-dsBy default, the snap listens to port 80. If you'd like to change the HTTP port (e.g., to port 8888), run:
# snap set onlyoffice-ds onlyoffice.ds-port=8888
By default, MySQL uses port 3306. You can also change the database port:
# snap set onlyoffice-ds onlyoffice.db-port=3307
Access to ONLYOFFICE can be secured with SSL to prevent unauthorized access. While a CA-certified SSL certificate ensures trust verification through the certificate authority, self-signed certificates can offer a similar level of trust, provided each client takes additional steps to verify your website's identity. Follow the instructions below for guidance.
To secure the application via SSL, basically two things are needed:
- Private key (.key)
- SSL certificate (.crt)
When using CA-certified certificates, the necessary files are provided by the certificate authority. For self-signed certificates, youβll need to generate these files yourself. If you already have CA-certified SSL certificates, you can skip the following section.
Generating self-signed SSL certificates is a straightforward three-step process.
STEP 1: Create the server private key
$ openssl genrsa -out onlyoffice.key 2048
STEP 2: Create the certificate signing request (CSR)
$ openssl req -new -key onlyoffice.key -out onlyoffice.csr
STEP 3: Sign the certificate using the private key and CSR
$ openssl x509 -req -days 365 -in onlyoffice.csr -signkey onlyoffice.key -out onlyoffice.crt
You have now generated an SSL certificate which is valid for 365 days.
If you'd like to use Example with Self-Signed Certificates, you need to allow using unauthorized storage.
This section offers instructions to enhance your server's security. To do so, you'll need to generate stronger DHE parameters.
$ openssl dhparam -out dhparam.pem 2048
From the four files generated above, you need to install onlyoffice.key, onlyoffice.crt and dhparam.pem on the ONLYOFFICE server. The CSR file is not required, but be sure to back it up securely in case itβs needed in the future.
The default path where the ONLYOFFICE application is configured to locate SSL certificates is /var/snap/onlyoffice-ds/current/var/www/onlyoffice/Data/certs.
The path /var/snap/onlyoffice-ds/current/var/www/onlyoffice/Data/ serves as the data storage, meaning youβll need to copy the files into this directory.
# cp onlyoffice.key /var/snap/onlyoffice-ds/current/var/www/onlyoffice/Data/certs/
# cp onlyoffice.crt /var/snap/onlyoffice-ds/current/var/www/onlyoffice/Data/certs/
# cp dhparam.pem /var/snap/onlyoffice-ds/current/var/www/onlyoffice/Data/certs/
Then, restart ONLYOFFICE Document Server to work on SSL:
# snap restart onlyoffice-ds
You are now just one step away from having the application secured.
To revert the ONLYOFFICE Document Server to operate over HTTP, delete the files from /var/snap/onlyoffice-ds/current/var/www/onlyoffice/Data/certs and restart the server.
# rm /var/snap/onlyoffice-ds/current/var/www/onlyoffice/Data/certs/onlyoffice.*
# rm /var/snap/onlyoffice-ds/current/var/www/onlyoffice/Data/certs/dhparam.pem
# snap restart onlyoffice-ds
By default, HTTPS SSL port is 443. If you'd like to change it (e.g., to port 444), run:
# snap set onlyoffice-ds onlyoffice.ds-ssl-port=444
By default, the Document Server is prevented from using an unauthorized storage. To allow it, run:
# snap set onlyoffice-ds onlyoffice.use-unautorized-storage=true
By default, the Document Server doesn't run on loopback interface. To set it, run:
# snap set onlyoffice-ds onlyoffice.loopback=true
- jwt-enabled: Specifies the enabling the JSON Web Token validation by the ONLYOFFICE Document Server. Defaults to
true. - jwt-secret: Defines the secret key to validate the JSON Web Token in the request to the ONLYOFFICE Document Server. Random string by default.
- jwt-header: Defines the http header that will be used to send the JSON Web Token. Defaults to
Authorization.
If you'd like to change the JSON Web Token parameters, run:
# snap set onlyoffice-ds onlyoffice.key=value
By default, the Document Server is prevented from using a WOPI protocol. To allow it, run:
# snap set onlyoffice-ds onlyoffice.wopi=true
By default, a test example is not enabled. You can enable it using the command:
# snap set onlyoffice-ds onlyoffice.example-enabled=true
By default, the Admin Panel is not enabled. To enable the Admin Panel, use the command:
# snap set onlyoffice-ds onlyoffice.adminpanel-enabled=true
To remove the snap containing ONLYOFFICE Docs, use the following command:
# snap remove onlyoffice-dsπ Official Website: ONLYOFFICE Docs
πΎ Code repository: ONLYOFFICE Docs main repo
π§βπ» ONLYOFFICE API: Check out developer documentation
Need help or want to discuss ONLYOFFICE Docs? Join our community:
- π Forum: ONLYOFFICE Community
- π GitHub Issues: Report issues
- π¬ Feedback platform: feedback.onlyoffice.com.