# Installing a Free SSL Certificate on Ubuntu

Letsencrypt.org is an open certificate authority, supported by the major browsers: Google Chrome, Internet Explorer, Mozilla Firefox, and the mobile browsers for Android and iOS. Learn how to install an [SSL certificate](https://www.ionos.com/digitalguide/websites/website-creation/ssl-certificate/ "SSL certificate") from Letsencrypt.org on a Ubuntu server.

## Connecting to the Server via SSH

You can establish an encrypted network connection to your server using Secure Shell (SSH).

### Computers with Windows Operating systems

SSH is not installed by default on computers with Windows operating systems. To establish an encrypted network connection using Secure Shell, you need an additional program, e.g. [PuTTY](https://www.putty.org/ "PuTTY").

[![Image: PuTTY Configuration window](https://www.ionos.com/digitalguide/fileadmin/_processed_/f/3/csm_putty_d1d2170096.webp "PuTTY Configuration window")](https://www.ionos.com/digitalguide/fileadmin/DigitalGuide/Screenshots_2021/putty.png) PuTTY Configuration window ### Computers with Linux Operating Systems

If you use [Linux](https://www.ionos.com/digitalguide/server/know-how/linux-the-cost-effective-alternative-to-windows/ "Linux – the cost-effective alternative to Windows"), follow these steps to establish a SSH connection to your server:

1. Open a terminal (e.g. xterm)
2. Enter the following command in the terminal: ssh root@&lt; SERVER’S IP ADDRESS&gt;
3. Example: ssh root@70.35.196.146
4. Enter your password.

[![Image: PuTTY Connect](https://www.ionos.com/digitalguide/fileadmin/_processed_/f/3/csm_putty_connect_5a5f157808.webp "PuTTY Connect")](https://www.ionos.com/digitalguide/fileadmin/DigitalGuide/Screenshots_2021/putty_connect.png) PuTTY Connect ## Updating Your Server

To update your server, enter the following commands:

```none
apt-get update
apt-get upgrade
```

## Pointing your Domain to Your Server IP

To point your domain to your server IP address, follow these steps:

1. Log in to your [IONOS Control Panel](https://login.ionos.com/ "IONOS Login") and select the relevant package.
2. Click **Manage Domains**.
3. Click the arrow icon next to your domain to display the options menu.
4. In the options menu, go to **Domain Settings** and select **Edit DNS Settings**.
5. Select **Other IP address** and enter each part of your server’s IP in the field. Each part of the IP is separated by a dot(.). Example: 70.35.196.146
6. Click **Save**.

A confirmation page is displayed, informing you that the changes will be updated accordingly. As with all DNS changes, it may take up to **one hour** for your changes to propagate throughout the Internet.

## Installing GIT

To install GIT:

1. You must be logged in to your server.
2. Enter the command apt-get install git.
3. Enter y and press Enter.
4. GIT will be installed.

## Installing Apache

To install [Apache](https://www.ionos.com/digitalguide/server/configuration/how-to-install-an-apache-web-server/ "How to install an Apache web server") on your server:

1. Enter the command apt-get install apache2.
2. Press Enter.
3. Apache will be installed.

## Cloning the Let’s Encrypt Client

To clone the repository of the Let’s Encrypt Client, enter the following commands:

```none
git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt
./letsencrypt-auto --help
```

## Installing the Let’s Encrypt Client for Apache

To install the Let’s Encrypt Client for Apache:

[![Image: Let’s Encrypt Client](https://www.ionos.com/digitalguide/fileadmin/_processed_/0/2/csm_lets_encrypt_ubuntu_2_8c11e8da3a.webp "Let’s Encrypt Client")](https://www.ionos.com/digitalguide/fileadmin/DigitalGuide/Screenshots_2021/lets_encrypt_ubuntu_2.png) Let’s Encrypt Client ## Installing MOD SSL in Apache

To install the the MOD SSL in Apache, enter the following command:

```none
sudo a2enmod ssl
```

## Configuring VHOSTS

To use the SSL encryption for your website, you have to create two vhosts: one vhost for the website part that will be accessed via HTTP connection (public), and another vhost for the part that will be accessed via HTTPS (SSL).

To become root user, enter the following command:

```none
sudo su
```

[![Image: Configuring VHOSTS](https://www.ionos.com/digitalguide/fileadmin/_processed_/0/b/csm_ubuntu_vhost_71646abb1f.webp "Configuring VHOSTS")](https://www.ionos.com/digitalguide/fileadmin/DigitalGuide/Screenshots_2021/ubuntu_vhost.png) Configuring VHOSTS ## Renewing Your Certificate

Your certificate is valid for 3 months. Let’s Encrypt recommends renewing the certificate every 60 days. To renew the certificate, enter the following command:

```none
./letsencrypt-auto certonly –webroot –w /var/www/YOURDOMAIN /public_html/ -d YOURDOMAIN.com
```

Example:

```none
./letsencrypt-auto certonly –webroot –w /var/www/applicationpack1.com/public_html/ -d applicationpack1.com
```


This is a markdown version of: [https://www.ionos.com/digitalguide/websites/website-creation/installing-a-free-ssl-certificate-on-ubuntu/](https://www.ionos.com/digitalguide/websites/website-creation/installing-a-free-ssl-certificate-on-ubuntu/) for AI/LLM consumption.