---
title: fastly compute deploy
summary: Deploy a package to a Fastly Compute service
url: https://www.fastly.com/documentation/reference/cli/compute/deploy
---

Deploy a package to a Fastly Compute service

## Flags

| Flag | Description | Required | Default |
|------|-------------|----------|----------|
| `--service-id` | Service ID (falls back to FASTLY_SERVICE_ID, then fastly.toml) | No | - |
| `--service-name` | The name of the service | No | - |
| `--version` | 'latest', 'active', 'staged', or the number of a specific Fastly service version | No | - |
| `--comment` | Human-readable comment | No | - |
| `--dir` | Project directory (default: current directory) | No | - |
| `--domain` | The name of the domain associated to the package | No | - |
| `--env` | The manifest environment config to use (e.g. 'stage' will attempt to read 'fastly.stage.toml') | No | - |
| `--no-default-domain` | Skip default domain creation | No | - |
| `--package` | Path to a package tar.gz | No | - |
| `--status-check-code` | Set the expected status response for the service availability check | No | - |
| `--status-check-off` | Disable the service availability check | No | - |
| `--status-check-path` | Specify the URL path for the service availability check | No | / |
| `--status-check-timeout` | Set a timeout (in seconds) for the service availability check | No | 120 |

## Global options

| Flag | Description | Required | Default |
|------|-------------|----------|----------|
| `--help` | Show context-sensitive help. | No | - |
| `--accept-defaults` | Accept default options for all interactive prompts apart from Yes/No confirmations | No | - |
| `--auto-yes` | Answer yes automatically to all Yes/No confirmations. This may suppress security warnings | No | - |
| `--debug-mode` | Print API request and response details (NOTE: can disrupt the normal CLI flow output formatting) | No | - |
| `--non-interactive` | Do not prompt for user input - suitable for CI processes. Equivalent to --accept-defaults and --auto-yes | No | - |
| `--quiet` | Silence all output except direct command output. This won't prevent interactive prompts (see: --accept-defaults, --auto-yes, --non-interactive) | No | - |
| `--token` | Fastly API token, or name of a stored auth token (use 'default' for the default token). Falls back to FASTLY_API_TOKEN env var | No | - |
| `--verbose` | Verbose logging | No | - |

## Examples

### Deploy a package to a Fastly Compute service

The optional `--accept-defaults` flag accepts default values for all prompts if configured via the [fastly.toml](https://www.fastly.com/documentation/reference/compute/fastly-toml) `[setup]` section and performs a deploy non-interactively

```bash
fastly compute deploy --accept-defaults
```

### Deploy a custom package to a Fastly Compute service

Use the <kdb>fastly compute pack</kbd> command to package up a pre-compiled Wasm binary and then reference the generated archive file when deploying.

```bash
fastly compute deploy --package ./pkg/example.tar.gz
```

