waitress-serve
Pure-Python WSGI production server
TLDR
SYNOPSIS
waitress-serve [--host addr] [--port port] [options] module:app
DESCRIPTION
waitress-serve is a production-quality WSGI server for Python web applications, implemented entirely in pure Python with no C extension dependencies. It serves frameworks like Flask, Django, and Pyramid and runs on any platform including Windows, Linux, and macOS.The server uses a multi-threaded architecture with a configurable number of worker threads to handle concurrent requests. It accepts connections on a TCP port or Unix socket and supports URL prefix configuration for applications mounted at sub-paths behind a reverse proxy.Waitress is designed to be simple and reliable for production deployments, requiring minimal configuration while providing solid performance. It is commonly used behind a reverse proxy like Nginx for static file serving and SSL termination.
PARAMETERS
--host ADDR
Hostname or IP address to listen on. Default: `0.0.0.0`.--port PORT
TCP port to listen on. Default: `8080`.--listen HOST:PORT
Bind to a specific host:port pair. May be repeated for multiple listeners. Supports `*` as a wildcard host.--threads N
Number of worker threads to handle requests. Default: `4`.--unix-socket PATH
Path to a Unix domain socket (not available on Windows).--unix-socket-perms OCTAL
Octal permissions for the Unix socket. Default: `600`.--url-scheme SCHEME
Value for `wsgi.url_scheme`. Default: `http`.--url-prefix PREFIX
Value for `SCRIPT_NAME` (for apps mounted at a sub-path). Default: empty.--ident STRING
Server identity sent in the `Server` response header. Default: `waitress`.--call
Treat the positional argument as a callable factory that returns the WSGI app, rather than using it directly as the app.--connection-limit N
Maximum number of simultaneous connections. Default: `100`.--channel-timeout SECONDS
Timeout for inactive connections. Default: `120`.--trusted-proxy IP
IP address of a trusted reverse proxy that may supply forwarding headers.
CAVEATS
WSGI only. No ASGI support. Configure behind proxy.
HISTORY
Waitress was created by the Pylons Project as a production-quality pure-Python WSGI server.
