• Categories
    • Recent
    • Tags
    • Popular
    • Register
    • Login

    How to enable a SSL certificate?

    Scheduled Pinned Locked Moved Troubleshooting
    3 Posts 3 Posters 2.1k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V Offline
      Velo17
      last edited by

      Is there some information about how exactly to enable a SSL cert for MyController?

      To get things started I created a self signed (local) certificate but have no idea where to install it on the Raspberry or rather how to enable it within the builtin webserver of MyController?!

      Thanks for your ideas!

      jkandasaJ 1 Reply Last reply Reply Quote 0
      • jkandasaJ Offline
        jkandasa @Velo17
        last edited by

        @Velo17 It is there in the user manual. You can edit the following to change default certificate.

        mcc.web.ssl.keystore.file=../conf/keystore.jks
        mcc.web.ssl.keystore.password=mycontroller
        mcc.web.ssl.keystore.type=JKS
        
        1 Reply Last reply Reply Quote 1
        • C Offline
          cimba007
          last edited by cimba007

          This is how I updated the keystore.jks to run with letsencrypt!!

          • Register with any free dyndns provider (e.g. http://www.dnshome.de )
          • Enter the access data in your router

          The next step is a little bit tricky .. here is what I did

          • install apache2
          • enable port forwarding for port 80 in your router
          • https://tutorials-raspberrypi.de/raspberry-pi-ssl-zertifikat-kostenlos-mit-lets-encrypt-erstellen/

          The relevant certificate files are located here after running autocert:
          /etc/letsencrypt/live/YOURDOMAIN

          Then check this out (https://blog.codecentric.de/2013/01/selbstsignierte-zertifikate-aus-pem-dateien-in-java/)

          • openssl pkcs12 -export -out keystore.p12 -inkey privkey.pem -in cert.pem
          • keytool -importkeystore -destkeystore keystore.jks -srcstoretype PKCS12 -srckeystore keystore.p12
          • cp keystore.jks /home/pi/mycontroller/conf

          Edit mycontroller.properties:
          mcc.web.ssl.keystore.file=../conf/keystore.jks
          mcc.web.ssl.keystore.password=mycontroller
          mcc.web.ssl.keystore.type=JKS

          mycontroller must be replaced by the passwort you choose during certificate export with openssl

          You can now disable port forwarding for port 80 and enable port forwarding for port 8443 (be sure to choose a strong passwort)

          Result:
          0_1507657120186_470a10e6-5b49-4071-8679-ad784e0a14e8-image.png

          !!! Valid certificate in all major browsers (chrome in my example) !!!

          1 Reply Last reply Reply Quote 1
          • First post
            Last post

          0

          Online

          586

          Users

          529

          Topics

          3.4k

          Posts
          Copyright © 2015-2025 MyController.org | Contributors | Localization