Specifies whether to use the server’s SSL cipher preferences, rather than the client’s.
At a glance
| Property | Value |
|---|---|
| Parameter | ssl_prefer_server_ciphers |
| Category | Connections and Authentication |
| Default | on |
| Value type | boolean (on/off) |
| Change scope | Reload (postgresql.conf, SIGHUP) |
| Available in | PostgreSQL 12, 13, 14, 15, 16, 17, 18, 19 (added in 12) |
What it does
Specifies whether to use the server’s SSL cipher preferences, rather than the client’s. This parameter can only be set in the postgresql.conf file or on the server command line. The default is on.
PostgreSQL versions before 9.4 do not have this setting and always use the client’s preferences. This setting is mainly for backward compatibility with those versions. Using the server’s preferences is usually better because it is more likely that the server is appropriately configured.
(Description quoted from the official PostgreSQL documentation.)
How to apply a change
Set it in postgresql.conf (or with ALTER SYSTEM) and reload with SELECT pg_reload_conf(); or pg_ctl reload — no restart needed.
Inspect the current value and source with SHOW ssl_prefer_server_ciphers; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'ssl_prefer_server_ciphers';.
Tuning guidance
This is a connectivity or security setting, not a performance knob. Choose the value from your security and network requirements (TLS files, ciphers, keepalives, authentication behaviour) rather than for throughput, and verify it against your organization’s policy. Test changes in staging, because a wrong value here can lock clients out.