Skip to main content
Start with the Runloop Quickstart to use the examples below.

Manual Stopping

You can stop a running Devbox any time using the devbox.shutdown call in the client SDK.

Devbox Max Lifetime

When you create a Devbox, it is automatically given a maximum lifetime. This prevents unwanted charges by leaving Devboxes running when they are not needed. The default lifetime is 1 hour, but this can be configured when you create the Devbox:
Configure either keep_alive_time_seconds or an idle policy, not both. Use keep_alive_time_seconds when you want a fixed maximum lifetime for the Devbox. Use lifecycle.after_idle with on_idle when you want Runloop to act only after the Devbox becomes idle. Mixed configurations are not recommended for normal use: depending on the API or client path, the request may be rejected or the idle policy may take precedence over the fixed keep-alive timeout.

Idle Behavior

You can also configure your Devboxes to automatically shutdown or suspend when they are idle using the lifecycle.after_idle launch parameter. By default, Runloop will do nothing if your Devbox is idle. on_idle only applies to RUNNING Devboxes and the action won’t be taken if the Devbox is not in RUNNING state.

Network Access Control

You can restrict what network resources a Devbox can access by applying a Network Policy. This is useful for security, compliance, and controlling costs.
See the Network Policies documentation for more details on creating and managing policies.