Running ONLYOFFICE Docs Developer Edition with Podman on Fedora

Introduction

Developer Edition allows you to install ONLYOFFICE Docs on your local server and integrate the online editors with your web application.

ONLYOFFICE Docs is an online office suite that comprises viewers and editors for texts, spreadsheets and presentations, fully compatible with Office Open XML formats (.docx, .xlsx, .pptx) and enables collaborative editing in real time.

Functionality

  • Document Editor
  • Spreadsheet Editor
  • Presentation Editor
  • Mobile web viewers
  • Mobile web editors
  • Collaborative editing
  • Hieroglyph support
  • Support for all the popular formats: DOC, DOCX, TXT, ODT, RTF, ODP, EPUB, ODS, XLS, XLSX, CSV, PPTX, HTML

See the detailed list of features available for ONLYOFFICE Docs Developer Edition.

This guide will show you how to install the Linux version of ONLYOFFICE Docs Developer Edition with Podman on Fedora. Podman is a tool for running and managing Linux containers.

System requirements
  • CPU
    dual core 2 GHz or better
  • RAM
    4 GB or more
  • HDD
    at least 40 GB of free space
  • SWAP
    at least 4 GB, but depends on the host OS. More is better
  • OS
    amd64 Linux distribution with kernel version 3.10 or later

Installing ONLYOFFICE Docs

You need the latest Podman version installed. If you do not have it, please see the Installation section on the Podman website to learn how to get it.
Running ONLYOFFICE Docs with Podman as a root user

Create new folders for storing container data on your host machine:

sudo mkdir -p /app/onlyoffice/DocumentServer/logs \
 /app/onlyoffice/DocumentServer/data \
 /app/onlyoffice/DocumentServer/lib \
 /app/onlyoffice/DocumentServer/db

Now mount these directories via Podman and run ONLYOFFICE Docs using the following command:

sudo podman run -i -t -d -p 80:80 -p 443:443 --restart=always \
 -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice:Z  \
 -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data:Z  \
 -v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice:Z \
 -v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql:Z \
 -u root onlyoffice/documentserver-de:latest
Please note that rootless deployment is NOT recommended for ONLYOFFICE Docs.

To check if ONLYOFFICE Docs is working correctly, run this command:

sudo podman exec $(sudo podman ps -q) sudo supervisorctl start ds:example

Then open a browser, go to http://localhost/welcome, and click the GO TO TEST EXAMPLE button. You will be directed to a page where you can create documents with sample content.

Switching ONLYOFFICE Docs to HTTPS

Install the onlyoffice.key and onlyoffice.crt certificates on your server and restart the ONLYOFFICE Docs container using the following commands:

sudo mkdir /app/onlyoffice/DocumentServer/data/certs
sudo cp onlyoffice.crt /app/onlyoffice/DocumentServer/data/certs/
sudo cp onlyoffice.key /app/onlyoffice/DocumentServer/data/certs/
sudo chown -R 100108:100111 /app/onlyoffice/DocumentServer/data/certs/
sudo podman restart {container_id}
When copying certificates without entering to the container, you need to use sudo (as the container was launched by a non-root user), and then change the file owner to the 100108 100111 user (this is the user subuid ds in the container).

Building the ONLYOFFICE Docs image on Podman as a root user

Clone the ONLYOFFICE Docs repository, go to the Docker-DocumentServer folder and build the image using the following commands:

git clone https://github.com/ONLYOFFICE/Docker-DocumentServer.git
cd Docker-DocumentServer/
sudo podman build --tag onlyofficeds:podman -f ./Dockerfile

Building the ONLYOFFICE Docs image from the Dockerfile with Buildah as a root user

Use the following command:

buildah bud --tag onlyofficeds:buildah -f ./Dockerfile
Buildah supports building images without root permissions, but building the ONLYOFFICE Docs image from the Dockerfile with Buildah works with root access only.

Running the ONLYOFFICE Docs container from a local directory without root permissions

After building the ONLYOFFICE Docs image with Buildah as described above, run the ONLYOFFICE Docs container using the following command:

podman run -i -t -d -p 8003:80 -p 4430:443 --restart=always \
 -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice:Z  \
 -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data:Z  \
 -v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice:Z \
 -v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql:Z localhost/onlyofficeds:buildah

Registering your Developer Edition version

If you bought Developer Edition and received the license.lic file, you can place it in your installation to obtain the full version of the software.

When you are using the Podman container, the license.lic file can be placed to any folder (e.g., /app/onlyoffice/DocumentServer/data/license.lic), but you will need to mount this folder when the container starts:

podman run -i -t -d -p 80:80 -p 443:443 --restart=always \
 -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice:Z  \
 -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data:Z  \
 -v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice:Z \
 -v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql:Z \
 -u root onlyoffice/documentserver-de:latest

After that, your version of Developer Edition will become registered and full-featured.

Host ONLYOFFICE Docs on your own server or use it in the cloud

Article with the tag:
Browse all tags