Latest version: 19.4


Here's a quick rundown on how to get started with Gunicorn. For more detail read the documentation.

  $ sudo pip install virtualenv
  $ mkdir ~/environments/
  $ virtualenv ~/environments/tutorial/
  $ cd ~/environments/tutorial/
  $ ls
  bin  include  lib
  $ source bin/activate
  (tutorial) $ pip install gunicorn
  (tutorial) $ mkdir myapp
  (tutorial) $ cd myapp/
  (tutorial) $ vi
  (tutorial) $ cat

  def app(environ, start_response):
      data = b"Hello, World!\n"
      start_response("200 OK", [
          ("Content-Type", "text/plain"),
          ("Content-Length", str(len(data)))
      return iter([data])

  (tutorial) $ ../bin/gunicorn -w 4 myapp:app
  [2014-09-10 10:22:28 +0000] [30869] [INFO] Listening at: (30869)
  [2014-09-10 10:22:28 +0000] [30869] [INFO] Using worker: sync
  [2014-09-10 10:22:28 +0000] [30874] [INFO] Booting worker with pid: 30874
  [2014-09-10 10:22:28 +0000] [30875] [INFO] Booting worker with pid: 30875
  [2014-09-10 10:22:28 +0000] [30876] [INFO] Booting worker with pid: 30876
  [2014-09-10 10:22:28 +0000] [30877] [INFO] Booting worker with pid: 30877


Gunicorn is wsgi http server. It is best to use Gunicorn behind HTTP proxy server. We strongly advise you to use nginx.

Here's an example to help you get started with using nginx.

  server {
    listen 80;
    access_log  /var/log/nginx/example.log;

    location / {
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

Nginx is set up as reverse proxy server to Gunicorn server which is running at localhost port 8000.

Read the full documentation at

Mailing list

The user mailing list is general discussion and support list for Gunicorn users and developers.

The archive for this list can also be browsed online.


The Gunicorn channel is on the Freenode IRC network. You can chat with other on #gunicorn channel.

Issue Tracking

Bug reports, enhancement requests and tasks generally go in the Github issue tracker.

Security Issues

The security mailing list is a place to report security issues. Only developers are subscribed to it. To post a message to the list use the address to


You can read more comprehensive documentation at

The contents are: