# Certificates

Certificates are used to store SSL certificates that can then be used by the node web server or shared with instances and pods. Lets Encrypt certificates are available with web and DNS TXT record verification. For DNS verification an API key with *AWS*, *Cloudflare* or *Oracle Cloud* will be needed to automatically add DNS TXT records. Wildcard domains are supported by entering a domain such as `*.cloud.pritunl.com` typically `cloud.pritunl.com` would also be added to support both the top domain and sub-domains. Wildcard Lets Encrypt certificates require DNS TXT verification.

### Pod Configuration

Certificates are shared with pods by including it in the spec as shown below. The certificate organization must match the pods organization.

```yaml
certificates:
    - +/certificate/cloud-pritunl-com
```

Then this certificate can be retrieved from the pod using the command below.

```sh
[cloud@dev-unit ~]$ sudo pci get +/certificate/cloud-pritunl-com/certificate
-----BEGIN CERTIFICATE-----
MIIDXTCCAkWgAwIBAgIJAJRTChD4Ptj3MA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV
BAYTAlVTMQswCQYDVQQIDAJDQTESMBAGA1UECgwJRXhhbXBsZSBJbmMxFTATBgNV
BAMMDCouZXhhbXBsZS5jb20wHhcNMjUwODAzMDAwMDAwWhcNMjYwODAzMDAwMDAw
-----END CERTIFICATE-----
[cloud@dev-unit ~]$ sudo pci get +/certificate/cloud-pritunl-com/key
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAvyp5uHQF9WZB9gLKm1XEFBoF+SGzJGLmj4AcVavZX+UNboZ3
+9WDUvmcI1d2hEo5XzG0i4uF4HgxE6J1JUzEKoY2mHc0ovwO3GfU9BqduEBrUM6C
oxGBl7U6FZzEq+Tnrgd+ik3tLHZyoVTIiA3yPYd8psNmfFslVJ/c64rhEpD/4K/h
-----END RSA PRIVATE KEY-----
```

Certificates can be added or modified and will be updated on the IMDS system within 1-5 seconds. This allows creating scripts that regularly pull the certificate from the IMDS service to keep a servers SSL certificates updated.


---

# 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.pritunl.com/kb/cloud/components/certificates.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.
