OS Manuals

/usr/bin/nghttpd

experimental HTTP/2 client, server and library

From nghttp2 1.71.0-r0 (os), captured 2026-11-05 by running nghttpd --help (exit 0). permalink

Usage: nghttpd [OPTION]... <PORT> [<PRIVATE_KEY> <CERT>]
HTTP/2 server

  <PORT>      Specify listening port number.
  <PRIVATE_KEY>
              Set  path  to  server's private  key.   Required  unless
              --no-tls is specified.
  <CERT>      Set  path  to  server's  certificate.   Required  unless
              --no-tls is specified.
Options:
  -a, --address=<ADDR>
              The address to bind to.  If not specified the default IP
              address determined by getaddrinfo is used.
  -D, --daemon
              Run in a background.  If -D is used, the current working
              directory is  changed to '/'.  Therefore  if this option
              is used, -d option must be specified.
  -V, --verify-client
              The server  sends a client certificate  request.  If the
              client did  not return  a certificate, the  handshake is
              terminated.   Currently,  this  option just  requests  a
              client certificate and does not verify it.
  -d, --htdocs=<PATH>
              Specify document root.  If this option is not specified,
              the document root is the current working directory.
  -v, --verbose
              Print debug information  such as reception/ transmission
              of frames and name/value pairs.
  --no-tls    Disable SSL/TLS.
  -c, --header-table-size=<SIZE>
              Specify decoder header table size.
  --encoder-header-table-size=<SIZE>
              Specify encoder header table size.  The decoder (client)
              specifies  the maximum  dynamic table  size it  accepts.
              Then the negotiated dynamic table size is the minimum of
              this option value and the value which client specified.
  --color     Force colored log output.
  -p, --push=<PATH>=<PUSH_PATH,...>
              Push  resources <PUSH_PATH>s  when <PATH>  is requested.
              This option  can be used repeatedly  to specify multiple
              push  configurations.    <PATH>  and   <PUSH_PATH>s  are
              relative  to   document  root.   See   --htdocs  option.
              Example: -p/=/foo.png -p/doc=/bar.css
  -b, --padding=<N>
              Add at  most <N>  bytes to a  frame payload  as padding.
              Specify 0 to disable padding.
  -m, --max-concurrent-streams=<N>
              Set the maximum number of  the concurrent streams in one
              HTTP/2 session.
              Default: 100
  -n, --workers=<N>
              Set the number of worker threads.
              Default: 1
  -e, --error-gzip
              Make error response gzipped.
  -w, --window-bits=<N>
              Sets the stream level initial window size to 2**<N>-1.
  -W, --connection-window-bits=<N>
              Sets  the  connection  level   initial  window  size  to
              2**<N>-1.
  --dh-param-file=<PATH>
              Path to file that contains  DH parameters in PEM format.
              Without  this   option,  DHE   cipher  suites   are  not
              available.
  --early-response
              Start sending response when request HEADERS is received,
              rather than complete request is received.
  --trailer=<HEADER>
              Add a trailer  header to a response.   <HEADER> must not
              include pseudo header field  (header field name starting
              with ':').  The  trailer is sent only if  a response has
              body part.  Example: --trailer 'foo: bar'.
  --hexdump   Display the  incoming traffic in  hexadecimal (Canonical
              hex+ASCII display).  If SSL/TLS  is used, decrypted data
              are used.
  --echo-upload
              Send back uploaded content if method is POST or PUT.
  --mime-types-file=<PATH>
              Path  to file  that contains  MIME media  types and  the
              extensions that represent them.
              Default: /etc/mime.types
  --no-content-length
              Don't send content-length header field.
  --groups=<GROUPS>
              Specify the supported groups.
              Default: X25519:P-256:P-384:P-521
  --ktls      Enable ktls.
  --version   Display version information and exit.
  -h, --help  Display this help and exit.

--

  The <SIZE> argument is an integer and an optional unit (e.g., 10K is
  10 * 1024).  Units are K, M and G (powers of 1024).
Options (27)
OptionDescriptionSource
-a, --address ADDRThe address to bind to.help + man
-D, --daemonRun in a background.help + man
-V, --verify-clientThe server sends a client certificate request.help + man
-d, --htdocs PATHSpecify document root.help + man
-v, --verbosePrint debug information such as reception/ transmission of frames and name/value pairs.help + man
--no-tlsDisable SSL/TLS.help + man
-c, --header-table-size SIZESpecify decoder header table size.help + man
--encoder-header-table-size SIZESpecify encoder header table size.help + man
--colorForce colored log output.help + man
-p, --push PATH>=<PUSH_PATHPush resources <PUSH_PATH>s when <PATH> is requested.help + man
-b, --padding NAdd at most <N> bytes to a frame payload as padding.help + man
-m, --max-concurrent-streams NSet the maximum number of the concurrent streams in one HTTP/2 session.help + man
-n, --workers NSet the number of worker threads.help + man
-e, --error-gzipMake error response gzipped.help + man
-w, --window-bits NSets the stream level initial window size to 2**<N>-1.help + man
-W, --connection-window-bits NSets the connection level initial window size to 2**<N>-1.help + man
--dh-param-file PATHPath to file that contains DH parameters in PEM format.help + man
--early-responseStart sending response when request HEADERS is received, rather than complete request is received.help + man
--trailer HEADERAdd a trailer header to a response.help + man
--hexdumpDisplay the incoming traffic in hexadecimal (Canonical hex+ASCII display).help + man
--echo-uploadSend back uploaded content if method is POST or PUT.help + man
--mime-types-file PATHPath to file that contains MIME media types and the extensions that represent them.help + man
--no-content-lengthDon't send content-length header field.help + man
--groups GROUPSSpecify the supported groups.help + man
--ktlsEnable ktls.help + man
--versionDisplay version information and exit.help + man
-h, --helpDisplay this help and exit.help + man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.