Synology: How to Allow openHAB to Work Over an HTTPS Connection?

Synology How to Allow openHAB to Work Over an HTTPS Connection

Have you already installed openHAB using docker on your Synology NAS following my step by step guide? Do you want to log in via HTTPS using your custom domain name even when you are away from home? It’s simple and free. You don’t need to buy domains, you don’t need to look for information elsewhere because here you will find the easy way to do it. Say you’re at a friend’s house and want to see your smart openHAB. You can access openHAB from outside your home, just like you would any website.

Note: You can also use Wildcard Certificate

  • STEP 1

Please Support My work by Making a Donation.

  • STEP 2

Follow my step by step guide on how to activate your synology.me DDNS on DSM 7
Follow my step by step guide on how to activate your synology.me DDNS on DSM 6.2.4
Note: If you already own a synology.me DDNS, skip this STEP.

  • STEP 3

Go to Control Panel / Security / Certificate then click the Add tab. Follow the instructions in the image below.

openHAB SSL Certificate set up Synology 1

  • STEP 4

After you click Add on STEP 3 a new pop up window will open. Select Add a new certificate then click Next. Follow the instructions in the image below.

openHAB SSL Certificate set up Synology 2

  • STEP 5

After you click Next, select a Description for your certificate. I choose “openHAB” because I will be using this certificate for my openHAB container. Select Get a certificate from Let’s Encrypt then click Next. Follow the instructions in the image below.

openHAB SSL Certificate set up Synology 3

  • STEP 6

After you click Next, on the Domain name area, type in openHAB.yourname.synology.me or the description name you have previously chosen at STEP 5. Type in your email in the Email area, then click Done. Follow the instructions in the image below.

openHAB SSL Certificate set up Synology 4

  • STEP 7

After you click Done, you will have to wait a few seconds for your new certificate to be created. If everything goes right, you will see your new certificate in the Certificate area.

openHAB SSL Certificate set up Synology 5

Note: If you fail to create a new certificate try to create a new certificate using your http://yournasip:5000 instead using the https connection.

  • STEP 8

Go to Control Panel / Login Portal / Advanced Tab / click Reverse Proxy. Follow the instructions in the image below.

openHAB SSL Certificate set up Synology 6

  • STEP 9

Now click the “Create” button. Follow the instructions in the image below.

openHAB SSL Certificate set up Synology 7

  • STEP 10

After you click the Create button, the window below will open. Follow the instructions in the image below.

On General area, set the Reverse Proxy Name description: type in openHAB or the Description you have already chosen at STEP 5. After that, add the following instructions:

Source:
Protocol: HTTPS
Hostname: openHAB.yourname.synology.me
Port: 443

Destination:
Protocol: HTTP
Hostname: localhost
Port: 7100 (Read the Note)

openHAB SSL Certificate set up Synology 8

Note: Under Destination, the localhost port will vary depending on the port you used to create your container. This port can vary from container to container. For example, my openHAB container is running in localhost on port 7100.

  • STEP 11

Go to Control Panel / Security / Certificate / Select the certificate you have previously created at STEP 7, then click Settings. Follow the instructions in the image below.

openHAB SSL Certificate set up Synology 9

  • STEP 12

Your new certificate should be mirroring. Select your Certificate and, from the dropdown menu, select your Certificate again, then click OK. Follow the instructions in the image below.

openHAB SSL Certificate set up Synology 10

  • STEP 13

Go back to STEP 1 or you will deal with karma 🙂

  • STEP 14

Now open your browser and type in your HTTPS/SSL certificate, in my case https://openhab.mariushosting.synology.me Note: In the browser address bar don’t forget to add https:// before the link.

openHAB SSL Certificate set up Synology 12

Enjoy openHAB with HTTPS!

openHAB SSL Certificate set up Synology 11
Note: This guide can be applied to all Synology NAS Docker Containers for which you want to use HTTPS/SSL.

This post was updated on Wednesday / August 10th, 2022 at 9:27 PM