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

# sqrl run

> Start the API server for your project

The `run` command starts the API server that serves your datasets, dashboards, and other routes.

This runs the API server in standalone mode, which automatically mounts the project at the `/analytics/{project_name}/v{project_version}` route.

For details on how to mount the Squirrels APIs into an existing FastAPI application, see [this how-to guide](/guides/mount-to-fastapi).

## Usage

```bash wrap theme={null}
sqrl run [options]
```

## Options

In addition to the [global options](/references/cli/index#global-options), this command supports the following options:

| Option                      | Description                                                                                                                                                                                                                                           |
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--build`                   | Build the VDL first (without full refresh) before starting the server                                                                                                                                                                                 |
| `--no-cache`                | Do not cache any API results                                                                                                                                                                                                                          |
| `--host HOST`               | Host interface to bind to (default: `127.0.0.1`)                                                                                                                                                                                                      |
| `--port PORT`               | Port to bind to (default: `8000`)                                                                                                                                                                                                                     |
| `--forwarded-allow-ips IPs` | Comma-separated list of IP Addresses, IP Networks, or literals (e.g. UNIX Socket path) to trust with proxy headers. Defaults to the FORWARDED\_ALLOW\_IPS environment variable if available, or '127.0.0.1'. The literal '\*' means trust everything. |

## Examples

Start the server:

```bash theme={null}
sqrl run
```

Build first, then start:

```bash theme={null}
sqrl run --build
```

Run on all interfaces and a custom port:

```bash theme={null}
sqrl run --host 0.0.0.0 --port 8080
```

## Notes

* The `--build` option can be useful for deployment processes. Outside of deployment, avoid using it if there are no changes to the sources, seeds, or build models.
* Use the following [environment variable settings](/references/environment-variables) to control the caching behavior.
  * `SQRL_PARAMETERS__CACHE_SIZE`
  * `SQRL_PARAMETERS__CACHE_TTL_MINUTES`
  * `SQRL_DATASETS__CACHE_SIZE`
  * `SQRL_DATASETS__CACHE_TTL_MINUTES`
  * `SQRL_DASHBOARDS__CACHE_SIZE`
  * `SQRL_DASHBOARDS__CACHE_TTL_MINUTES`
