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-ee:latest
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.
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).