How to properly set up HTTPS for OnlyOffice

2019-02-25 18:48发布

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.

2条回答
地球回转人心会变
2楼-- · 2019-02-25 19:18

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.

查看更多
走好不送
3楼-- · 2019-02-25 19:24

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.

查看更多
登录 后发表回答