> ## Documentation Index
> Fetch the complete documentation index at: https://rasa.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Running a Rasa SDK Action Server

> Python action server, when built with Python, can be run by using rasa command or directly as a python module.

Python action server, when built with Python, can be run by using rasa command or directly as a python module.
The action server supports two protocols to invoke custom actions: HTTP and gRPC.
By default, the action server runs on HTTP protocol.
To run the action server on gRPC protocol, you need to specify the `--grpc` flag.

## Running the action server

## Running action server over HTTP(S) protocol

The action server supports both secure (HTTPS) and insecure HTTP connections.

### HTTP protocol

To run action server over HTTP protocol use this command:

<Tabs>
  <Tab title="Using Rasa command">
    ```bash theme={null}
    rasa run actions
    ```
  </Tab>

  <Tab title="Directly as a python module">
    ```bash theme={null}
    python -m rasa_sdk
    ```
  </Tab>
</Tabs>

When running the action server over HTTP protocol,
make sure that Rasa is also configured to [use HTTP protocol](/docs/reference/integrations/action-server/actions#http-protocol).

### HTTPS protocol

To run action server over HTTPS protocol use this command:

<Tabs>
  <Tab title="Using Rasa command">
    ```bash theme={null}
    rasa run actions --ssl-certificate /path/to/ssl_server_certificate --ssl-keyfile /path/to/ssl_server_key
    ```
  </Tab>

  <Tab title="Directly as a python module">
    ```bash theme={null}
    python -m rasa_sdk --ssl-certificate /path/to/ssl_server_certificate --ssl-keyfile /path/to/ssl_server_key
    ```
  </Tab>
</Tabs>

When running the action server over HTTPS protocol,
make sure that the Rasa server is also configured to [use HTTPS protocol](/docs/reference/integrations/action-server/actions#https-protocol).

### Listen on specific address

You can make your action server listen on a specific address using the `SANIC_HOST` environment
variable:

<Tabs>
  <Tab title="Using Rasa command">
    ```bash theme={null}
    SANIC_HOST=192.168.69.150 rasa run actions
    ```
  </Tab>

  <Tab title="Directly as a python module">
    ```bash theme={null}
    SANIC_HOST=192.168.69.150 python -m rasa_sdk
    ```
  </Tab>
</Tabs>

## Running the action server on gRPC protocol

The action server supports both secure and insecure gRPC connections.
By default, the action server runs on insecure gRPC connection.

### Insecure gRPC connection

To run the action server to accept insecure gRPC connections, use this command:

<Tabs>
  <Tab title="Using Rasa command">
    ```bash theme={null}
    rasa run actions --grpc
    ```
  </Tab>

  <Tab title="Directly as a python module">
    ```bash theme={null}
    python -m rasa_sdk --grpc
    ```
  </Tab>
</Tabs>

When running the action server to accept insecure gRPC connections,
make sure that the Rasa server is also configured to [use insecure gRPC connections](/docs/reference/integrations/action-server/actions#insecure-grpc-connection).

### Secure gRPC connection

To run the action server to accept secure gRPC connections,
you need to specify the `--grpc`, together with the `--ssl-certificate` and `--ssl-keyfile` flags:

<Tabs>
  <Tab title="Using Rasa command">
    ```bash theme={null}
    rasa run actions --grpc --ssl-certificate /path/to/ssl_server_certificate --ssl-keyfile /path/to/ssl_server_key
    ```
  </Tab>

  <Tab title="Directly as a python module">
    ```bash theme={null}
    python -m rasa_sdk --grpc --ssl-certificate /path/to/ssl_server_certificate --ssl-keyfile /path/to/ssl_server_key
    ```
  </Tab>
</Tabs>

When running the action server to accept secure gRPC connections,
make sure that the Rasa server is also configured to [use secure gRPC connections](/docs/reference/integrations/action-server/actions#secure-tls-grpc-connection).

## Specifying the actions module or package

By default the action server will look for your actions
in a file called `actions.py` or in a package directory called `actions`.

You can specify a different actions module or package with the `--actions` flag.

<Tabs>
  <Tab title="Using Rasa command">
    ```bash theme={null}
    rasa run actions --actions my_actions
    ```
  </Tab>

  <Tab title="Directly as a python module">
    ```bash theme={null}
    python -m rasa_sdk --actions my_actions
    ```
  </Tab>
</Tabs>

Using the command above, the action server will expect to find your actions
in a file called `my_actions.py` or in a package directory called `my_actions`.

## Other options

To see the full list of options for running the action server, run:

<Tabs>
  <Tab title="Using Rasa command">
    ```bash theme={null}
    rasa run actions --help
    ```
  </Tab>

  <Tab title="Directly as a python module">
    ```bash theme={null}
    python -m rasa_sdk --help
    ```
  </Tab>
</Tabs>


## Related topics

- [Introduction to Rasa Action Server](/docs/reference/integrations/action-server/introduction.md)
- [Rasa Action Server gRPC API](/docs/reference/integrations/action-server/action-server-grpc-api.md)
- [Actions](/docs/reference/integrations/action-server/actions.md)
- [Dispatcher](/docs/reference/integrations/action-server/sdk-dispatcher.md)
