> For the complete documentation index, see [llms.txt](https://spacecore.gitbook.io/wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://spacecore.gitbook.io/wiki/en/web-development/generate-lets-encrypt-ssl.md).

# Let's Encrypt SSL Generation

{% hint style="danger" %}

### This content is outdated

**The knowledge base has moved →** [**https://wiki.spacecore.pro/**](https://wiki.spacecore.pro/)

This wiki is no longer updated. All current guides and articles are at the new address.
{% endhint %}

{% content-ref url="<https://wiki.spacecore.pro/>" %}
<https://wiki.spacecore.pro/>
{% endcontent-ref %}

***

Instructions for creating a free certificate from Let's Encrypt.

To begin with, we update the lists of packages and repositories of the system:

```
sudo apt-get -y update && sudo apt-get -y dist-upgrade
```

Installing **CertBot**:

```
sudo apt-get -y install certbot
```

Next, we install additional packages:

For **Nginx**:

```
sudo apt-get -y install python3-certbot-nginx
```

For **Apache2**:

```
sudo apt-get -y install python3-certbot-apache
```

## Certificate generation:

{% hint style="warning" %}
Please note that the **Web server** must be enabled!
{% endhint %}

For **Nginx**:

```
certbot certonly --nginx -d yoursite.com
```

For **Apache2**:

```
certbot certonly --apache -d yoursite.com
```

If you cannot enable the **Web server**, use the following command:

```
certbot certonly --standalone -d yoursite.com
```

We use the command to automatically issue an **SSL certificate**:

```
certbot renew
```

{% hint style="success" %}
Next, an automatic verification of the validity of your certificate will take place daily.
{% endhint %}
