---
title: "Updates current TLS configuration"
method: POST
path: "/tls/configure"
tags: ["tls"]
---

# Updates current TLS configuration

`POST /tls/configure`

## Request body

- TlsConfig — TLS configuration settings and status
  - `enabled` boolean — enabled is the encryption (DoT/DoH/HTTPS) status
  - `server_name` string — server_name is the hostname of your HTTPS/TLS server
  - `force_https` boolean — if true, forces HTTP->HTTPS redirect
  - `port_https` integer — HTTPS port. If 0, HTTPS will be disabled.
  - `port_dns_over_tls` integer — DNS-over-TLS port. If 0, DoT will be disabled.
  - `port_dns_over_quic` integer — DNS-over-QUIC port. If 0, DoQ will be disabled.
  - `certificate_chain` string — Base64 string with PEM-encoded certificates chain
  - `private_key` string — Base64 string with PEM-encoded private key
  - `private_key_saved` boolean — Set to true if the user has previously saved a private key as a string. This is used so that the server and the client don't have to send the private key between each other every time, which might lead to security issues.
  - `certificate_path` string — Path to certificate file
  - `private_key_path` string — Path to private key file
  - `valid_cert` boolean — Set to true if the specified certificates chain is a valid chain of X509 certificates.
  - `valid_chain` boolean — Set to true if the specified certificates chain is verified and issued by a known CA.
  - `subject` string — The subject of the first certificate in the chain.
  - `issuer` string — The issuer of the first certificate in the chain.
  - `not_before` string — The NotBefore field of the first certificate in the chain.
  - `not_after` string — The NotAfter field of the first certificate in the chain.
  - `dns_names` string[] — The value of SubjectAltNames field of the first certificate in the chain.
  - `valid_key` boolean — Set to true if the key is a valid private key.
  - `key_type` 'RSA' | 'ECDSA' — Key type.
  - `warning_validation` string — A validation warning message with the issue description.
  - `valid_pair` boolean — Set to true if both certificate and private key are correct.

## Response `200`

TLS configuration and its status

- TlsConfig — TLS configuration settings and status
  - `enabled` boolean — enabled is the encryption (DoT/DoH/HTTPS) status
  - `server_name` string — server_name is the hostname of your HTTPS/TLS server
  - `force_https` boolean — if true, forces HTTP->HTTPS redirect
  - `port_https` integer — HTTPS port. If 0, HTTPS will be disabled.
  - `port_dns_over_tls` integer — DNS-over-TLS port. If 0, DoT will be disabled.
  - `port_dns_over_quic` integer — DNS-over-QUIC port. If 0, DoQ will be disabled.
  - `certificate_chain` string — Base64 string with PEM-encoded certificates chain
  - `private_key` string — Base64 string with PEM-encoded private key
  - `private_key_saved` boolean — Set to true if the user has previously saved a private key as a string. This is used so that the server and the client don't have to send the private key between each other every time, which might lead to security issues.
  - `certificate_path` string — Path to certificate file
  - `private_key_path` string — Path to private key file
  - `valid_cert` boolean — Set to true if the specified certificates chain is a valid chain of X509 certificates.
  - `valid_chain` boolean — Set to true if the specified certificates chain is verified and issued by a known CA.
  - `subject` string — The subject of the first certificate in the chain.
  - `issuer` string — The issuer of the first certificate in the chain.
  - `not_before` string — The NotBefore field of the first certificate in the chain.
  - `not_after` string — The NotAfter field of the first certificate in the chain.
  - `dns_names` string[] — The value of SubjectAltNames field of the first certificate in the chain.
  - `valid_key` boolean — Set to true if the key is a valid private key.
  - `key_type` 'RSA' | 'ECDSA' — Key type.
  - `warning_validation` string — A validation warning message with the issue description.
  - `valid_pair` boolean — Set to true if both certificate and private key are correct.

## Other responses

- `400` — Invalid configuration or unavailable port
- `500` — Error occurred while applying configuration

---

[API](https://skmtc.net/guardllamanet/apis/adguard-home.md) · [All operations](https://skmtc.net/guardllamanet/apis/adguard-home/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/guardllamanet/adguard-home/revisions/14ff21aeb363/schema)
