Skip to main content
On this page

deno deploy

Command line usage:
deno deploy [OPTIONS] [args]...

The deno deploy command provides a command line interface for managing and deploying applications to Deno Deploy EA, Deno's platform for hosting JavaScript, TypeScript, and WebAssembly applications.

When called without any subcommands, deno deploy will deploy your local directory to the specified application.

Authentication Jump to heading

The deploy command uses secure token-based authentication stored in your system's keyring:

  • Automatic Authentication: The CLI will prompt for authentication when needed
  • Token Storage: Deploy tokens are securely stored using the system keyring
  • Token Management: The CLI provides operations to get, set, and delete authentication tokens.

Global options Jump to heading

  • -h, --help - Show help information
  • --org <name> - Specify the organization name
  • --app <name> - Specify the application name
  • --prod - Deploy directly to production

Subcommands Jump to heading

Create application Jump to heading

Creates a new application in Deno Deploy.

deno deploy create [root-path]

Options:

  • -h, --help - Show help information
  • --org <name> - The name of the organization to create the application for
deno deploy create --org my-organization

Environment variables management Jump to heading

Manage environment variables for your deployed applications.

deno deploy env

Options:

  • -h, --help - Show help information
  • --org <name> - The name of the organization
  • --app <name> - The name of the application

List environment variables Jump to heading

deno deploy env list

Lists all environment variables in an application.

Add environment variable Jump to heading

deno deploy env add <variable> <value>

Adds an environment variable to the application.

deno deploy env add DATABASE_URL "postgresql://user:pass@localhost/db"

Update environment variable value Jump to heading

deno deploy env update-value <variable> <value>

Updates the value of an existing environment variable.

deno deploy env update-value API_KEY "new-api-key-value"

Specifying environment variable contexts Jump to heading

Environment variables can be made available to specific contexts such as Production, Preview, Local, and Build.

deno deploy env update-contexts <variable> [contexts...]

Updates the contexts of an environment variable in the application:

Delete environment variable Jump to heading

deno deploy env delete <variable>

Deletes an environment variable from the application.

deno deploy env delete OLD_API_KEY

Load environment variables from file Jump to heading

deno deploy env load <file>

Loads environment variables from a .env file into the application.

deno deploy env load .env.production

Application logs Jump to heading

Stream logs from a deployed application.

deno deploy logs

Options:

  • -h, --help - Show help information
  • --org <name> - The name of the organization
  • --app <name> - The name of the application
  • --start <date> - The starting timestamp of the logs
  • --end <date> - The ending timestamp of the logs (requires --start)
deno deploy logs --org my-org --app my-app --start "2024-01-01T00:00:00Z"

Configure cloud connections Jump to heading

The deploy command includes tools to help you configure integrations for use as Cloud Connections in your applications.

AWS integration setup Jump to heading

Configure AWS integration for use as a Cloud Connection in your application.

deno deploy setup-aws --org <name> --app <name>

Options:

  • -h, --help - Show help information
  • --org <name> - The name of the organization (required)
  • --app <name> - The name of the application (required)
deno deploy setup-aws --org my-org --app my-app

Google Cloud Platform integration setup Jump to heading

Configure Google Cloud Platform integration for use as a Cloud Connection in your application.

deno deploy setup-gcp --org <name> --app <name>

Options:

  • -h, --help - Show help information
  • --org <name> - The name of the organization (required)
  • --app <name> - The name of the application (required)
deno deploy setup-gcp --org my-org --app my-app

Usage examples Jump to heading

Basic deployment Jump to heading

# Deploy current directory to production
deno deploy --prod

# Deploy with specific org and app
deno deploy --org my-company --app my-api --prod

Environment setup Jump to heading

# Create a new application
deno deploy create --org my-company

# Set up environment variables
deno deploy env add DATABASE_URL "postgresql://..."
deno deploy env add API_KEY "your-api-key"

# Load from .env file
deno deploy env load .env.production

Monitoring Jump to heading

# View recent logs
deno deploy logs --org my-company --app my-api

# View logs for specific time range
deno deploy logs --org my-company --app my-api \
  --start "2024-01-01T00:00:00Z" \
  --end "2024-01-01T23:59:59Z"

Cloud integration Jump to heading

# Set up AWS integration
deno deploy setup-aws --org my-company --app my-api

# Set up GCP integration
deno deploy setup-gcp --org my-company --app my-api

Getting help Jump to heading

  • Use deno deploy --help for general help
  • Use deno deploy <subcommand> --help for specific subcommand help
  • Check the Deno Deploy EA documentation for platform-specific information

Did you find what you needed?

Privacy policy