GUNICORN(1)

πŸ’– GUNICORN(1) πŸ’–

okay bestie so this is the manual page for gunicorn, sitting pretty in the User Commands section of the manual, and honestly? she ate. let's get into it. 🫢


🌸 NAME 🌸

gunicorn β€” the HTTP/WSGI/ASGI server. that's it, that's the girl. she takes your Python app and makes it a real live server. main character energy fr fr. πŸ‘‘


✨ DESCRIPTION ✨

here's how you summon her:

usage: gunicorn [OPTIONS] [APP_MODULE]
heads up bestie: [OPTIONS] and [APP_MODULE] are both optional-looking with the brackets, so don't come for me, that's just how she's written. πŸ’…

πŸŽ€ options:

this is the big one. ninety-five options, no skips, we're doing all of them. buckle up. πŸ’€

  • -h, --help β€” show this help message and exit. the "hi bestie what do you need" option.
  • -v, --version β€” show program's version number and exit.
  • -c, --config CONFIG β€” :ref:The Gunicorn config file<configuration_file>. the whole vibe, in a file.
  • -b, --bind ADDRESS β€” the socket to bind.
  • --backlog INT β€” the maximum number of pending connections. (yes she has a queue. she's popular.)
  • -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. glow-up via rest πŸ’–
  • --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. ghosting has consequences 😭
  • --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. (yes, with the underscore. that's her name, don't deadname her. βœ‹)
  • --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. (she said "spew". i love her.)
  • --check-config β€” check the configuration and exit. The exit status is 0 if the
okay so the og page literally cuts off right there at "if the" 😭 i am NOT inventing the rest, that's what it says, we respect the source.
  • --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
again, bestie, the sentence just… stops. "all of the". that's it. she's mysterious like that. 🌫️
  • --forwarded-allow-ips STRING β€” front-end's IP addresses or networks from which allowed to handle
and once more β€” it ends mid-thought at "handle". leaving us on read. πŸ₯²
  • --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
ok you already know the drill. truncated at "append to". bestie is a woman of few words apparently πŸ“
  • --statsd-prefix STATSD_PREFIX β€” prefix to use when emitting statsd metrics (a trailing . is added,
and… scene. cut off after "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 #
yeah, ends at the #. cliffhanger. ✨
  • --proxy-protocol [MODE] β€” enable PROXY protocol support.
  • --proxy-allow-from PROXY_ALLOW_IPS β€” front-end's IP addresses or networks from which allowed accept
cut off at "accept". we forgive her. 🫢
  • --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 :.
"the the". she said it twice. she's excited. i'm not editing her art. πŸŽ€
  • --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
ends at "proxy". iconic mystery. πŸ¦‹
  • --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.

that's all 95. i counted so you don't have to. πŸ’…


πŸ“š SEE ALSO πŸ“š

the full documentation for gunicorn is maintained as a Texinfo manual. so if the info and gunicorn programs are properly installed at your site, this command:

info gunicorn

should give you access to the complete manual. ✨

pro tip from me to you: if that doesn't work, it's an install problem, not a you problem. πŸ’–

and that's the whole page bestie!! this was gunicorn (version 25.3.0), dated June 2026, living in GUNICORN(1) of the manual. go forth and serve. no cap. πŸ’…βœ¨πŸ‘‘

πŸ“¦ where this page comes from