Parameter · Connections and Authentication / SSL
ssl_ciphers
Sets the list of allowed TLSv1.2 (and lower) ciphers.
- Default:
HIGH:MEDIUM:+3DES:!aNULL - Type: string
- Applies: Reload
In plain words
A list, in OpenSSL syntax, of the encryption methods (cipher suites) the server allows for TLS 1.2 and older. During the handshake, client and server pick one that both support. TLS 1.3 suites are set separately in ssl_tls13_ciphers.
For DBAs and operators
The default HIGH:MEDIUM:+3DES:!aNULL means: strong and medium suites, move 3DES to the end, never anonymous (unauthenticated) suites. See what it expands to on your OpenSSL with openssl ciphers -v 'HIGH:MEDIUM:+3DES:!aNULL'; the list is also filtered by the server key type (RSA vs ECDSA).
Since PostgreSQL 18 this setting applies only to TLS 1.2 and lower; before 18, TLS 1.3 suites could not be configured. Compliance hardening for TLS 1.2 commonly uses something like ECDHE+AESGCM:ECDHE+CHACHA20:!aNULL, or simply raise ssl_min_protocol_version to TLSv1.3.
If client and server share no suite the handshake fails: the server logs could not accept SSL connection: no shared cipher. Check what sessions negotiated in pg_stat_ssl.cipher. Reload is enough; only new connections are affected.
How to change it
Change in postgresql.conf or ALTER SYSTEM, then run SELECT pg_reload_conf().
See it in context
Related parameters
ssl_tls13_ciphers ssl_prefer_server_ciphers ssl_groups ssl_min_protocol_version