# PayaraMicro - deploy with certbot SSL (HTTPS)

**URL:** <https://forum.payara.fish/t/payaramicro-deploy-with-certbot-ssl-https/816>\
**Category:** Payara Micro\
**Created:** [April 14, 2024, 7:28pm UTC](https://forum.payara.fish/t/payaramicro-deploy-with-certbot-ssl-https/816 "2024-04-14T19:28:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![padoca](https://avatars.discourse-cdn.com/v4/letter/p/45deac/32.png) [@padoca](https://forum.payara.fish/u/padoca)\
**Post date:** [April 14, 2024, 7:28pm UTC](https://forum.payara.fish/t/payaramicro-deploy-with-certbot-ssl-https/816/1 "2024-04-14T19:28:31Z")

</div>

Hello!  
I’m trying to deploy to payaramicro (2023/2024 too), using an SSL port, passing certbot as a certificate!  
It doesn’t work at all, the command is one line,… I tried passing certificateFile… certificateKeyFile… there are no longer these settings in payara micro, I also tried configuring configuration files (microPayaraServer/conf) it doesn’t work, payara never checks these files (payara-micro.properties, web.xml, ssl.properties)… I can’t configure HTTPS to be from the certbot I have on my Ubuntu server!  
Deploy examples I’ve already tried:  
**nohup java -jar microPayaraServer/payara-micro-6.2024.4.jar --deploy /root/backup\_arquivos/spring-api-santander-bootcamp.war --autoBindHttp --sslPort 40080**  
**–certificateFile=/etc/letsencrypt/live/ldsystems.com.br/fullchain.pem --certificateKeyFile=/etc/letsencrypt/live/ldsystems.com.br/privkey.pem \> payara.log 2\>&1 &**

**nohup java -jar microPayaraServer/payara-micro-6.2024.4.jar --deploy /root/backup\_arquivos/spring-api-santander-bootcamp.war --autoBindHttp --sslPort 40080 \> payara.log 2\>&1 &**

Please, can anyone guide me on how this works??? How will payara micro be able to respect the certbot for the SSL port???

---

<div class="post-metadata">

**Author:** ![padoca](https://avatars.discourse-cdn.com/v4/letter/p/45deac/32.png) [@padoca](https://forum.payara.fish/u/padoca)\
**Post date:** [April 14, 2024, 7:54pm UTC](https://forum.payara.fish/t/payaramicro-deploy-with-certbot-ssl-https/816/2 "2024-04-14T19:54:49Z")

</div>

I also tried passing parameters directly and pointing to the config file:  
java -Djavax.net.ssl.keyStore=/etc/letsencrypt/live/ldsystems.com.br/fullchain.pem -Djavax.net.ssl.keyStorePassword=“” -Djavax.net.ssl.keyStoreType=PKCS12 -Djavax. net.ssl.trustStore=/etc/letsencrypt/live/ldsystems.com.br/fullchain.pem -Djavax.net.ssl.trustStorePassword=“” -Djavax.net.ssl.trustStoreType=PKCS12 -Djavax.net.ssl. keyStoreKey=/etc/letsencrypt/live/ldsystems.com.br/privkey.pem -Djavax.net.ssl.keyStoreKeyType=PEM -jar microPayaraServer/payara-micro-6.2024.4.jar --deploy /root/backup\_arquivos/spring -api-santander-bootcamp.war --autoBindHttp --sslPort 40080 \> payara.log 2\>&1 &

nohup java -jar microPayaraServer/payara-micro-6.2024.4.jar --deploy /root/backup\_arquivos/spring-api-santander-bootcamp.war --autoBindHttp --sslPort 40080 --systemproperties /opt/microPayaraServer/conf/payara -micro.properties \> payara.log 2\>&1 &

nothing works to get the correct certificate! cerbot SSL

---

<div class="post-metadata">

**Author:** ![padoca](https://avatars.discourse-cdn.com/v4/letter/p/45deac/32.png) [@padoca](https://forum.payara.fish/u/padoca)\
**Post date:** [April 20, 2024, 8:00pm UTC](https://forum.payara.fish/t/payaramicro-deploy-with-certbot-ssl-https/816/3 "2024-04-20T20:00:03Z")

</div>

Sorted out!  
Creating a configuration file (ssl.properties) with the certificate data and passing it as a property in the deploy, example:  
java -jar microPayaraServer/payara-micro-6.2024.4.jar --deploy /root/backup\_arquivos/spring-api-santander-bootcamp.war --autoBindHttp --sslPort 40080 --systemproperties /opt/microPayaraServer/conf/ssl. properties --sslcert aliascert.com.br

In the properties file:  
keyAlias=aliascert.com.br  
javax.net.ssl.keyStoreAlias=aliascert.com.br  
javax.net.ssl.keyStore=/etc/letsencrypt/live/aliascert.com.br.jks  
javax.net.ssl.keyStorePassword=password  
javax.net.ssl.keyStoreType=JKS  
javax.net.ssl.trustStore=/etc/letsencrypt/live/aliascert.com.br.jks  
javax.net.ssl.trustStorePassword=password  
javax.net.ssl.trustStoreType=JKS
