User Tools

Site Tools


webapps:onlyoffice

This is an old revision of the document!


ONLYOFFICE

Only Office is an open source office suite capable of opening Microsoft Office format documents, spreadsheets, and presentations. It runs as a webapp so is cross-platform from the user standpoint, although both the server and desktop applications have Windows compatible executables available. This is a guide on how to install the official docker container on an Ubuntu 18.04 server.

Update apt and install some dependecies.

sudo apt update;sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common -y

Download and install the latest version of docker.

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
sudo add-apt-repository ppa:certbot/certbot

Download and install the Let's Encrypt certbot.

sudo apt search certbot
sudo apt install certbot python3-certbot

Generate the SSL certificate and a Diffie-Hellman key.

sudo certbot certonly
openssl dhparam -out dhparam.pem 2048

Create and start the ONLYOFFICE Docker container, the option specified creates only the document server. Removing the option will install the full ONLYOFFICE suite.

sudo docker run -i -t -d -p 443:443 --restart=always -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data onlyoffice/documentserver

Navigate to the http://yourserver to check if the server is running, you should be greeted with a message stating such as well as a green check mark.

A folder needs to be created for the Docker container to be able to access the certs. The files will then need to be copied and the permissions changed on the public key for security.

sudo mkdir -p /app/onlyoffice/DocumentServer/data/certs
sudo cp /etc/letsencrypt/live/sub.domain.tld/fullchain.pem /app/onlyoffice/DocumentServer/data/certs/onlyoffice.crt
sudo cp /etc/letsencrypt/live/sub.domain.tld/privkey.pem /app/onlyoffice/DocumentServer/data/certs/onlyoffice.key
sudo cp dhparam.pem /app/onlyoffice/DocumentServer/data/certs/
sudo chmod 400 /app/onlyoffice/DocumentServer/data/certs/onlyoffice.key

Restart the Docker container after obtaining the image or container id. FIXME

sudo docker ps -a
sudo docker image ls
sudo docker restart <image_id>

Navigate to https://yourserver
Reboot to ensure everything is working

sudo reboot
webapps/onlyoffice.1580653936.txt.gz · Last modified: 2021/06/18 16:36 (external edit)