GUNICORN(1)

NAME
gunicorn - HTTP/WSGI/ASGI server

DESCRIPTION
usage: gunicorn [OPTIONS] [APP_MODULE]

  options:

-h, --help
    show this help message and exit

-v, --version
    show program's version number and exit

-c, --config CONFIG
    :ref:`The Gunicorn config file<configuration_file>`.

-b, --bind ADDRESS
    The socket to bind.

--backlog INT
    The maximum number of pending connections.

-w, --workers INT
    The number of worker processes for handling requests.

-k, --worker-class STRING
    The type of workers to use.

--threads INT
    The number of worker threads for handling requests.

--worker-connections INT
    The maximum number of simultaneous clients.

--max-requests INT
    The maximum number of requests a worker will process before restarting.

--max-requests-jitter INT
    The maximum jitter to add to the *max_requests* setting.

-t, --timeout INT
    Workers silent for more than this many seconds are killed and restarted.

--graceful-timeout INT
    Timeout for graceful workers restart in seconds.

--keep-alive INT
    The number of seconds to wait for requests on a KeepAlive connection.

--limit-request-line INT
    The maximum size of HTTP request line in bytes.

--limit-request-fields INT
    Limit the number of HTTP headers fields in a request.

--limit-request-field_size INT
    Limit the allowed size of an HTTP request header field.

--reload
    Restart workers when code changes.

--reload-engine STRING
    The implementation that should be used to power :ref:`reload`.

--reload-extra-file FILES
    Extends :ref:`reload` option to also watch and reload on additional files

--spew
    Install a trace function that spews every line executed by the server.

--check-config
    Check the configuration and exit. The exit status is 0 if the

--print-config
    Print the configuration settings as fully resolved. Implies :ref:`check-config`.

--preload
    Load application code before the worker processes are forked.

--no-sendfile
    Disables the use of ``sendfile()``.

--reuse-port
    Set the ``SO_REUSEPORT`` flag on the listening socket.

--chdir CHDIR
    Change directory to specified directory before loading apps.

-D, --daemon
    Daemonize the Gunicorn process.

-e, --env ENV
    Set environment variables in the execution environment.

-p, --pid FILE
    A filename to use for the PID file.

--worker-tmp-dir DIR
    A directory to use for the worker heartbeat temporary file.

-u, --user USER
    Switch worker processes to run as this user.

-g, --group GROUP
    Switch worker process to run as this group.

-m, --umask INT
    A bit mask for the file mode on files written by Gunicorn.

--initgroups
    If true, set the worker process's group access list with all of the

--forwarded-allow-ips STRING
    Front-end's IP addresses or networks from which allowed to handle

--access-logfile FILE
    The Access log file to write to.

--disable-redirect-access-to-syslog
    Disable redirect access logs to syslog.

--access-logformat STRING
    The access log format.

--error-logfile, --log-file FILE
    The Error log file to write to.

--log-level LEVEL
    The granularity of Error log outputs.

--capture-output
    Redirect stdout/stderr to specified file in :ref:`errorlog`.

--logger-class STRING
    The logger you want to use to log events in Gunicorn.

--log-config FILE
    The log config file to use.

--log-config-json FILE
    The log config to read config from a JSON file

--log-syslog-to SYSLOG_ADDR
    Address to send syslog messages.

--log-syslog
    Send *Gunicorn* logs to syslog.

--log-syslog-prefix SYSLOG_PREFIX
    Makes Gunicorn use the parameter as program-name in the syslog entries.

--log-syslog-facility SYSLOG_FACILITY
    Syslog facility name

-R, --enable-stdio-inheritance
    Enable stdio inheritance.

--statsd-host STATSD_ADDR
    The address of the StatsD server to log to.

--dogstatsd-tags DOGSTATSD_TAGS
    A comma-delimited list of datadog statsd (dogstatsd) tags to append to

--statsd-prefix STATSD_PREFIX
    Prefix to use when emitting statsd metrics (a trailing ``.`` is added,

--enable-backlog-metric
    Enable socket backlog metric (only supported on Linux).

-n, --name STRING
    A base to use with setproctitle for process naming.

--pythonpath STRING
    A comma-separated list of directories to add to the Python path.

--paste, --paster STRING
    Load a PasteDeploy config file. The argument may contain a ``#``

--proxy-protocol [MODE]
    Enable PROXY protocol support.

--proxy-allow-from PROXY_ALLOW_IPS
    Front-end's IP addresses or networks from which allowed accept

--protocol STRING
    The protocol for incoming connections.

--uwsgi-allow-from UWSGI_ALLOW_IPS
    IPs allowed to send uWSGI protocol requests (comma separated).

--keyfile FILE
    SSL key file

--certfile FILE
    SSL certificate file

--ssl-version SSL_VERSION
    SSL version to use (see stdlib ssl module's).

--cert-reqs CERT_REQS
    Whether client certificate is required (see stdlib ssl module's)

--ca-certs FILE
    CA certificates file

--suppress-ragged-eofs
    Suppress ragged EOFs (see stdlib ssl module's)

--do-handshake-on-connect
    Whether to perform SSL handshake on socket connect (see stdlib ssl module's)

--ciphers CIPHERS
    SSL Cipher suite to use, in the format of an OpenSSL cipher list.

--http-protocols STRING
    HTTP protocol versions to support (comma-separated, order = preference).

--http2-max-concurrent-streams INT
    Maximum number of concurrent HTTP/2 streams per connection.

--http2-initial-window-size INT
    Initial HTTP/2 flow control window size in bytes.

--http2-max-frame-size INT
    Maximum HTTP/2 frame payload size in bytes.

--http2-max-header-list-size INT
    Maximum size of HTTP/2 header list in bytes (HPACK protection).

--paste-global CONF
    Set a PasteDeploy global config variable in ``key=value`` form.

--permit-obsolete-folding
    Permit requests employing obsolete HTTP line folding mechanism

--strip-header-spaces
    Strip spaces present between the header name and the the ``:``.

--permit-unconventional-http-method
    Permit HTTP methods not matching conventions, such as IANA registration guidelines

--permit-unconventional-http-version
    Permit HTTP version not matching conventions of 2023

--casefold-http-method
    Transform received HTTP methods to uppercase

--forwarder-headers FORWARDER_HEADERS
    A list containing upper-case header field names that the front-end proxy

--header-map HEADER_MAP
    Configure how header field names are mapped into environ

--asgi-loop STRING
    Event loop implementation for ASGI workers.

--asgi-lifespan STRING
    Control ASGI lifespan protocol handling.

--asgi-disconnect-grace-period INT
    Grace period (seconds) for ASGI apps to handle client disconnects.

--http-parser STRING
    HTTP parser implementation for ASGI workers.

--root-path STRING
    The root path for ASGI applications.

--dirty-app STRING
    Dirty applications to load in the dirty worker pool.

--dirty-workers INT
    The number of dirty worker processes.

--dirty-timeout INT
    Timeout for dirty task execution in seconds.

--dirty-threads INT
    The number of threads per dirty worker.

--dirty-graceful-timeout INT
    Timeout for graceful dirty worker shutdown in seconds.

--control-socket PATH
    Unix socket path for control interface.

--control-socket-mode INT
    Permission mode for control socket.

--no-control-socket
    Disable control socket.

SEE ALSO
The full documentation for gunicorn is maintained as a Texinfo manual. If the info and gunicorn programs are properly installed at your site, the command

    info gunicorn

should give you access to the complete manual.