Install OnlyOffice on Rocky Linux EL9 or EL8
Want a full‑featured office suite on your Rocky server without buying a license? OnlyOffice is a solid open‑source choice, but getting it onto Rocky 8/9 takes a few manual steps that most people skip. Below I’ll walk you through the exact commands and why each one matters so you can get the docs, spreadsheets, and presentations running smoothly.
Prerequisites & Repository Setup
OnlyOffice ships as an RPM you need to pull from its own repo. First make sure your system’s package cache is fresh:
sudo dnf clean all && sudo dnf makecache
The clean wipes stale metadata, and makecache rebuilds it; if you skip this you’ll get “repo not found” errors later.
Rocky 8/9 don’t include the OnlyOffice repo by default. Grab the release file for your version:
# For EL9 (Rocky 9) sudo dnf install -y https://download.onlyoffice.com/repo/rhel/el9/latest/onlyoffice.repo # For EL8 (Rocky 8) sudo dnf install -y https://download.onlyoffice.com/repo/rhel/el8/latest/onlyoffice.repo
The URL points to a plain text repo file; installing it automatically drops the file into /etc/yum.repos.d/. If you notice a GPG error after this, it means your system can’t verify OnlyOffice’s signature—add --nogpgcheck just for that run or import the key manually.
Installing the RPM Packages
OnlyOffice is split into two primary components: the server and the desktop client. For most users you only need the desktop app:
sudo dnf install -y onlyoffice-desktopeditors
If you plan to host a collaborative editing server, run:
sudo dnf install -y onlyoffice-documentserver
Why the -y flag? It answers “yes” automatically for any prompts. I’ve seen people pause at “Do you want to continue?” and end up with an incomplete install because they hit Ctrl‑C by mistake.
SELinux Adjustments (Optional)
On Rocky, SELinux is enforcing by default. OnlyOffice’s desktop client tries to write user data under /var/onlyoffice, which SELinux will block unless you allow it:
sudo semanage fcontext -a -t usr_t "/var/onlyoffice(/.*)?" sudo restorecon -Rv /var/onlyoffice
If you don’t run these, the app may start but refuse to save a document. If you’re not comfortable with SELinux tweaks, you can temporarily set it to permissive mode for testing:
sudo setenforce 0 # switch to permissive # ... test OnlyOffice ... sudo setenforce 1 # back to enforcing
Verifying the Installation
Launch the client from your application launcher or via terminal:
onlyoffice-desktopeditors
The first run will create a config folder under ~/.config/OnlyOffice. If you see a blank window, congratulations—installation succeeded. Open a test document to confirm that all formatting tools are present.
I once had a colleague try to start OnlyOffice on Rocky 9 and get an “unknown command” error. The culprit was a missing runtime library from the rpmfusion repo; adding it resolved the issue instantly. Don’t ignore those dependency warnings—they’re usually the easiest fix.
Optional: Desktop Integration for Office Documents
If you want double‑clicking .docx files to open in OnlyOffice automatically, install the MIME handler:
sudo dnf install -y onlyoffice-desktopeditors-mime
After that, right‑click a Word file => “Open With” => OnlyOffice. It’s a small step that saves you from launching the app each time.
That’s all there is to it. No hidden prerequisites, just straight RPM installs and a couple of SELinux tweaks if your policy is tight. Give it a whirl on your Rocky box—you’ll be editing spreadsheets faster than you can say “sudo dnf upgrade.”