Replacing selfsigned certificates by certbot certificates

Questions/problems on Docker
Post Reply
oliverv
Posts: 3
Joined: Thu Nov 28, 2019 10:56 am

Replacing selfsigned certificates by certbot certificates

Post by oliverv » Thu Nov 28, 2019 12:00 pm

Hi to all,
I am using the latest docker version of OnlyOffice Document server with the Nextcloud app.
Works great for me, but with self signed certificate, and as you state in https://api.onlyoffice.com/editors/nextcloud#editable you
strongly recommend that you replace the certificate with the one issued by some CA
I'm running two multi core machines, both Debian 10,
- one runs Nextcloud 16.0.5 with ONLYOFFICE app 3.0.2, installed using install script from https://docs.nextcloudpi.com/en/curl-installer/
- the other runs Docker version 19.03.5, build 633a0ea838, following instructions from https://github.com/ONLYOFFICE/Docker-Do ... /README.md

I have onlyoffice.key and onlyoffice.crt files in /app/onlyoffice/DocumentServer/data/certs/
I can generate a certificate with certbot, they will typically be stored as /etc/letsencrypt/live/myoffice.domain.tld/fullchain.pem and privkey.pem

What would be the way to proceed, in order to use the fullchain.pem and privkey.pem instead of onlyoffice.crt and onlyoffice.key ?
I've tried just coping over the original pem files, with and without renaming them, or creating links to them, nothing worked.
Thanks in advance for your time.

Andrew
Posts: 102
Joined: Mon Apr 01, 2019 1:09 pm

Re: Replacing selfsigned certificates by certbot certificates

Post by Andrew » Thu Nov 28, 2019 12:54 pm

Hello, oliverv.

If you copy fullchain.pem and privkey.pem to /app/onlyoffice/DocumentServer/data/certs/ on host and rename them to onlyoffice.key and onlyoffice.crt it should work. In order for these manipulations to take effect please don't forget to restart Document Server services using

Code: Select all

supervisorctl restart all
inside of your Document Server container.

oliverv
Posts: 3
Joined: Thu Nov 28, 2019 10:56 am

Re: Replacing selfsigned certificates by certbot certificates

Post by oliverv » Thu Nov 28, 2019 2:45 pm

Thanks Andrew for quick response.
Will try it later on tonight.

oliverv
Posts: 3
Joined: Thu Nov 28, 2019 10:56 am

[Solved]Re: Replacing selfsigned certificates by certbot certificates

Post by oliverv » Thu Nov 28, 2019 3:46 pm

Thanks for your help Andrew

Although

Code: Select all

supervisorctl restart all
did not do it

Code: Select all

docker stop container_name

Code: Select all

docker start container_name
did :D

Post Reply