> ## Documentation Index
> Fetch the complete documentation index at: https://docs.insecureweb.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SSL Certificate Management in UTMStack

> This guide provides comprehensive steps on installing, generating, and renewing SSL certificates for UTMStack.

### Manual SSL Certificate Installation

Before beginning, ensure you've downloaded your certificate files. After downloading:

1. You should have:
   * A certificate file with the extension `.crt` or `.pem`
   * A private key with the extension `.key` or `.pem`
2. Rename the files:
   * Certificate: `utm.crt`
   * Private Key: `utm.key`
3. Transfer both files to your server:

```bash theme={null}
   mv utm.crt /UTMStack/cert/
   mv utm.key /UTMStack/cert/
```

4. Restart Docker for the changes to take effect:

```bash theme={null}
systemctl restart docker
```

5. Allow approximately 10 minutes for the stack to restart.

<Note>
  Once these steps are completed, your SSL certificate will be installed and configured for UTMStack. For any issues or questions during the installation, please contact our support team.
</Note>

### Generate SSL with Certbot in UTMStack without DNS Change

**Install Certbot**

<Note>
  Install the necessary tools and dependencies:
</Note>

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

**Manage Services pause utmstack\_frontend services:**

```
docker service scale utmstack_frontend=0
docker ps | grep frontend
```

Then, start Nginx:

```
systemctl start nginx
```

**Generate SSL Certificate**
Replace "siem.domain.com" with your domain:

```
sudo certbot --nginx -d siem.domain.com
```

**Update SSL Certificate in UTMStack**

```
cp /etc/letsencrypt/live/*/fullchain.pem /UTMStack/cert/utm.crt
cp /etc/letsencrypt/live/*/privkey.pem /UTMStack/cert/utm.key
docker service scale utmstack_frontend=1
docker ps | grep frontend
systemctl restart docker
```

### Renew the Certificate Generated by Certbot in UTMStack

**Manage Services pause utmstack\_frontend services:**

```
docker service scale utmstack_frontend=0
```

**Renew SSL Certificate**

```
certbot renew
```

**Update SSL Certificate in UTMStack**

Replace "siem.domain.com" with your specific domain:

```
cp /etc/letsencrypt/live/siem.domain.com/fullchain.pem /UTMStack/cert/utm.crt
cp /etc/letsencrypt/live/siem.domain.com/privkey.pem /UTMStack/cert/utm.key
docker service scale utmstack_frontend=1
docker ps | grep frontend
systemctl restart docker
```
