---
title: "Django を Gunicorn とともに使う"
version: 5.0
locale: ja
source: https://docs.djangoproject.com/ja/5.0/howto/deployment/wsgi/gunicorn/
canonical: https://djangodocs.dev/ja/5.0/howto/deployment/wsgi/gunicorn/
---
# Django を Gunicorn とともに使う

[Gunicorn](https://gunicorn.org/) ('Green Unicorn') は UNIX 向けの pure-Python で実装されたWSGIサーバーです。依存はなく、 `pip` を使ってインストールできます。

## Gunicornのインストール

`python -m pip install gunicorn` を実行して gunicorn をインストールします。詳細は [gunicorn documentation](https://docs.gunicorn.org/en/latest/install.html) を参照してください。

## GunicornでDjangoを一般的なWSGIアプリケーションとして動作させる

Gunicorn がインストールされると、Gunicorn サーバプロセスを起動する `gunicorn` コマンドが利用できるようになります。gunicorn の最も単純な起動方法は、 `application` という WSGI アプリケーションオブジェクトを含むモジュールの場所を渡すことです 。典型的な Django プロジェクトでは次のようになります:

```shell
gunicorn myproject.wsgi
```

このコマンドは `127.0.0.1:8000` を待ち受ける1つのスレッドを実行する1つのプロセスを開始します。プロジェクトは Python のパス上に置く必要があります。最も簡単な方法は `manage.py` ファイルと同じディレクトリからこのコマンドを実行することです。

その他のヒントについては、Gunicorn の [deployment documentation](https://docs.gunicorn.org/en/latest/deploy.html) を参照してください。
