Setting up ssl and dynamic dns from own domain

Hi,

This newbe needs help with securing my nextcloud.

I have a Pi 4, a private domain with cpanel (www.waarwoontwillem.nl) and a ZTE modem.

On my Pi, Nextcloud is running fine. I set my modem to forward port 443 to my Pi. On my domain I set up a Dynamic DNS witch sends me to my Pi in my home.

Everything works, but it is not trusted. And there begins my quest.

I understand that for security I should use https and ssl certificates.

In cpanel i can view the ssl ‘Certificate’, 'Private Key’ and ‘Certificate Authority Bundle’ which are part of the dynamic DNS. They are not download files, but I see the funny text in a textbox.

Q1: should i just copy the text and put them in a textfile?
Q2: should the files have special names? or extensions?
Q3: where should I put those files?
Q4: do i forget something to make it work?

All the help is appreciated

Willem

I have similar setup but my NextCloud installation is snap version so SSL certificate installation process may vary but for SSL certificate carry forward from cPanel, here are the steps.

In your paid hosting log into your cPanel. Navigate to your SSL page, there should be an option called INSTALL AND MANAGE SSL FOR YOUR SITE (HTTPS)

Under that you can view the private key / cirtificate and cirtificate authority in plain text

You can copy them and save in your local machine as plain text file but with .pem file extension.

These 3 files can now be used in your local server with anysubdomain.yourdomain.com

Thanks