# Настройка сертификата

## Создайте URL Route 53

Создайте URL Route 53 для вашего домена, например caesar.internal.romeprotocol.xyz, чтобы он указывал на IP-адрес сервера EC2.

## Откройте порты

Убедитесь, что порты HTTP (80) и HTTPS (443) открыты на вашем удалённом сервере.

Используйте брандмауэр вашего облачного провайдера или группу безопасности, чтобы открыть эти порты.

## Получите сертификат

Приведённая ниже CLI-утилита Certbot позволяет получить сертификат Let’s Encrypt.

**Примечание: при запросе сертификата используйте свой собственный адрес электронной почты и доменное имя.**

<pre class="language-bash"><code class="lang-bash">sudo apt install -y nginx
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
<strong>sudo certbot certonly --nginx -n -m rome@romeprotocol.com --agree-tos --domains caesar.internal.romeprotocol.xyz # Замените на свою электронную почту и домен
</strong>sudo nginx -s stop
</code></pre>

## Проверьте создание сертификата

Теперь убедитесь, что файлы fullchain.pem и privkey.pem находятся в каталоге ниже.

```bash
sudo ls /etc/letsencrypt/live/caesar.internal.romeprotocol.xyz
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rome.builders/ru/legacy/rome-l2-setup/setup-your-l2/prep-remote-server/setup-certificate.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
