LinuxCommandLibrary

waitress-serve

Pure-Python WSGI production server

TLDR

Serve WSGI app

$ waitress-serve --port=[8080] [myapp:app]
copy
With host binding
$ waitress-serve --host=[0.0.0.0] --port=[8080] [myapp:app]
copy
Unix socket
$ waitress-serve --unix-socket=[/tmp/app.sock] [myapp:app]
copy
With threads
$ waitress-serve --threads=[4] [myapp:app]
copy
URL prefix
$ waitress-serve --url-prefix=[/api] [myapp:app]
copy

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

Bind address.
--port PORT
Listen port.
--threads N
Worker threads.
--unix-socket PATH
Unix socket.
--url-prefix PREFIX
URL prefix.

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.

SEE ALSO

gunicorn(1), uwsgi(1), flask(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community