Session Staging

By default, when users create a new Kasm session, the container for that session is created on-demand.

In some use-cases, administrators may wish to Stage (Pre-Provision) containers, so when a user requests a session, it pulls from a pool of staged containers that are already running. This may be useful to reduce the time it takes for a user to connect to a session, or if the Image has a lengthy run-time initialization routine.


  • Log into the Kasm Web UI as an administrator.

  • Click Staging.

  • Click Create New Config.


Staging Config




The Deployment Zone for the configuration


The desired Image to be staged.

Desired Sessions

The number of sessions the system will attempt to have staged at any given time. As users are assigned sessions from the pool, the system will automatically attempt to provision more to keep the pool at this number. Reducing this number will cause the system to destroy excess staged sessions.

Expiration (Hours)

Staged sessions that have not been assigned to a user will expire after this amount of time. The system will destroy the staged sessions and re-created them.

  • Fill out the form then click Submit.

  • Click Zones.

  • Click Edit next to the desired Zone.

  • Update the Allow Origin Domain and the Upstream Auth Address settings to be the appropriate domain. The default $request_host$ variable cannot be used for staged sessions.

Desired Sessions

The system will begin creating the staged sessions a few moments after the configuration is applied. If the Current Sessions does not match the Desired Sessions after a few minutes , consult the logs for warning or error messages. It is likely the system doesn’t have enough resources (Agent Capacity) to fulfill the request, or an Image is disabled or unavailable


Staging Configs

Session List

Staged sessions will appear without a User assigned in the Sessions list. Once the sessions are assigned to a user, the username will appear


Staged Sessions

Incompatible Settings

Certain Group and Image level settings are not compatible with Staged Sessions as they require the container to be originally created with the settings applied. If a user requests a Kasm session but has an incompatible setting applied, the violation will be logged, and the system will provision a container on-demand.

  • (Image) - Persistent Profile

  • (Image) - Volume Mappings*

    That use {username} or {user_id} tokens

  • (Group) - expose_user_environment_vars

  • (Group) - inject_ssh_keys

  • (Group) - run_config

  • (Group) - volume_mapping

  • (Group) - web_filter_policy

    Administrators can apply a filter policy to the Image instead.


Logged settings violation

Multi-Zone Behavior

When a user makes a request to launch a session the system will prefer to assign a staged session in all applicable Zones prior to attempting to create an on-demand container. The process is as follows:

  1. Attempt to assign a staged session in the current Zone.

  2. Attempt to assign a staged session in other Zones if Search Alternate Zones is configured on the current Zone.

  3. Attempt to create a new on-demand session in the existing Zone.

  4. Attempt to create a new on-demand session in other Zones if Search Alternate Zones is configured on the current Zone.

Docker Exec

The Docker Exec Config supports a top level key named assign. This command is executed when the user is assigned a staged session. For more information please see Docker Exec Config