How To Install OnlyOffice on Rocky Linux 10
In this tutorial, we will show you how to install OnlyOffice on Rocky Linux 10. Running a powerful office suite on your enterprise Linux environment has never been more accessible. OnlyOffice represents one of the most compelling open-source alternatives to traditional office software, offering comprehensive document editing, real-time collaboration, and seamless integration capabilities. When paired with Rocky Linux 10’s enterprise-grade stability and long-term support, you create a robust foundation for organizational productivity.
This comprehensive guide walks you through the complete installation process of OnlyOffice on Rocky Linux 10. Whether you’re a system administrator managing enterprise infrastructure or a developer seeking reliable document processing capabilities, this tutorial provides the detailed instructions needed for successful deployment. You’ll learn not only how to install OnlyOffice but also how to configure, optimize, and troubleshoot your installation for maximum performance and reliability.
By the end of this guide, you’ll have a fully functional OnlyOffice Document Server running on Rocky Linux 10, ready to handle document creation, editing, and collaborative workflows for your organization.
Understanding OnlyOffice and Rocky Linux 10
What is OnlyOffice?
OnlyOffice Community Edition delivers a comprehensive suite of productivity tools designed for modern collaborative environments. The platform includes powerful document editors for text documents, spreadsheets, and presentations, supporting industry-standard formats including DOCX, XLSX, PPTX, ODT, ODS, and ODP files.
The collaborative editing functionality enables real-time document sharing and simultaneous editing by multiple users. Teams can work together seamlessly, with changes synchronized instantly across all connected clients. OnlyOffice integrates with popular cloud storage services like Google Drive, Dropbox, and OneDrive, ensuring accessibility from anywhere.
Document conversion capabilities allow seamless translation between different file formats, while the robust API enables custom integrations with existing business applications and content management systems.
Why Choose Rocky Linux 10?
Rocky Linux 10 emerges as the premier choice for enterprise deployments requiring stability, security, and long-term support. As a community-driven, enterprise-grade distribution maintaining full compatibility with Red Hat Enterprise Linux, Rocky Linux provides the reliability needed for production environments.
The distribution offers extensive security features, including SELinux integration, comprehensive firewall management, and regular security updates. Enterprise administrators appreciate the predictable release cycle and extended support lifecycle, ensuring applications remain stable and secure over time.
Rocky Linux’s robust package management system, comprehensive documentation, and active community support make it an ideal platform for hosting critical applications like OnlyOffice Document Server.
System Requirements and Prerequisites
Hardware Requirements
Before beginning the OnlyOffice installation on Rocky Linux 10, ensure your system meets the minimum hardware specifications. Your server requires a dual-core processor running at 2 GHz or higher, though quad-core processors deliver significantly better performance for concurrent user scenarios.
Memory allocation proves critical for OnlyOffice performance. Allocate a minimum of 2 GB RAM for basic functionality, but 4 GB or more is strongly recommended for production environments. Systems supporting multiple concurrent users should consider 8 GB or higher memory configurations.
Storage requirements include at least 40 GB of free disk space for the base installation and document storage. High-performance SSD storage significantly improves document loading and conversion times. Configure at least 4 GB of swap space to handle memory overflow during intensive document processing operations.
Network connectivity must support the bandwidth requirements for your expected user base, with consideration for document upload, download, and real-time synchronization traffic.
Software Prerequisites
Rocky Linux 10 installation should be completed with the latest system updates applied. Your system requires several key software components: PostgreSQL 12.9 or higher for database operations, NGINX 1.3.13 or higher for web server functionality, and RabbitMQ for message queue management.
Administrative access through sudo privileges is essential for installation and configuration tasks. Firewall configuration must allow traffic on ports 80 and 443 for web access, plus any custom ports you plan to configure.
SELinux configuration requires attention, as OnlyOffice may need specific permissions or temporary disabling during initial setup. Plan your security policies accordingly.
Pre-Installation Setup
System Updates and Package Management
Begin by updating your Rocky Linux 10 system to ensure all packages are current. Connect to your server via SSH and execute the system update process:
sudo dnf update -y
Enable the EPEL repository to access additional packages required for OnlyOffice installation:
sudo dnf install epel-release -y
Install essential development tools that may be required during the installation process:
sudo dnf groupinstall "Development Tools" -y
sudo dnf install wget curl nano vim -y
Database Setup (PostgreSQL)
OnlyOffice requires PostgreSQL for data storage and management. Install PostgreSQL on your Rocky Linux 10 system:
sudo dnf install postgresql postgresql-server postgresql-contrib -y
Initialize the PostgreSQL database system:
sudo postgresql-setup --initdb
Start and enable PostgreSQL to run automatically on system boot:
sudo systemctl start postgresql
sudo systemctl enable postgresql
Configure PostgreSQL authentication by editing the pg_hba.conf file:
sudo nano /var/lib/pgsql/data/pg_hba.conf
Modify the authentication methods for local connections to use md5 authentication. Create the OnlyOffice database and user account:
sudo -u postgres psql
CREATE DATABASE onlyoffice;
CREATE USER onlyoffice WITH PASSWORD 'your_secure_password';
GRANT ALL PRIVILEGES ON DATABASE onlyoffice TO onlyoffice;
\q
Restart PostgreSQL to apply configuration changes:
sudo systemctl restart postgresql
Web Server Configuration (NGINX)
Install NGINX web server to handle HTTP requests for OnlyOffice:
sudo dnf install nginx -y
Create a basic NGINX configuration for OnlyOffice. Edit the default server configuration:
sudo nano /etc/nginx/nginx.conf
Ensure the server configuration includes proper client_max_body_size settings to handle large document uploads:
http {
client_max_body_size 100M;
# Additional configuration settings
}
Start and enable NGINX service:
sudo systemctl start nginx
sudo systemctl enable nginx
Installing OnlyOffice Document Server
Adding OnlyOffice Repository
Download and install the OnlyOffice GPG signing key to verify package authenticity:
curl -fsSL https://download.onlyoffice.com/GPG-KEY-ONLYOFFICE | sudo gpg --no-default-keyring --keyring gnupg-ring:/tmp/onlyoffice.gpg --import
sudo chmod 644 /tmp/onlyoffice.gpg
sudo chown root:root /tmp/onlyoffice.gpg
sudo mv /tmp/onlyoffice.gpg /etc/pki/rpm-gpg/RPM-GPG-KEY-ONLYOFFICE
Add the OnlyOffice repository to your system:
sudo tee /etc/yum.repos.d/onlyoffice.repo > /dev/null <<EOF
[onlyoffice]
name=onlyoffice repo
baseurl=https://download.onlyoffice.com/repo/centos/main/noarch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ONLYOFFICE
EOF
Update the package database to include the new repository:
sudo dnf makecache
Package Installation Process
Install the OnlyOffice Document Server package:
sudo dnf install onlyoffice-documentserver -y
The installation process automatically downloads and configures necessary dependencies, including RabbitMQ and additional NGINX modules. Monitor the installation output for any dependency conflicts or error messages.
During installation, the system creates dedicated user accounts and configures initial service files. The installation places OnlyOffice files in /var/www/onlyoffice/documentserver/
with configuration files stored in /etc/onlyoffice/documentserver/
.
Post-Installation Package Configuration
Verify the installation completed successfully by checking the installed package version:
rpm -qa | grep onlyoffice
Review the installation directory structure to understand component organization:
ls -la /var/www/onlyoffice/documentserver/
ls -la /etc/onlyoffice/documentserver/
Check initial service status before proceeding with configuration:
sudo systemctl status ds-*
Configuration and Setup
Running Configuration Scripts
OnlyOffice includes a configuration script that automates initial setup processes. Execute the document server configuration script:
sudo /usr/bin/documentserver-configure.sh
The script prompts for database connection parameters. Provide the PostgreSQL database details configured earlier:
- Database host: localhost
- Database name: onlyoffice
- Database user: onlyoffice
- Database password: your_secure_password
Configure RabbitMQ connection settings using the default values:
- RabbitMQ host: localhost
- RabbitMQ user: guest
- RabbitMQ password: guest
For custom port configurations, set the DS_PORT environment variable before running the configuration script:
export DS_PORT=8080
sudo /usr/bin/documentserver-configure.sh
The configuration script updates NGINX virtual host settings, creates necessary database tables, and initializes service connections.
Firewall and Security Configuration
Configure firewall rules to allow web traffic to OnlyOffice. Add permanent firewall exceptions for HTTP and HTTPS traffic:
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --reload
For custom port configurations, add specific port rules:
sudo firewall-cmd --permanent --add-port=8080/tcp
sudo firewall-cmd --reload
SELinux may interfere with OnlyOffice operations. Check SELinux status and temporarily disable if necessary:
sestatus
sudo setenforce 0
For permanent SELinux disabling, edit the configuration file:
sudo nano /etc/selinux/config
Change SELINUX=enforcing
to SELINUX=disabled
and reboot the system.
Service Management
Start all OnlyOffice-related services:
sudo systemctl start ds-converter
sudo systemctl start ds-docservice
sudo systemctl start ds-metrics
Enable automatic startup for all services:
sudo systemctl enable ds-converter
sudo systemctl enable ds-docservice
sudo systemctl enable ds-metrics
sudo systemctl enable nginx
sudo systemctl enable postgresql
sudo systemctl enable rabbitmq-server
Verify all services are running correctly:
sudo systemctl status ds-converter ds-docservice ds-metrics nginx postgresql rabbitmq-server
Monitor service logs for any error messages:
sudo journalctl -u ds-docservice -f
Testing and Verification
Basic Functionality Testing
Access the OnlyOffice web interface through your browser using the server’s IP address or hostname:
http://your-server-ip
The OnlyOffice welcome page should display, indicating successful installation. The interface provides links to documentation and basic functionality testing tools.
Test document creation by clicking “Create new” and selecting a document type. Verify the editor loads correctly and allows text input, formatting, and basic editing operations.
Upload a test document in DOCX, XLSX, or PPTX format to verify file format compatibility. The document should open correctly with all formatting preserved.
Performance and Integration Testing
Test collaborative editing by opening the same document from multiple browser windows or different computers. Changes made in one window should appear in real-time in other windows.
Evaluate system performance under load by creating multiple concurrent editing sessions. Monitor system resources using:
htop
iostat 1
Test cloud storage integration by configuring connections to Google Drive, Dropbox, or OneDrive through the OnlyOffice interface settings.
Verify API functionality by accessing the API documentation endpoint:
http://your-server-ip/example
Advanced Configuration Options
Custom Port Configuration
Modify OnlyOffice to run on a custom port by editing the NGINX configuration:
sudo nano /etc/nginx/conf.d/ds.conf
Change the listen directive to your desired port:
listen 8080;
Update firewall rules for the new port:
sudo firewall-cmd --permanent --add-port=8080/tcp
sudo firewall-cmd --reload
Restart NGINX to apply changes:
sudo systemctl restart nginx
SSL/HTTPS Configuration
Obtain SSL certificates using Let’s Encrypt or install commercial certificates. For Let’s Encrypt installation:
sudo dnf install certbot python3-certbot-nginx -y
sudo certbot --nginx -d your-domain.com
The certbot automatically configures NGINX for HTTPS termination. Verify SSL configuration by accessing:
https://your-domain.com
For manual SSL configuration, edit the NGINX virtual host:
sudo nano /etc/nginx/conf.d/ds-ssl.conf
Add SSL configuration directives:
server {
listen 443 ssl;
server_name your-domain.com;
ssl_certificate /path/to/certificate.crt;
ssl_certificate_key /path/to/private.key;
# Additional SSL configuration
}
Database Optimization
Optimize PostgreSQL for OnlyOffice performance by editing postgresql.conf:
sudo nano /var/lib/pgsql/data/postgresql.conf
Adjust key parameters:
shared_buffers = 256MB
effective_cache_size = 1GB
checkpoint_completion_target = 0.9
wal_buffers = 16MB
Configure connection pooling to handle concurrent database connections efficiently. Install and configure pgbouncer:
sudo dnf install pgbouncer -y
Set up regular database backups:
sudo crontab -e
Add backup schedule:
0 2 * * * pg_dump onlyoffice | gzip > /backup/onlyoffice_$(date +\%Y\%m\%d).sql.gz
Integration and Customization
Cloud Storage Integration
Configure cloud storage connections through the OnlyOffice administration interface. Navigate to the storage settings and add cloud service credentials.
For Google Drive integration, create OAuth2 credentials in the Google Cloud Console and configure the client ID and secret in OnlyOffice settings.
Test file synchronization by saving documents to connected cloud storage services and verifying accessibility from other devices.
API Integration and Development
OnlyOffice provides comprehensive API documentation accessible at:
http://your-server-ip/api/2.0
Develop custom integrations using the REST API for document operations, user management, and collaboration features. Example API call for document conversion:
curl -X POST "http://your-server-ip/ConvertService.ashx" \
-H "Content-Type: application/json" \
-d '{"url": "document-url", "outputtype": "pdf"}'
Implement webhook endpoints to receive notifications about document events and user activities.
Troubleshooting Common Issues
Service-Related Problems
When OnlyOffice services fail to start, check service logs for specific error messages:
sudo journalctl -u ds-docservice --no-pager
Common startup failures include database connection issues. Verify PostgreSQL is running and accessible:
sudo systemctl status postgresql
sudo -u postgres psql -c "SELECT version();"
NGINX configuration conflicts may prevent proper service operation. Test NGINX configuration syntax:
sudo nginx -t
Port binding errors occur when multiple services attempt to use the same port. Check port usage:
sudo netstat -tlnp | grep :80
Performance and Resource Issues
Memory usage optimization requires monitoring system resources and adjusting configuration parameters. Increase available memory for OnlyOffice processes by editing service configuration files.
CPU utilization problems often result from insufficient hardware resources or inefficient document processing. Monitor CPU usage during peak operations and consider hardware upgrades for production environments.
Storage space management includes regular cleanup of temporary files and document cache. Implement automated cleanup scripts:
#!/bin/bash
find /var/lib/onlyoffice/documentserver/App_Data/cache/files/ -type f -mtime +7 -delete
Security and Access Problems
Firewall blocking connections requires verification of current firewall rules:
sudo firewall-cmd --list-all
SELinux policy conflicts may prevent OnlyOffice from accessing required resources. Check SELinux logs:
sudo ausearch -m avc -ts recent
Permission and authentication issues often involve incorrect file ownership or database privileges. Verify OnlyOffice file permissions:
sudo chown -R ds:ds /var/www/onlyoffice/documentserver/
Maintenance and Updates
Regular Maintenance Tasks
Implement regular system maintenance to ensure optimal OnlyOffice performance. Schedule weekly system updates:
sudo dnf update -y
Perform database maintenance operations including vacuum and reindex procedures:
sudo -u postgres vacuumdb -d onlyoffice --analyze --verbose
Configure log rotation to prevent disk space issues:
sudo nano /etc/logrotate.d/onlyoffice
Add log rotation configuration:
/var/log/onlyoffice/documentserver/*.log {
daily
rotate 30
compress
delaycompress
missingok
create 644 ds ds
}
Monitor system performance metrics and document processing statistics regularly to identify potential issues before they impact users.
Upgrading OnlyOffice
Plan OnlyOffice upgrades carefully to minimize downtime and ensure data integrity. Create comprehensive backups before attempting any upgrades:
sudo systemctl stop ds-*
sudo pg_dump onlyoffice > /backup/pre-upgrade-backup.sql
sudo tar -czf /backup/onlyoffice-config.tar.gz /etc/onlyoffice/
Test upgrades in development environments that mirror your production configuration. This allows identification of potential compatibility issues or configuration conflicts.
Download and install OnlyOffice updates:
sudo dnf update onlyoffice-documentserver
Verify the upgrade completed successfully by testing core functionality and checking service status.
For failed upgrades, implement rollback procedures using your pre-upgrade backups and configuration snapshots.
Congratulations! You have successfully installed OnlyOffice. Thanks for using this tutorial for installing the OnlyOffice on Rocky Linux 10 system. For additional help or useful information, we recommend you check the official OnlyOffice website.