Free SSL certificate – how to

Two words – Let’s encrypt!
Assuming you already have Ubuntu LAMP set up, you just need to install Certbot to manage your SSL certificates.

Installation of Certbot – SSL manager

chmod a+x ./certbot-auto
./certbot-auto --help

.. you should get some meaningful output.
Now that you have a way to manage your certificates, it’s time to get one!.


Assuming you have virtual hosts set up, such as, and you are using Apache, just run following command:

./certbot-auto --apache -d

You need to be in the directory where you’ve extracted certbot.
You can do multiple domains at once

./certbot-auto --apache -d -d

How it works

Certbot will obtain new certificate from, detect vhost configuration on your Apache and will create copy of that config with SSL enabled.

You can find certificates in directory


If you ran the command first time, you’ll be asked to provide your email address and accept terms and conditions.
You also need to renew the certificate every 90 days – you can do that by issuing following command:

certbot renew

If you want certificate for both non-www and www version of your domain ( for redirect ) you need to specify both at once, e.g.:

./certbot-auto --apache -d -d

If you do 2 commands, it won’t work properly.
This is wrong:

./certbot-auto --apache -d
./certbot-auto --apache -d

Unlike other certificates, such as StartSSL, this one actually works. If you use StartSSL, you won’t get ‘green icon’ in all browsers, see


Compress and unpack directory in Ubuntu using TAR

2 commands using tar in command line.

To compress using tar

.. directory www/ into tar package, use:

tar -zcf www.tar.gz www/

To unpack using tar

.. package www.tar.gz into current directory, use:

tar -zxf www.tar.gz

If you wish to specify a directory where to extract the package, you need to create the folder first and then unpack using the -C parameter

mkdir ~/package/
tar -zxf www.tar.gz -C ~/package/

You can add -v parameter to show verbose output.