---
name: "aiohttp-wsgi-serve"
section: "1"
platform: "linux"
package: "aiohttp-wsgi-serve"
version: "0.10.0-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/aiohttp-wsgi-serve"
---

# aiohttp-wsgi-serve(1)

run a WSGI application

## NAME

**aiohttp-wsgi-serve** - run a WSGI application

## SYNOPSIS

```
aiohttp-wsgi-serve [-h] [--host HOST] [--port PORT]
                   [--unix-socket UNIX_SOCKET]
                   [--unix-socket-perms UNIX_SOCKET_PERMS]
                   [--backlog BACKLOG] [--static STATIC]
                   [--static-cors STATIC_CORS]
                   [--script-name SCRIPT_NAME]
                   [--url-scheme URL_SCHEME] [--threads THREADS]
                   [--inbuf-overflow INBUF_OVERFLOW]
                   [--max-request-body-size MAX_REQUEST_BODY_SIZE]
                   [--shutdown-timeout SHUTDOWN_TIMEOUT] [--verbose]
                   [--quiet] [--version]
                   module:application
```

## DESCRIPTION

Run a WSGI application on top of asyncio event loop.

## OPTIONS

- **-h, --help**

  show help message and exit

- **--host *HOST***

  Host interfaces to bind. Defaults to '0.0.0.0' and '::'. Can be specified multiple times.

- **--port *PORT*, -p *PORT***

  Port to bind. Defaults to 8080.

- **--unix-socket *UNIX\_SOCKET***

  Path to a unix socket to bind, cannot be used with host.

- **--unix-socket-perms *UNIX\_SOCKET\_PERMS***

  Filesystem permissions to apply to the unix socket. Defaults to 384.

- **--backlog *BACKLOG***

  Socket connection backlog. Defaults to 1024.

- **--static *STATIC***

  Static route mappings in the form 'path=directory'. \`path\` must start with a slash, but not end with a slash. Can be specified multiple times.

- **--static-cors *STATIC\_CORS***

  Set to '\*' to enable CORS on static files for all origins, or a string to enable CORS for a specific origin. Defaults to None.

- **--script-name *SCRIPT\_NAME***

  URL prefix for the WSGI application, should start with a slash, but not end with a slash. Defaults to ''.

- **--url-scheme *URL\_SCHEME***

  A hint about the URL scheme used to access the application. Corresponds to environ\['wsgi.url\_scheme'\]. Default is auto-detected to 'http' or 'https'.

- **--threads *THREADS***

  Number of threads used to process application logic. Defaults to 4.

- **--inbuf-overflow *INBUF\_OVERFLOW***

  A tempfile will be created if the request body is larger than this value, which is measured in bytes. Defaults to 524288.

- **--max-request-body-size *MAX\_REQUEST\_BODY\_SIZE***

  Maximum number of bytes in request body. Defaults to 1073741824. Larger requests will receive a HTTP 413 (Request Entity Too Large) response.

- **--shutdown-timeout *SHUTDOWN\_TIMEOUT***

  Timeout when closing client connections on server shutdown. Defaults to 60.0.

- **--verbose, -v**

  Increase verbosity. Can be specified multiple times.

- **--quiet, -q**

  Decrease verbosity. Can be specified multiple times.

- **--version**

  Display version information.

## EXAMPLES

Run WSGI application on local port 8000 with 8 threads:

```
     $ aiohttp-wsgi-serve --host 127.0.0.1 --port 8000 --threads 8 wsgiapp:main
```

## AUTHOR

aiohttp-wsgi was written by David Hall \<dave@etianen.com\>.

This manual page was written by William Grzybowski \<william@grzy.org\> for the Debian project (but may be used by others).
