jansensan
jansensan

Reputation: 627

How to properly set up HTTPS for OnlyOffice

Following OnlyOffice's help center's instructions leads to the creation of security certificate declared as invalid by browsers, as it is self-signed.

The intention is to use OnlyOffice's server on Docker for NextCloud, which runs properly already on another server.

Currently, the certificates have been created in the directory suggested by the instructions:

/app/onlyoffice/DocumentServer/data/certs# ls
dhparam.pem  onlyoffice.crt  onlyoffice.csr  onlyoffice.key

I have followed all the given steps, and it does not work.

Is there a way to use LetsEncrypt instead of self-signed certificates?

I am not an IT management person, I am a simple developer trying to use OSS to not use Google Docs etc. Take this into consideration when providing guidance, as what you may take for granted, I may not.

Upvotes: 3

Views: 7393

Answers (3)

Rexx Rules
Rexx Rules

Reputation: 11

@jansensan - per onlyoffice docs at this link.

To secure the application via SSL basically two things are needed:

Private key (.key)
SSL certificate (.crt)

So you need to create and install the following files:

/app/onlyoffice/DocumentServer/data/certs/onlyoffice.key
/app/onlyoffice/DocumentServer/data/certs/onlyoffice.crt

Unfortunately, their documentation leaves key details out.
At this point it would help us help you if you provide exact command used, or share how you are
mounting "/app/onlyoffice/DocumentServer/data/certs" to the container.

Don't give up - we can figure this out.

Upvotes: 1

John Hanley
John Hanley

Reputation: 81386

The problem that you are having is that a self-signed certificate is not trusted by anyone (anything).

You can create your own certificate using Let's Encrypt. You will either need to create a special file on your server or create a TXT record on your domain's DNS server.

Certbot Download

The following is for Linux. If you are running on Windows, try using ManuaLE (more info below)

Go to let's encrypt and download certbot. Then from the command line:

certbot certonly --manual --preferred-challenges dns -d mydomain.com

This command will prompt you to create a TXT record on your DNS server. After creating the record wait a few minutes before pressing ENTER to continue.

After your SSL certificate is created, copy and rename them to your desired location listed in your question.

Instructions for ManuaLE for Windows.

ManuaLE Download

manuale authorize mydomain.com
manuale issue mydomain.com

After your SSL certificate is created, copy and rename them to your desired location listed in your question.

Upvotes: 0

ibnpetr
ibnpetr

Reputation: 527

Please restart the container, the DocumentServer will switch to https config. Open the address of the DocumentServer in your browser. If that is available, it can be connected to your NextCloud instance.

Upvotes: 0

Related Questions