How to install an SSL certificate on a TerraMaster NAS
In short
In TOS 6 and 7, open “Control Panel” → “General Settings” → “Security”, click “Add” in the certificate section, select fullchain.pem and privkey.pem, then assign the certificate to services. TOS 5 cannot change the certificate of the web interface.
For a TerraMaster NAS running TOS 6 or TOS 7. The certificate works when you open the NAS at an address on your own domain (for example nas.yourdomain.com). TOS 5 cannot change the certificate of the web interface (according to TerraMaster support), so this guide does not apply to it.
Files you need
fullchain.pem and privkey.pem, uploaded from your computer. TerraMaster does not say whether TOS accepts ECDSA keys, so choose “RSA 2048” in step 1 of the generator.
Upload the certificate from production mode. A certificate from test mode is only for checking the process: browsers don't trust it, and some panels won't accept it at all.
Before you start
- TOS does not get Let's Encrypt certificates by itself. The built-in certificate is issued for terra-master.com, so it does not match your domain.
- Update TOS to the latest version. In older TOS 6 releases an invalid certificate file could stop the system from booting after a restart (fixed in releases 6.0.610 and 6.0.648).
- Do not turn on the forced redirect to HTTPS until you have checked that the web interface opens over https:// with the new certificate. With the redirect on and HTTPS not working, you cannot reach the interface in a browser.
TOS 7
- Sign in to TOS and open “Control Panel” → “General Settings” → “Security”.
- In the “Certificates” section click “Add”.
- Select the certificate file and the private key file (see below for which file goes where) and confirm.
- Click “Configure” and bind the new certificate to the services that should use it.
TOS 6
- Sign in to TOS and open “Control Panel” → “General Settings” → “Security”.
- In the “Certificate” section click “Add”.
- Select the certificate file and the private key file (see below for which file goes where) and confirm.
- Click “Set” and select the new certificate for the services and applications that should use it.
Which file goes into which field
- Certificate field: the fullchain.pem file. If the dialog has a separate field for an intermediate (CA) certificate, select cert.pem in the certificate field and chain.pem in that separate field.
- Private key field: the privkey.pem file
Checking the result
Open your website over https:// and click the padlock (or the settings icon) next to the address. The certificate details should show Let's Encrypt as the issuer and an expiry date matching the panel. If the browser still shows the old certificate, wait a few minutes and reload the page.
If you see a warning instead of your website, we explain the error codes on the page “Your connection is not private”. If the site opens over https but looks broken or something doesn't work, see mixed content. Finally, turn on the redirect from http to https so everyone lands on the secure version.
Good to know
- TerraMaster's help does not show the dialog for adding a certificate, so we describe the fields in general terms, without their names. TOS accepts files in PEM format (with .pem, .crt and .cer extensions), which is what the generator gives you.
- The TOS web interface uses port 8181 by default, and port 5443 over HTTPS in TerraMaster's examples. The address is then, for example, https://nas.yourdomain.com:5443.
- If the browser still shows the terra-master.com certificate after you assign yours, check the assignment to services again and open the interface in a private window at the address on your own domain. There are such reports on the TerraMaster forum; if the problem remains, contact TerraMaster support.
- Turn on the redirect to HTTPS only after you have checked the certificate: in TOS 7 the option “Force redirect HTTP connections to HTTPS” under “Control Panel” → “Network Services” → “Network” → “General”, in TOS 6 “Force HTTP Connection to Redirect to HTTPS” under “Control Panel” → “Network Services” → “General”.
When you renew
Generate a new certificate. In the same section click “Update”: this button is for replacing a certificate and key when they expire. If it does not let you select new files, add the new certificate with “Add”, assign it to services and delete the old one with “Delete”. TOS does not renew an imported certificate by itself.
Hosting panels change from time to time. If something looks different from this guide, write to kontakt@freessl.pl and we'll update it.