Out of the four files generated above, you need to install the
dhparam.pem files at the onlyoffice server. The CSR file is not needed, but do make sure you safely backup the file (in case you ever need it again).
The default path that the onlyoffice application is configured to look for the SSL certificates is at
/var/www/onlyoffice/Data/certs, this can however be changed using the
SSL_DHPARAM_PATH configuration options.
/var/www/onlyoffice/Data/ path is the path of the data store, which means that you have to create a folder named certs inside
/app/onlyoffice/CommunityServer/data/ and copy the files into it and as a measure of security you will update the permission on the
onlyoffice.key file to only be readable by the owner.
mkdir -p /app/onlyoffice/CommunityServer/data/certs
cp onlyoffice.key /app/onlyoffice/CommunityServer/data/certs/
cp onlyoffice.crt /app/onlyoffice/CommunityServer/data/certs/
cp dhparam.pem /app/onlyoffice/CommunityServer/data/certs/
chmod 400 /app/onlyoffice/CommunityServer/data/certs/onlyoffice.key
You are now just one step away from having our application secured.