Browsed by
Month: December 2020

Onlyoffice and Portainer Docker Install

Onlyoffice and Portainer Docker Install

It’s all fun and games, until someone gets hurt… here is how I setup OnlyOffice and Portainer using Docker. I am using a vps running Debian 10.

OnlyOffice

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

Once the container is up and running, copy your ssl security information. I copy my user ssl.crt and ssl.ca into a single file: onlyoffice.crt, which should be installed at /app/onlyoffice/DocumentServer/data/certs/.

Next, copy the ssl.key to /app/onlyoffice/DocumentServer/data/certs/onlyoffice.key. Make it read-only by doing chmod 400 onlyoffice.key.

Copy your license file to /app/onlyoffice/DocumentServer/data/license.lic.

Restart the docker container, and you’re good to go. You can access the status page at https://yourwebsite:32769.

Portainer

First, I create the directory: /app/portainer/local-certs.

Next, I copy the ssl certificates to the directory I just created. They are are same as the onlyoffice ones, except I rename them portainer.crt and portainer.key.

docker run -d -p 9000:9000 -p 8000:8000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v /app/portainer/local-certs:/certs -v portainer_data:/data portainer/portainer-ce --ssl --sslcert /certs/portainer.crt --sslkey /certs/portainer.key

Portainer can be accessed at https://yourwebsite:9000.