🔒Setup SSL Certificate

SSL Certificate setup in linux server

We are going to use dehydrated arrow-up-rightopensource tools for signing certificates.

STEP 1: Log in as a root to the server.

ssh root@ip_address

STEP 2: Clone dehydrated Github repo inside /opt/

cd /opt/ && git clone https://github.com/dehydrated-io/dehydrated

STEP 3: Create dehydrated directory inside /etc/

cd /etc/ && mkdir dehydrated

STEP 4: Copy config file into /etc/dehydrated/ from docs/examples

cd /dehydrated/ && cp /opt/dehydrated/docs/examples/config .

STEP 5: Create .well-known/acme-challenge directory in /var/www/html

mkdir -p /var/www/html/.well-known/acme-challenge

STEP 6: Change the config file as follows

BASEDIR=/etc/dehydrated

WELLKNOWN="/var/www/html/.well-known/acme-challenge"

[email protected]

STEP 7: Create domains.txt inside /etc/dehydrated/

STEP 8: Update nginx.conf file with .well-known location

STEP 9: Restart nginx

STEP 10: Run Register and Accept terms then Run dehydrated

STEP 11: Configure server in nginx.conf

STEP 12: Restart Nginx Server again

STEP 13: To Renew Certificates setup a weekly cron job

Last updated