create account

How to create and install SSL certificate by eluzgin

View this thread on: hive.blogpeakd.comecency.com
· @eluzgin ·
How to create and install SSL certificate
## How to create and install SSL certificate 
By Eugene Luzgin @ EOS Tribe

#### 1. Install certbot from Let's Encrypt

add-apt-repository ppa:certbot/certbot
apt-get update
apt-get install certbot -y

#### 2. Make sure nothing is running on port 80 prior to next step and it's accessible if firewall is installed. 
netstat -an | grep " 80"
sudo ufw enable 80  *
*) Can be disabled/switched off later.

#### 3. Generate your SSL certificate and private key:
sudo certbot certonly --standalone --preferred-challenges http -d [SERVER DOMAIN NAME]*

Example: sudo certbot certonly --standalone --preferred-challenges http -d api.eostribe.io

*) Note: DNS must resolve this domain name to your server IP or otherwise this step won't work.

#### If all goes well - you should see an output like this:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/node.blockmatrix.network/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/node.blockmatrix.network/privkey.pem
   Your cert will expire on [DATE]. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot
   again. To non-interactively renew *all* of your certificates, run
   "certbot renew"

#### Fetch and use the created files:
You could find the created certificate and private key file under the your domain folder:
/etc/letsencrypt/live/[SERVER DOMAIN NAME]/*.pem

You will find two files there:
* fullchain.pem - contains your SSL certificate
* private.pem - contains your private key 

#### Copy those files and use them where you need them.

Note: For HAProxy configuration I had to combine fullchain.pem and private.pem content into a single pem file.
👍  
properties (23)
authoreluzgin
permlinkhow-to-create-and-install-ssl-certificate
categoryssl
json_metadata{"tags":["ssl","certificate","install","howto","guide"],"app":"steemit/0.1","format":"markdown"}
created2018-08-13 12:38:06
last_update2018-08-13 12:38:06
depth0
children0
last_payout2018-08-20 12:38:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,710
author_reputation48,344,025,750
root_title"How to create and install SSL certificate"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id68,054,204
net_rshares1,952,274,268
author_curate_reward""
vote details (1)