Configuration
Django Cheroot is configured entirely through the cheroot command’s arguments — there are no extra settings to add to settings.py. This page is the complete reference.
Option reference
Section titled “Option reference”| Option | Short | Long | Type | Default | Description |
|---|---|---|---|---|---|
| Host IP | -ip | --hostip | str | 127.0.0.1 | The address to bind. Use 0.0.0.0 to listen on all interfaces. |
| Port | -p | --port | int | 8000 | The TCP port to listen on. |
| Max worker threads | -w | --maxthreads | int | 40 | Upper bound on worker threads Cheroot will create under load. |
| Min threads | -t | --minthreads | int | 30 | Threads kept warm in the pool at all times. |
| Max queued connections | -c | --connections | int | 20 | Size of the OS listen backlog for pending connections. |
python manage.py cheroot \ --hostip 0.0.0.0 \ --port 8000 \ --minthreads 30 \ --maxthreads 40 \ --connections 20How the options map to Cheroot
Section titled “How the options map to Cheroot”Internally the command builds a cheroot.wsgi.Server and starts it. The mapping is:
| Command option | cheroot.wsgi.Server parameter |
|---|---|
--hostip + --port | bind_addr (the (host, port) tuple) |
--minthreads | numthreads |
--maxthreads | max |
--connections | request_queue_size |
Choosing thread-pool values
Section titled “Choosing thread-pool values”--minthreads/--maxthreadssize the worker pool. Cheroot keepsminthreadswarm and grows towardmaxthreadsas concurrent requests arrive. For mostly-idle apps, keepminthreadslow; for steady traffic, set it close to your typical concurrency so you don’t pay thread-startup cost on every spike.maxthreadsshould account for your peak concurrent in-flight requests.--connectionsis the accept backlog — how many connections may wait for a free worker before the OS starts refusing them. Raise it if you see connection resets under bursty load.
Next steps
Section titled “Next steps”- Basic — a minimal end-to-end setup.
- Production behind a proxy — running Cheroot behind nginx.