Skip to main content

npx remotion cloudrun services

Cloud Run is in Alpha, which means APIs may change in any version and documentation is not yet finished. See the changelog to stay up to date with breaking changes.

The npx remotion cloudrun services command allows you to deploy, view and delete GCP Cloud Run services that can render videos and stills.

You only need one service per GCP region and Remotion version.

deploy

npx remotion cloudrun services deploy
npx remotion cloudrun services deploy

Creates a new service in your GCP project. If a service exists in the same region, with the same Remotion version, with the same amount of memory, disk space and timeout duration, the name of the already deployed service will be returned instead.

Example output
Validating Deployment of Cloud Run Service:

Remotion Version: 3.3.95
Memory Limit: 2Gi
CPU Limit: 1.0
Timeout: 300
Project Name: remotion-example
Region: us-east1

Deploying Cloud Run Service...


Cloud Run Deployed!

Service name: remotion--3-3-95--mem512mi--cpu2--t-1200
Version: 3.3.95
CPU Limit: 2
Memory Limit: 512Mi
Timeout: 1200sec
Region: us-east1
Service URL: https://remotion--3-3-95--mem512mi--cpu2--t-1200-1a2b3c4d5e-ue.a.run.app
GCP Console URL: https://console.cloud.google.com/run/detail/us-east1/remotion--3-3-95--mem512mi--cpu2--t-1200/logs

--region

The GCP region to select. The site that the service will be accessing should also be in this same region to minimise latency.

--memoryLimit

The upper bound on the amount of RAM that the Cloud Run service can consume. Default: 512 MB.

--cpuLimit

The maximum number of CPU cores that the Cloud Run service can use to process requests. Default: 1.0.

--minInstances

The minimum number of service instances to have available, regardless of requests. Default: 0.

note

Any running instances, even if they are not performing a render, will be billable in GCP. The default minimum number of instances is zero, which means that when no requests are made to your service, you are not billed.

--maxInstances

The maximum number of service instances that can be create by GCP in response to incoming requests. Default: 100.

--timeoutSeconds

Timeout of the Cloud Run service. Default: 300 seconds.

--quiet, -q

Only logs the service name, and 'Authenticated access granted'.

ls

npx remotion cloudrun services ls
npx remotion cloudrun services ls

Lists the services that you have deployed to GCP in the selected region.

Example output
2 services in us-east1

Service name: remotion--3-3-95--mem512mi--cpu2--t-1200
Version: 3.3.95
CPU Limit: 2
Memory Limit: 512Mi
Timeout: 1200sec
Region: us-east1
Service URL: https://remotion--3-3-95--mem512mi--cpu2--t-1200-1a2b3c4d5e-ue.a.run.app
GCP Console URL: https://console.cloud.google.com/run/detail/us-east1/remotion--3-3-95--mem512mi--cpu2--t-1200/logs

Service name: remotion--3-3-82--mem512mi--cpu1-0--t-800
Version: 3.3.82
CPU Limit: 1.0
Memory Limit: 512Mi
Timeout: 800sec
Region: us-east1
Service URL: https://remotion--3-3-82--mem512mi--cpu1-0--t-800-1a2b3c4d5e-ue.a.run.app
GCP Console URL: https://console.cloud.google.com/run/detail/us-east1/remotion--3-3-82--mem512mi--cpu1-0--t-800/logs

--region

The GCP region to list services from.

--quiet, -q

Prints only the service names in a space-separated list. If no services exist, prints ()

rm

npx remotion cloudrun services rm remotion--3-3-82--mem512mi--cpu1-0--t-800
npx remotion cloudrun services rm remotion--3-3-82--mem512mi--cpu1-0--t-800

Removes one or more services from your GCP project. Pass a space-separated list of services you'd like to delete.

Example output

Service name: remotion--3-3-82--mem2gi--cpu1-0--t-800
Version: 3.3.82
CPU Limit: 1.0
Memory Limit: 2Gi
Timeout: 300sec
Region: us-east1
Service URL: https://remotion--3-3-82--mem2gi--cpu1-0--t-800-1a2b3c4d5e-ue.a.run.app
GCP Console URL: https://console.cloud.google.com/run/detail/us-east1/remotion--3-3-82--mem2gi--cpu1-0--t-800/logs Delete? (Y/n): Y
Deleted!

--region

The GCP region to select.

--yes, -y

Skips confirmation.

rmall

npx remotion cloudrun services rmall
npx remotion cloudrun services rmall

Removes all services from your GCP project for a certain region.

Example output
2 services in us-east1

Service name: remotion--3-3-95--mem512mi--cpu2--t-1200
Version: 3.3.95
CPU Limit: 2
Memory Limit: 512Mi
Timeout: 1200sec
Region: us-east1
Service URL: https://remotion--3-3-95--mem512mi--cpu2--t-1200-1a2b3c4d5e-ue.a.run.app
GCP Console URL: https://console.cloud.google.com/run/detail/us-east1/remotion--3-3-95--mem512mi--cpu2--t-1200/logs

Delete? (Y/n) n
Skipping service - remotion--3-3-95--mem512mi--cpu2--t-1200.

Service name: remotion--3-3-82--mem512mi--cpu1-0--t-800
Version: 3.3.82
CPU Limit: 1.0
Memory Limit: 512Mi
Timeout: 800sec
Region: us-east1
Service URL: https://remotion--3-3-82--mem512mi--cpu1-0--t-800-1a2b3c4d5e-ue.a.run.app
GCP Console URL: https://console.cloud.google.com/run/detail/us-east1/remotion--3-3-82--mem512mi--cpu1-0--t-800/logs

Delete? (Y/n) n
Skipping service - remotion--3-3-82--mem512mi--cpu1-0--t-800.

--region

The GCP region to remove services from.

--yes, -y

Skips confirmation.

See also