Skip to main content

Using certbot in a noninteractive way for nginx

 if you need to get SSL certificates without any interaction for nginx get this piece of code

certbot certonly --noninteractive --agree-tos --cert-name ${SITE_TLD} -d ${SITE_DOMAIN_ONE} -d ${SITE_DOMAIN_TWO} -m ${SSL_EMAIL}


certbot --nginx --noninteractive --agree-tos --cert-name domainname.com -d domainname.com -d www.domainname.com -m webmaster@domainname.com


to renew it automatically run crond -e

3 3 * * * /usr/bin/certbot renew --quiet

it will be checked everyday at 3:03 am, if it is time to renew it will do it for you

 

Comments

Popular posts from this blog

How to secure SpringBoot with SSL and Tomcat or Undertow

when we are going to take our applications to production mode, we must have an SSL certificate for the FrontEnd and   BackEnd too, in this case, our backend is a  SpringBoot which is using a tomcat embedded server. Terminology TLS vs SSL TLS is the successor to SSL. It is a protocol that ensures privacy between communicating applications. Unless otherwise stated, in this document consider TLS and SSL as interchangable. Certificate (cert) The public half of a public/private key pair with some additional metadata about who issued it etc. It may be freely given to anyone. Private Key A private key can verify that its corresponding certificate/public key was used to encrypt data. It is never given out publicly. Certificate Authority (CA) A company that issues digital certificates. For SSL/TLS certificates, there are a small number of providers (e.g. Symantec/Versign/Thawte, Comodo, GoDaddy, LetsEncrypt) whose certificates are included by most browsers and Op...

How to deploy a VueJS App using Nginx on Ubuntu

There are thousands of blogs and websites out there explaining how to do a hello world and how to start with VueJS, but in this little post, I’m just going to be explaining how to do deploy a VueJs app after you have run the command through the CLI npm run build . So when you run the command npm run build a dist folder is created and that folder’s got the essential .js files to run our app, when we want to run our app on an Nginx server by default the vue-router is not going to work well so that Nginx does not come ready to work by default with a VueJs app This is basically for a Linux Ubuntu distribution if you’ve got any other Linux distribution just pay attention where is going to be set the www/html folder and the Nginx settings so that this is useful for any Linux distribution  Install and configure nginx sudo apt install nginx Double check to make sure the nginx service is running with command service nginx status, then open your browser and enter ...

Uploading and Deleting Files with Amazon S3 and SpringBoot

Today I am going to be sharing about how to upload and delete files at AmazonS3 with SpringBoot , Amazon Simple Storage Service (S3)  is an object storage platform which helps you to store the files in form of objects, it allows us to store and retrieve any amount of data from anywhere.  Each file is stored in Amazon S3 (as an object) and is represented using a key. we are going to be using AWS Java SDK which supports various APIs related to Amazon S3 service for working with files stored in S3 bucket. so after going to  https://start.spring.io/  and create a new SpringBoot project with the Artifact as  AmazonS3  or as you prefer, open your pom.xml and let's add this dependency. AWS Java SDK supports several  APIs related to Amazon S3 service for working with files stored in S3 bucket.  <!-- https://mvnrepository.com/artifact/com.amazonaws/aws-java-sdk --> < dependency >     < groupId >...