Browsed by
Tag: docker

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

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/rabbitmq:/var/lib/rabbitmq \
-v /app/onlyoffice/DocumentServer/redis:/var/lib/redis \
-v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql onlyoffice/documentserver

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: tls.crt, which should be installed at /app/onlyoffice/DocumentServer/data/certs/.

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

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 8000:8000 -p 9000:9000 -p 9443:9443 --name=portainer --restart=always --pull=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data -v /app/portainer/local-certs:/certs portainer/portainer-ee:latest --sslcert /certs/portainer.crt --sslkey /certs/portainer.key

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