## Running the Action Server

There are two ways to run the action server, depending on whether you are using an environment with `rasa` installed or not:

### If `rasa` is installed

You can run the action server using a `rasa` command:

```bash
rasa run actions
```

### If `rasa` is not installed

You can run the action server directly as a python module:

#### Using the `SANIC_HOST` environment variable

You can make your assistant listen on a specific address:

```bash
SANIC_HOST=192.168.69.150 rasa run actions
```

#### Running as Python module

You can also run it using:

```bash
python -m rasa_sdk --actions actions
```

Using the command above, `rasa_sdk` will expect to find 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.

### Full List of Options for Running the Action Server

```bash
usage: __main__.py [-h] [-p PORT] [--cors [CORS ...]] [--actions ACTIONS]
                    [--ssl-keyfile SSL_KEYFILE]
                    [--ssl-certificate SSL_CERTIFICATE]
                    [--ssl-password SSL_PASSWORD] [--auto-reload]
                    [-v] [-vv] [--quiet] [--log-file LOG_FILE]
                    [--logging-config_file LOGGING_CONFIG_FILE]
```

### Options:

- `-h, --help`: show this help message and exit
- `-p PORT, --port PORT`: port to run the server at
- `--cors [CORS ...]`: enable CORS for the passed origin. Use `*` to whitelist all origins
- `--actions ACTIONS`: name of action package to be loaded
- `--ssl-keyfile SSL_KEYFILE`: Set the SSL certificate to create a TLS secured server.
- `--ssl-certificate SSL_CERTIFICATE`: Set the SSL certificate to create a TLS secured server.
- `--ssl-password SSL_PASSWORD`: If your ssl-keyfile is protected by a password, you can specify it using this parameter.
- `--auto-reload`: Enable auto-reloading of modules containing Action subclasses.
- `-v, --verbose`: Be verbose. Sets logging level to INFO.
- `-vv, --debug`: Print lots of debugging statements. Sets logging level to DEBUG.
- `--quiet`: Be quiet! Sets logging level to WARNING.
- `--log-file LOG_FILE`: Store logs in a specified file.
- `--logging-config_file LOGGING_CONFIG_FILE`: If set, the name of the logging configuration file will be set to the given name.
