openssl dhparam -out /etc/ssl/dhparam.pem 2048

Category: Web Servers & Proxies

openssl dhparam -out /etc/ssl/dhparam.pem 2048

Generate Diffie-Hellman parameters for TLS hardening

Creates the DH parameters file some older TLS configs reference in their cipher settings, improving forward secrecy for key exchange. The 2048-bit generation can take a few minutes on modest hardware. Modern TLS 1.3 ignores this file, so it matters mainly for legacy clients.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.