How to switch my local server to https with own certificats?

I have deployed one ONLYOFFICE DocSpace server in my local network, the environment is:
Windows 10 Home PC, with VirtualBox installed, a virtual PC created in VirtualBox, Deepin Linux installed in the virtual machine, and the OO DS server installed using Docker,
The installing is ok with the command

bash docspace-install.sh docker

Later, I found that https is more safe than http, so I decided to switch to https. So, I found out this page from your site:
https://helpcenter.onlyoffice.com/installation/docspace-community-https-docker.aspx
To simulate some users that do not have internet connection, I decided not to install CA-signed certificate, but to choose my own certificate, only one command line is needed in your help page,

bash /app/onlyoffice/config/docspace-ssl-setup -f yourdomain.com /app/onlyoffice/fullchain.pem /app/onlyoffice/privkey.pem

but, here is my question, How to generate my own fullchain.pem and privkey.pem files before this command?
To generate these files, I found another help page in your website:
https://helpcenter.onlyoffice.com/installation/docs-community-install-docker.aspx
I don’t know whether it is useful, but I had a try, I generated 4 files, onlyoffice.key, onlyoffice.csr, onlyoffice.crt and dhparam.pem. These four files are different than the two files needed in the above guide page, I don’t know what’s the next step should I do, to self sign certificates my OODS server.

Hello @VincentYoung

This guide explains how to generate self-signed certificates for ONLYOFFICE Docs, you cannot rely on that for DocSpace as generated with this guides certificates do not form chain.

I’d recommend obtaining proper CA-issued certificates instead of self-signed ones as DocSpace functionality may have problems working with self-signed ones.