# SSL config with drumsergio/genieacs

**URL:** <https://forum.genieacs.com/t/ssl-config-with-drumsergio-genieacs/419>\
**Category:** Uncategorized\
**Created:** [November 4, 2019, 2:46am UTC](https://forum.genieacs.com/t/ssl-config-with-drumsergio-genieacs/419 "2019-11-04T02:46:15Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![sathackr](https://avatars.discourse-cdn.com/v4/letter/s/c57346/32.png) [@sathackr](https://forum.genieacs.com/u/sathackr)\
**Post date:** [November 4, 2019, 2:46am UTC](https://forum.genieacs.com/t/ssl-config-with-drumsergio-genieacs/419/1 "2019-11-04T02:46:15Z")

</div>

I’m not understanding the documentation well, or the documentation for the docker image assumes I know more than I do.

I discovered that config.json doesn’t exist for the docker image, that it’s in the genieacs.env files.

I’m trying to enable SSL, and have set:  
CWMP\_SSL\_CERT=/opt/genieacs/cert.crt  
CWMP\_SSL\_KEY=/opt/genieacs/key.key

in the geniceacs.env files, but SSL is not working and I see nothing in the logs to tell me why.

Can someone provide an example genieacs.env with working SSL for me to compare?

Thanks!

---

<div class="post-metadata">

**Author:** ![lavira](https://avatars.discourse-cdn.com/v4/letter/l/87869e/32.png) [@lavira](https://forum.genieacs.com/u/lavira)\
**Post date:** [November 4, 2019, 6:46am UTC](https://forum.genieacs.com/t/ssl-config-with-drumsergio-genieacs/419/2 "2019-11-04T06:46:31Z")

</div>

Hi,

All GenieACS environment variables must be prefixed with `GENIEACS_` . Please try with:  
GENIEACS\_CWMP\_SSL\_CERT=/opt/genieacs/cert.crt  
GENIEACS\_CWMP\_SSL\_KEY=/opt/genieacs/key.key

---

<div class="post-metadata">

**Author:** ![telwaco](https://avatars.discourse-cdn.com/v4/letter/t/dfb087/32.png) [@telwaco](https://forum.genieacs.com/u/telwaco)\
**Post date:** [April 5, 2020, 6:29pm UTC](https://forum.genieacs.com/t/ssl-config-with-drumsergio-genieacs/419/3 "2020-04-05T18:29:19Z")

</div>

I have done the installation from the source code of genieacs 1.2 with nodejs 12 and modified the genieacs.env file as above to use SSL but it doesn’t work (without SSL lines all work fine):  
[ERROR] Worked died  
[ERROR] uncaught exception

Could it be from the nodejs version?  
Any suggestions for help?

Thank you in advanced

---

<div class="post-metadata">

**Author:** ![ciki](https://avatars.discourse-cdn.com/v4/letter/c/c0e974/32.png) [@ciki](https://forum.genieacs.com/u/ciki)\
**Post date:** [June 25, 2020, 9:49am UTC](https://forum.genieacs.com/t/ssl-config-with-drumsergio-genieacs/419/4 "2020-06-25T09:49:28Z")

</div>

hi, hello, i have the same problem as you, have you solved it?  
I used your configuration,  
After restarting the genieacs server, /usr/bin/genieacs-cwmp is lost;  
genieacs-cwmp cannot run,  
Because in the environment variables, I only configure the SSL parameters of genieacs-cwmp;  
GENIEACS\_CWMP\_SSL\_CERT=/opt/genieacs/cert.crt  
GENIEACS\_CWMP\_SSL\_KEY=/opt/genieacs/key.key  
When I remove GENIEACS\_CWMP\_SSL\_CERT/ GENIEACS\_CWMP\_SSL\_KEY;  
genieacs-cwmp can start normally.  
Can anyone help me check it?  
Nothing can be seen in the genieacs log, use journalctl -e to check:

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/genieacs/original/1X/304a2a6775c3db863a2c496a7ce0af418f8b2f43.png)  
thank you very much.

---

<div class="post-metadata">

**Author:** ![lavira](https://avatars.discourse-cdn.com/v4/letter/l/87869e/32.png) [@lavira](https://forum.genieacs.com/u/lavira)\
**Post date:** [June 25, 2020, 11:37am UTC](https://forum.genieacs.com/t/ssl-config-with-drumsergio-genieacs/419/5 "2020-06-25T11:37:51Z")

</div>

Hi,

Did you generate your key using a passphrase? If yes, please try to regenerate it without.

---

<div class="post-metadata">

**Author:** ![ciki](https://avatars.discourse-cdn.com/v4/letter/c/c0e974/32.png) [@ciki](https://forum.genieacs.com/u/ciki)\
**Post date:** [June 28, 2020, 12:58am UTC](https://forum.genieacs.com/t/ssl-config-with-drumsergio-genieacs/419/6 "2020-06-28T00:58:18Z")

</div>

Hi， lavira；  
First of all, thanks for your reply,  
Secondly, I did not use openssl to generate a password, and used my own certificate and secret key;  
Is there any problem?  
What are the correct configuration and steps for SSL connection requests?  
Are there any detailed instructions or documentation?

---

<div class="post-metadata">

**Author:** ![lavira](https://avatars.discourse-cdn.com/v4/letter/l/87869e/32.png) [@lavira](https://forum.genieacs.com/u/lavira)\
**Post date:** [June 29, 2020, 8:01am UTC](https://forum.genieacs.com/t/ssl-config-with-drumsergio-genieacs/419/7 "2020-06-29T08:01:46Z")

</div>

the error you received seems to be related to a invalid key … just to make sure your key is not encrypted, please run:  
`openssl rsa -in /opt/genieacs/key.key -out /opt/genieacs/unencryptedKey.key`

and after that check if the certificate and key match:

`openssl x509 -noout -modulus -in /opt/genieacs/cert.crt | openssl md5`  
`openssl rsa -noout -modulus -in /opt/genieacs/unencryptedKey.key | openssl md5`

The hashed values from each command should be equal … If all is ok, replace the key in the env file and restart the process and see if it works.  
`GENIEACS_CWMP_SSL_KEY=/opt/genieacs/unencryptedKey.key`

---

<div class="post-metadata">

**Author:** ![fonz](https://avatars.discourse-cdn.com/v4/letter/f/7ba0ec/32.png) [@fonz](https://forum.genieacs.com/u/fonz)\
**Post date:** [July 2, 2020, 4:45am UTC](https://forum.genieacs.com/t/ssl-config-with-drumsergio-genieacs/419/8 "2020-07-02T04:45:50Z")

</div>

All that is needed to enable SSL is to generate certificate and assign these variables CWMP\_SSL\_CERT, CWMP\_SSL\_KEY?

_What about installing nginx and then adding all its configs that was mentioned in some other discussions. Is this required for genieacs 1.2?_

Currently I have genieacs 1.2 installed and running using this procedure [http://docs.genieacs.com/en/latest/installation-guide.html](http://docs.genieacs.com/en/latest/installation-guide.html).

Would like to change ACS URL from [http://a.b.c.d:7547](http://a.b.c.d:7547) to [https://genieacs-1.acme.com/CPEMgt](https://genieacs-1.acme.com/CPEMgt) and the console from http:/a.b.c.d:3000 to [https://genieacs-1.acme.com](https://genieacs-1.acme.com). So I would need two certificates?

---

<div class="post-metadata">

**Author:** ![zaidka](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/zaidka/32/9_2.png) [@zaidka](https://forum.genieacs.com/u/zaidka)\
**Post date:** [July 7, 2020, 9:23am UTC](https://forum.genieacs.com/t/ssl-config-with-drumsergio-genieacs/419/9 "2020-07-07T09:23:25Z")

</div>

> [@fonz](#):
>
> Would like to change ACS URL from [http://a.b.c.d:7547](http://a.b.c.d:7547) to [https://genieacs-1.acme.com/CPEMgt](https://genieacs-1.acme.com/CPEMgt) and the console from http:/a.b.c.d:3000 to [https://genieacs-1.acme.com](https://genieacs-1.acme.com). So I would need two certificates?

I never tried this, but multi domain certificates seem to be a thing!

---

<div class="post-metadata">

**Author:** ![akcoder](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/akcoder/32/11_2.png) [@akcoder](https://forum.genieacs.com/u/akcoder)\
**Post date:** [July 8, 2020, 3:49pm UTC](https://forum.genieacs.com/t/ssl-config-with-drumsergio-genieacs/419/10 "2020-07-08T15:49:00Z")

</div>

You can get a wildcard cert, it would be good for \*.acme.com

---

<div class="post-metadata">

**Author:** ![mason](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@mason](https://forum.genieacs.com/u/mason)\
**Post date:** [November 19, 2021, 8:57am UTC](https://forum.genieacs.com/t/ssl-config-with-drumsergio-genieacs/419/11 "2021-11-19T08:57:12Z")

</div>

Does anyone really work for just added the following lines into the “genieacs.env” ?

> [@ciki](#):
>
> GENIEACS\_CWMP\_SSL\_CERT=/opt/genieacs/cert.crt  
> GENIEACS\_CWMP\_SSL\_KEY=/opt/genieacs/key.key

I generated the CRT and KEY (by openssl self-certified ) and it does NOT work at all, is there anyone actually work without any issue??

---

<div class="post-metadata">

**Author:** ![akcoder](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/akcoder/32/11_2.png) [@akcoder](https://forum.genieacs.com/u/akcoder)\
**Post date:** [November 22, 2021, 5:51pm UTC](https://forum.genieacs.com/t/ssl-config-with-drumsergio-genieacs/419/12 "2021-11-22T17:51:27Z")

</div>

It works perfect fine without any issues. Did you restart the CWMP process? Are the \_CERT and \_KEY entries pointing to valid files?

---

<div class="post-metadata">

**Author:** ![mason](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@mason](https://forum.genieacs.com/u/mason)\
**Post date:** [November 23, 2021, 6:44am UTC](https://forum.genieacs.com/t/ssl-config-with-drumsergio-genieacs/419/13 "2021-11-23T06:44:25Z")

</div>

Hi akcoder  
Thank you for your reply.

Yes, I restart CWMP, and does CRT and key files necessarily have to be certificated by the trust certification authority?

Added more:  
I generated the CRT and KEY again for self certificated and I still see the error when apply the “systemctl status genieacs-ui.service” which I change to ACS’s UI instead of CWMP.

Here is how I generated the SSL certificate:

$openssl genrsa -aes256 -passout pass:gsahdg -out server.pass.key 4096  
$openssl rsa -passin pass:gsahdg -in server.pass.key -out server.key  
$rm server.pass.key  
$openssl req -new -key server.key -out server.csr  
(no challenge password)  
$openssl x509 -req -sha256 -days 365 -in server.csr -signkey server.key -out server.crt

Here is how the genieacs.env file has been set up.

 ![Genieacs_env](https://canada1.discourse-cdn.com/flex035/uploads/genieacs/original/1X/6172c9caa1d91be971e057141ccb68e7080fb7ca.png)

Here is the result when apply the command “systemctl status genieacs-ui.service”

 ![GenieACS](https://canada1.discourse-cdn.com/flex035/uploads/genieacs/original/1X/595ed5c2ec703594bd6d0b0df3fbc58cc783bb68.png)

Thank you.

Mason

---

<div class="post-metadata">

**Author:** ![mason](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@mason](https://forum.genieacs.com/u/mason)\
**Post date:** [November 23, 2021, 7:36am UTC](https://forum.genieacs.com/t/ssl-config-with-drumsergio-genieacs/419/14 "2021-11-23T07:36:38Z")

</div>

Hi akcoder

I am sorry, my bad, the CRT and KEY file was generated by root and Genieacs was not able to access them and after change the permission and it works.

Thank you,

Mason
